barmyarmy said:
Could you explain this in detail please?
Cheers.
Ok. So, Normal Maps simulate 3D effects using 2D textures. They are not the same as Bump Maps or Height Maps as they are sometimes referred to, it should be pointed out. They are similar but quite distinct from Bump Mapping. Here is an example texture:
'a texture on a surface contains two textures - a color map and a second map that contains the height information for the surface. A height map would be a gray-scale image that encodes height information as shades from black (the lowest) to white (the highest). The game engine is able to use this height map to render highlights and shadows on the surface according to where the lights in the scene are located, resulting in a vastly improved surface realism.'
This is a what bump map for that image would look like trying to make it look 3d:
Combining the two produces a result like this:
'While a height map only contains 1 plane of information - the "Z" (height) plane, a normal map contains 3 vectors of information - "X" direction, "Y" direction and "Z" direction. Thus, each pixel in a normal map encodes which direction that particular point is facing - the "normal vector" of the surface. Each pixel in a normal map has meaningful information, so details can be rendered more crisply than with bump maps alone. This allows modern game engines to more realistically portray the lighting on a surface. A properly constructed normal map can fool the eye into perceiving much more complex 3D geometry on a simple surface. Theoretically, normal maps on a cube can make it appear spherical, at least in terms of shading properties (the outline remains unchanged).'
They simulate highlighting and shadow casting on a per pixel basis using pixel shader technology. As far as I'm aware, it was one of the new things introduced with DirectX 9.0 but I may be wrong on that front. The classic example that got a lot of press was from the Half-Life 2 promotional stuff from E3 two years ago. They showed how a detailed cave wall was actually very simple geometry and very clever Normal Mapping.
The Normal Map would look like this:
So, while the height map stores information for only one direction of topography (i.e., closer and further away from the camera plane), the Normal map has three directions of data which allows a real-time lighting engine to calculate the effect of a dynamic light on a texture thus altering the highlighting and shadow casting in real-time. There's no point in me posting a picture because it's all about dynamic lighting effects rather than static ones. Any pic would basically look like the combined image above. The difference would be if you could move the light source around the image, the highlighting and shading would transform accordingly.
If you want to get a hands-on feel for the power of pixel shading, download the
Virtools shader demo
HERE(2.9Mb). One of the options demonstrates normal mapping. I can't remember if you need the
Virtools plug-in (as I have the whole Virtools software installed so it's hard for me to tell). If you do, get it
HERE.
Hope that's detailed enough.