Now that we have the normal map set, we will improve our alien with another map called an ambient occlusion.
An ambient occlusion is a black and white texture that represents the contact shadows of a mesh. The contact shadows are the shadows produced by the small proximity of objects. In order to have a nice ambient occlusion, we need to increase a sampling parameter that corresponds to the "noisiness" of the shadows. The more samples you have, the smoother the shadows will be. This map will then be multiplied on top of our diffuse material color.
Multiplying colors
In computer graphics, black is represented by a value of 0
and white by a value of 1
. So, when we multiply a color with black, its result is 0
, and when we multiply a color with white, its result is the color. For instance, we will take two colors, J and K, a pure blue that is represented by R(J): 0
, G(J): 0
, and B(J):1
(RGB means Red Green Blue), and white, R(K): 1
, G(K):1
, and B(K):1
. When we multiply both, we will have R(J)*R(K) = 0 * 1 = 0, G(J)*G(K) = 0 * 1 = 0, and B(J)*B(K) = 1 * 1 = 1, so the resultant color is R:0
, G: 0
, and B:1
. It is the original blue.
We will now follow the same principle as the normal map, but we will change the sampling value:
The baked ambient occlusion map of our alien
In order to see the ambient occlusion applied to our mesh, we will have to add a new texture to our material. This is done as follows:
The alien with a proper topology (shown on the left-hand side) and with its normal map and ambient occlusion (on the right-hand side)