Adverti horiz upsell
Normal Mapping: Theory and Practice
Normal Mapping: Theory and Practice
fredzhang, updated 2005-12-04 05:20:17 UTC 234,676 views  Rating:
(9 ratings)
Page 2 of 4

Figure 9. Saving normal vectors in RGB-channeled image as the source of normal mapping.

Figure 10. Normal vector is usually transformed into the tangent space at the ray origin before output.

Figure 11. Tangent space is the rotation matrix created by Tangent, Normal and Bi-normal( cross-product of T and N ) at the ray origin.

Figure 12. Normal Mapper is a small stand-alone application to generate normal map texture as 16-bit TIFF images.
It reads the low and high poly model both in Wavefront .obj format, and offers openGL preview of the model in 3D and UV coordinate.

Figure 13. Tangents and Normals changed on a skinned model.
The Maya plug-in tangentMapper is used to calculate and save per-vertex normal and tangent at runtime.

Figure 14. NormalMapBump is the plug-in to read normal texture. Feed the normal texture and camera inverse matrix to the normalMapBump node, which will generate normal vector in Camera space and feed to some material shader's normalCamera channel, just like a common bump2D node does.

Figure 15. Test rendering by Maya software renderer.
Normal mapping is applied to the left leg that has the same number of polygons of the right one.

Figures 16. Test rendering of tangent normal on the same but skinned model.

So the steps for normal mapping are:

1. Create the low poly model and its UV in Maya.
2. Export low poly model in .obj format, vertex and UV only, doesn't need to export normals.
3. Sculpt the high poly model in ZBruch.
4. Export high poly model in .obj format.
5. Load low and high poly model into the normal mapper program to calculate the normal texture.
6. Type command: "mtorMapPolyTangent polyShapeName" in Maya to create per-vertex tangent and normal variable.
7. Create shading network to load the normal texture.
8. Done! Add some lighting and do test renders to see the result.

Thanks Julian for modeling the leg.

This is quick lession about howto do normal mapping in Maya software rendering:

1. Load the normalMapBump and tangentMapper plug-in.

2. Source MEL script mtorMapPolyTangent.mel, which is packed in the tangentMapper zip, i think.

3. Create a polygon sphere, say pSphere1, and the mesh name is pSphereShape1. Type command:

mtorMapPolyTangent pSphereShape1

in the command line and press enter. You will get a feedback like "The mesh is mapped!" if nothing went wrong.

That will create the tangentMapper node and create connection to the mesh node of pSphereShape1.