The baking of an ambient occlusion

Now that we have the normal map set, we will improve our alien with another map called an ambient occlusion.

Understanding the ambient occlusion map

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.

Note

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.

Creation of the bake

We will now follow the same principle as the normal map, but we will change the sampling value:

  1. The sampling slider is situated under the world tab of the Properties editor in the Gather subpanel. Even if it's grayed out, it will work for the bake. We will set it to 10 in our case. Don't go too high with this as it will increase your baking time.
  2. Now, refer to the normal map baking process, but instead of choosing a normal map in step 5, choose an ambient occlusion. Again, don't forget to add the blank texture in Edit Mode, and save it after the bake. You can also name your textures in the UV/Image Editor in the header with the corresponding text field.
    Creation of the bake

    The baked ambient occlusion map of our alien

Displaying the ambient occlusion in the viewport

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:

  1. First, we will select our alien, and then we will select the material that has the normal map on it in the Material tab of the Properties editor.
  2. We will, then, go to the Texture tab of the Properties editor and add a new texture below the normal map. In order to do this, we select the second slot and click on the big New button.
  3. We can now choose our ambient occlusion under the Image subpanel.
  4. Under the Influence subpanel, we turn the color slider on but we change the Blend Mode from mix to multiply, as we had previously explained. As you can see, this perfectly works in the viewport when the Texture shading mode is turned on. We can clearly see the contact shadows of our mesh around his eyes, for instance.
    Displaying the ambient occlusion in the viewport

    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)

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.61.147