Neat Bumpmapping Trick

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

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!


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:

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.
Site Admin
Posts: 5317
Joined: May 27, 2005 6:42
Location: Illinois

Postby cha0s » Jun 29, 2011 7:08

Well, the screenshot looks pretty. =)
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: jj2007 and 3 guests