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:

MMhhh, simply do your light-calculations with the perturbed normale?!

What you see here is the specular lighting.
I assume you have diffuse lighting working allready with normal maps.
So simply:

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.

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.

It’s called Environment-Mapped Bump Mapping (EMBM).

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.