![](https://csdnimg.cn/release/download_crawler_static/10494469/bg13.jpg)
Chapter 2. Background 7
In the above equation, L
o
(p, ω
o
) denotes the light reflected at p in direction ω
o
. This
quantity is essentially the sum of the incident light L
i
(p, ω
i
) in direction ω
i
multiplied
by the BRDF f(p, ω
o
, ω
i
), for every ω
i
in the normal-oriented hemisphere, where ω
i
is a differential solid angle in this hemisphere (a infinitesimally thin cone of incident
directions). This product is attenuated by cos θ, which is the cosine of the angle between
the surface normal and the direction of incoming light ω
i
. This cosine factor is due to
Lambert’s cosine law, which essentially states that light striking the surface at normal
incidence has a stronger influence on the reflected light than light coming at grazing
angles, and this effect is modelled by taking the cosine of the angle.
Careful observation of the above equation reveals a subtle problem when it comes to
computing the light reflected off a surface: L
o
is a function of L
i
as expressed by the
equation, but L
i
is also in fact a function of L
o
: some of the light that is reflected off a
surface bounces around the scene and eventually hits back that same surface. This is
essentially where the complexity of the equation lies, and in practise, rendering systems
approximate these light bounces using different methods to achieve different results.
Methods that result in better approximations generally result in higher visual fidelity,
but are more costly to compute. A rendering system must find a balance between visual
quality and performance.
2.3 From the Rendering Equation to Ambient Occlusion
Ambient occlusion can be understood as an approximation to the rendering equation.
Let us see how to derive the mathematical definition of ambient occlusion, starting
with a simple approximation and adding more complexity to reach our goal.
2.3.1 Direct Lighting
Perhaps the simplest approach when it comes to approximating the rendering equa-
tion (conceptually) is to simply ignore indirect lighting, or light bouncing off from one
surface to another, and to compute direct lighting only, or light coming directly from a
light source. This produces images like the one in figure 2.8, where only points that are
visible from the light source are shaded, and those from which the light source is not
reachable appear pitch black.
This method is a very crude approximation of the rendering equation, and the visual
result is unacceptable for most practical purposes. In practise, we need to approxi-
mate indirect lighting for results to be visually plausible, as illustrated in figure 2.9.
This figure shows the same scene rendered with 0, 1, and 2 bounces of indirect light.
The leftmost image is the same as in figure 2.8: zero bounces of light correspond to
direct lighting. The image in the middle adds one bounce of indirect lighting. Notice