Game Development Reference
In-Depth Information
Section 10.7.3 are an alternative system that is flexible and also amenable to
real-time rendering. Warn [71] and Barzel [5] discuss more flexible systems
for shaping lights in greater detail.
10.7.2
Light Attenuation
Light attenuates with distance. That is, objects receive less illumination
from a light as the distance between the light and the object increases. In
the real world, the intensity of a light is inversely proportional to the square
of the distance between the light and the object, as
2
i 1
i 2 =
d 2
d 1
Real-world light
attenuation
,
(10.16)
where i is the radiant flux (the radiant power per unit area) and d is the
distance. To understand the squaring in real-world attenuation, consider
the sphere formed by all the photons emitted from a point light at the
same instant. As these photons move outward, a larger and larger sphere
is formed by the same number of photons. The density of this photon
flow per unit area (the radiant flux) is inversely proportional to the surface
area of the sphere, which is proportional to the square of the radius (see
Section 9.3).
Let's pause here to discuss a finer point: the perceived brightness of an
object (or light source) does not decrease with increased distance from the
viewer, ignoring atmospheric effects. As a light or object recedes from the
viewer, the irradiance on our eye decreases for the reasons just described.
However, perceived brightness is related to radiance, not irradiance. Re-
member that radiance measures power per unit projected area per unit
solid angle, and as the object recedes from view, the decrease in irradi-
ance is compensated for by the decrease in solid angle subtended by the
object. It's particularly educational to understand how the rendering equa-
tion naturally accounts for light attenuation. Inside the integral, for each
direction on the hemisphere surrounding the shading point x , we measure
the incident radiance from an emissive surface in that direction. We've
just said that this radiance does not attenuate with distance. However, as
the light source moves away from x , it occupies a smaller solid angle on
this hemisphere. Thus, attenuation happens automatically in the rendering
equation if our light sources have finite area. However, for abstract light
sources emanating from a single point (Dirac delta), attenuation must be
manually factored in. Because this is a bit confusing, let's summarize the
general rule for real-time rendering. Emissive surfaces, which are rendered
and have finite area, typically are not attenuated due to distance—but they
might be affected by atmospheric effects such as fog. For purposes of calcu-
 
Search WWH ::




Custom Search