Neat Bumpmapping Trick

Post your FreeBASIC tips and tricks here. Please don’t post your code without including an explanation.
Zamaster
Posts: 1024
Joined: Jun 20, 2005 21:40
Contact:

Neat Bumpmapping Trick

Postby Zamaster » Jun 29, 2011 6:38

Just add specular light! I knew about bumpmapping by adding specular light to the pixel colors to make bump-mapped surfaces look more 'wet', however it didn't look as good as I wanted it to. Then I read online the idea that you do specular bumpmapping, but use a separate height-map for the specular component as light generally tends to reflect off of smoother surfaces. So I took a regular height map for the diffuse light, and a smoothed and contrasted version of it for the specular light and it looked great!

Image



I didn't include sauce because its one of those thrown together jobs where im calculating pixel colors by individually pulling them apart and manipulating them in FB code (bleh! asm version soon) So just an .exe today.

here's it is: http://www.mediafire.com/?1eigjmf2mfbc9pa

this is for the same project the HDR and huge perlin noise thing was for. gotta make it all go fast fast fast!!!
Last edited by Zamaster on Jun 29, 2011 16:11, edited 1 time in total.
cha0s
Site Admin
Posts: 5317
Joined: May 27, 2005 6:42
Location: Illinois
Contact:

Postby cha0s » Jun 29, 2011 7:08

Well, the screenshot looks pretty. =)
gothy57
Posts: 1
Joined: Jul 05, 2011 22:44

Postby gothy57 » Jul 09, 2011 23:14

impressive. even my girlfriend likes it :D

Return to “Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 1 guest