Graphics Reference
In-Depth Information
: unoccluded ray
× : occluded ray
˓
˓
º º
º
Environment map
Image
˓
º
p
Ray
Object to
be rendered
Viewpoint
Figure 7.14 An ambient occlusion map is constructed at point p on a surface by casting rays, and
counting rays that hit the environment map. ( c
Lucasfilm Ltd. Used with Permission.)
ing to the light sources have been removed). Conveniently, this is the first term
L 0 , 0 in the SH expansion of the environment map. The ambient term has generally
been treated as constant in the scene, but the idea of varying its value according
to the local geometry has been used to increase realism. An ambient occlusion
map is one way of doing this. This map specifies the attenuation of the ambient
term at each surface point. This form of “attenuation” is a result of ambient light
blockage by scene elements, and normally does not include light attenuation in
the context of a participating medium.
Ambient occlusion maps are typically constructed for a single complex object,
such as the airplane model in Figure 7.13. At each point on the surface, the value
of the map records the cosine-weighted fraction of the environment map that is
invisible from that point. More precisely, the value is the normalized irradiance at
the surface point that would result from a constant environment map. This can be
computed using a simplified form of Monte Carlo ray tracing that works by cast-
ing sample rays over the hemisphere of directions above the point ( Figure 7.14 ) .
The summation is simpler than it is in ordinary MCRT. If a sample ray does not
hit another point on the object, the direction of the ray represents an unoccluded
path to the environment map. In this case the ray contribution is cos
is
the angle the ray makes with the surface normal. Otherwise the ray hits the object
and therefore has no contribution. The ambient occlusion is the sum of all the ray
contributions divided by the sum of cos
θ
,where
θ
for all cast rays.
The image in Figure 7.13 illustrates the ambient occlusion map. Each point
is shaded only by the ambient occlusion value, which is represented as a level
of gray. Surface points that are nearly white have an ambient occlusion near 1,
meaning that the point has a nearly unobstructed view of the environment. Darker
points see less of the environment. Even though it is just an illustration of the
ambient occlusion map, the image in Figure 7.13 might pass as an overexposed
θ
 
 
Search WWH ::




Custom Search