Graphics Reference
In-Depth Information
realistic grayscale rendering of a model of the object painted flat white. Ambient
occlusion maps do in fact have other applications in rendering. Proper rendering
using an ambient occlusion map works by compositing the pixel rendered using
the normal shading pipeline with the ambient illumination term scaled by the
ambient occlusion map value at the pixel. The ambient term may be a constant,
but typically it comes from a prefiltered low frequency environment map. The
actual environment map used for ambient lighting depends on the application.
Direct lighting is normally computed directly from the light sources in a separate
step, so it may be necessary to remove the parts of an image-based environment
map that correspond to light sources before it is used in as an ambient illumination
source.
The value obtained from an ambient environment map depends on the ori-
entation of the surface. Looking up the illumination according to the surface
normal does not work well, because it may not represent the primary direction
of the incident illumination. For example, the lower part of the seat backs in
the airplane cockpit in Figure 7.13 are illuminated mostly by light coming from
the top windows, which comes at an angle well away from the surface normal.
Another problem with getting the illumination from the direction of the sur-
face normal is that a particularly bright spot in the environment can slip in and
out of view of the surface normal. This can cause artifacts such as inappropri-
ately hard shadows and generally incorrect illumination. The environment map
lookup actually uses an average light direction vector instead of the surface nor-
mal. This vector is the average direction of all unoccluded rays obtained during
the ray-casting computation in the construction of the map. In practice, the aver-
age light direction vector is stored as an offset of the surface normal, hence the
name bent normal is sometimes used instead. 5
Figure 7.15 illustrates the bent
normal.
Ambient occlusion maps were first used in the movie Pearl Harbor [Bay 01]
(see Figure 7.13 ) and subsequently in JurassicPark3 . ILM, which was in charge
of the visual effects for these movies, previously used precomputed self occlusion
by tracing rays in the direction of mirror reflection to test for occlusion. The
results were used to compute specular reflection without tracing rays at render
time. Ambient occlusion maps were created as a synthesis of this method and
IBL environment maps. The greatest advantages of ambient occlusion maps lie in
their ability to approximate visually important lighting without using ray tracing,
and the compatibility with IBL in general. Their use quickly spread in major
movie production after Pearl Harbor .
5 An ambient occlusion map is typically stored as a four-channel (RGBA) texture map. The ambient
occlusion value together with the three coordinates of the average light direction vector (bent normal)
fill out a texel.
Search WWH ::




Custom Search