View Full Version : Shiny bumpmaps
I want to implement the effect shown in the shot below. I have bumpmaps and cubemaps implemented already, but I am not sure what is going on in this shot:
12-03-2006, 09:51 PM
MMhhh, simply do your light-calculations with the perturbed normale?!
12-04-2006, 12:36 AM
What you see here is the specular lighting.
I assume you have diffuse lighting working allready with normal maps.
Diffuse = max(0.0, dot(normal, lightVector));
Specular = max(0.0, dot(reflect(normal, eyeVector), lightVector));As you see the difference is that instead of using normal vector you use eyeVector reflected by that normal. I did not include light attenuation for simplicity, but of course it should be included.
FinalColor = diffuseTexture * diffuse + specularTexture * specular;
You can get nice results without specularTexture and I believe there is no such texture in the screenshot above.
12-04-2006, 06:21 AM
It looks like the per-pixel normal is used to do the cube map lookup, then the resulting cube map sample is simply modulated with the rest of the lighting.
Yeah, I am thinking the cubemap is based on the bumpmap final color, and added. I'll try it out.
12-05-2006, 09:39 AM
It's called Environment-Mapped Bump Mapping (EMBM).
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.