Normal map ? Captain ?
In digital imaging, three things affect the final rendering of your object :
Lighting - Colors - Depth
Our own perception of the latter comes from the interaction between the objects around us and the light which shines on them. So, to make images/objects generated by computers more realistic, we have the obligation to play on this interaction. Several methods exist to fake depth on the objects. These methods are designated as “mapping methods”. The advantage of this process is to save memory resources and earn fluidity (shadows are far less heavy than actual depth).
In both cases, 2D and 3D, we must start with a smooth and flat object, without any depth. The question is : how to fake depth on this flat object ?
We can use a normal map. Briefly, in geometry, the normal line to a surface is the orthogonal line to the tangent plane in one point. The direction vectors of this straight line are called normal vectors to the surface.
Well, ok, but what is the point, huh ? The point is : In computer imaging, knowing the normal vector orientation toward a point allow us to :
• Determine if this point is visible or hidden
• Determine the illumination of this point, thanks to Snell's law
Now I’m sure you understand how useful normal maps will be for us.
In brief, a normal map is a cartography of normal vectors. this cartography being colored according to the Lambert’s coefficient of these vectors.
It’s really interesting, but you don’t need to master the subject for this tutorial. We are not going to create the normal maps ourself anyway. As game makers, you must understand what you are doing, which is why I was forced to explain what normal maps are, knowing that we will be constantly using them.
Here’s the diffuse (the usual, in other words) image of Cloud Strife (FFVII) :
And here's the corresponding normal map :
Now that you know what a normal map is, let's see how to get one.