Normal Mapping: Theory and Practice
This tutorial is intended to describe some basic ideas about normal mapping and how to implement this technique in Maya.
Normal mapping is the technique to replace the existing normals on model. It can be used to greatly enhance the appearance of a low poly model without using more polygons.
Figure 1. Normal( colored as light green ) is the vector that is perpendicular to the surface and thus describes the surface's orientation.We calculate per-vertex normals on the poly model by averaging connected facet normals on each vertex.
Figure 2.Low poly model of 2,807 triangles. Modeled and UV mapped in Maya.
Linear interpolation between each vertex normal on a triangle to get smooth appearance.
Figure 3. More detailed model inevitably requires more polygons.
Figure 4. High poly model of 723,584 triangles. Sculpted and exported via ZBrush.
Figure 5. Casting rays from the low poly model alone the normal direction.
Returning normals on the high poly model where the ray hits it.
Triangles that make up the high poly model need to be loaded into an Octree data structure to speed up the ray-casting process.
Figure 6. Replace the normals on the origin of the ray with the returned normals.
Displacements between low and high poly model can be ignored.
Figure 7. Ray-casting calculation requires to split each polygon into a set of triangles.
Facet like the ones in the second line should be avoided.
Figure 8. UV coordinate of the low poly model.
It should not contain overlapping UVs or zero-sized triangles, which will post problems when rastering the low poly model in its UV coordinate system.