Good Old Normal Mapping With Parallax Shift
Alright! It’s not that old but the original concept ( Bump Mapping ) is.
Some time ago i created demo in OpenGL ( GLSL) to learn the concept. and more recently i converted it to Direct3D 9 ( HLSL ). I decided to post some pics of the demo here.
The Normal Mapping ( Dot3 Bump Mapping ) concept is relatively simple: Instead of using hardware interpolated vertex normals for shading equation ( N Dot L , for example ), We use texture that contains normal vectors ( thus called normal map ), and map it to our surface. This way we have unique normal per pixel , and it greatly enhance the shading without adding any polygons to our objects.
The downside is when we look at our surface in oblique angles it appears to be flat , this is where Parallax Mapping comes into play. It simply shift the surface texture along the view vector ( in tangent space ) according to gray scale height map that represent the height of each pixel. So the ‘higher’ point shift away from the camera and theĀ ‘lower’ point shift toward the camera, thus creating parallax effect.
Note that the parallax method I’ve used here does not take into account the self occlusion of the surface.




You’re gonna be great man, ur the man \m/
Nexus said this on January 31st, 2009 at 2:52 am