You copied the Doc URL to your clipboard.

Modifying and combining normal maps to affect reflections

The reflection effect in the Ice Cave demo uses the tangent space normal maps and calculated gray scale fake normal maps. Combining both of these maps with some modifiers creates the effect in the demo.

The gray scale fake normal maps are a gray scale of the tangent space normal maps. In the Ice Cave demo, most values in the gray scale maps are in the range 0.3-0.8. The following figure shows the tangent space normal maps and gray scale fake normal maps that the Ice Cave demo uses:

Figure 6-72 Tangent space normal maps and grayscale fake normal maps

The tangent space normal maps and grayscale fake normal maps for the Ice Cave demo

Why the tangent space normal maps are used

The tangent space normal maps are used in the Ice Cave demo, because they have a small range of values in the resulting gray scale. This means that tangent space normal maps work well in the later stages of this rendering process.

An alternative option, is to use the object space normal maps. These maps show the same details as the tangent space normal maps, but also show where light hits. Therefore the range of values in the resulting object space normal map gray scale is too large to work well in the later stages of the rendering process. The following figure shows this effect:

Figure 6-73 Object space normal maps and grayscale effect

The object space normal maps and resulting grayscale effect showing where light hits

Applying transparency to parts of the normal maps

The gray scale fake normal maps are only applied to the areas without snow. To prevent them from being applied to the snowy areas, the gray scale fake normal maps are modified using the diffuse texture maps for the same surfaces. This modification increases the alpha component of the gray scale fake normal maps where snow appears in the texture maps.

The following figure shows the diffuse texture maps for the Ice Cave demo static surfaces and the result when they are applied to the gray scale fake normal maps:

Figure 6-74 Diffuse texture and final fake normal maps with transparent areas

The diffuse texture showing the snow cover for the rock and the alpha adjustment that is applied to the fake normal map using it

Was this page helpful? Yes No