Neat Bumpmapping Trick

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

Neat Bumpmapping Trick

Post by Zamaster »

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: 5319
Joined: May 27, 2005 6:42
Location: USA
Contact:

Post by cha0s »

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

Post by gothy57 »

impressive. even my girlfriend likes it :D
Post Reply