i
i
i
i
i
i
i
i
294 8. Area and Environmental Lighting
at which point it will become zero. For point light sources, this happens
when the angle between the light source vector l and the surface normal
n reaches 90
◦
—for area light sources this happens at some larger angle
when all of the light is “under the horizon.” Snyder derived an analytic
expression for a spherical light source, taking occlusion into account [1203].
This expression is quite complex. However, since it depends on only two
quantities (r/r
L
and θ
i
), it can be pre-computed into a two-dimensional
texture. Snyder also gives two functional approximations. The simpler one
uses a single cubic polynomial and approximates the original curve fairly
well. The second uses two cubic curves, resulting in a curve almost identical
to the original. For real-time rendering, the single cubic curve (or perhaps
some even simpler curve) is likely to be sufficient.
A less physically based but effective method for modeling the effects
of area lights on Lambertian surfaces is to employ wrap lighting.Inthis
technique, some simple modification is done to the value of cos θ
i
before it
is clamped to 0. One form of this is given by Forsyth [358]:
E = E
L
max
cos θ
i
+ c
wrap
1+c
wrap
, 0
, (8.16)
where c
wrap
ranges from 0 (for point light sources) to 1 (for area light
sources covering the entire hemisphere). Another form that mimics the
effect of a large area light source is used by Valve [881]:
E = E
L
cos θ
i
+1
2
2
. (8.17)
One possible problem with wrap lighting is that shadowing can cancel its
effects unless the shadows are reduced in size or softened [139]. Soft shad-
ows are perhaps the most visible effect of area light sources, and will be
discussed in Section 9.1.
The effects of area lights on non-Lambertian surfaces are more involved.
Snyder derives a solution for spherical light sources [1203], but it is limited
to the original reflection-vector Phong BRDF and is extremely complex.
The primary visual effect of area lights on glossy surfaces is the shape of
the highlight. Instead of a small point, the highlight has a size and shape
similar to the area light. The edge of the highlight is blurred according
to the roughness of the surface. The effects of area lights on the highlight
are particularly important for very smooth surfaces. The highlight from a
point light source on such surfaces is a tiny point, which is very unrealis-
tic. In reality, a sharp reflection of the light source appears. One way of
approximating this visual effect is to use a texture to define the highlight
shape, similarly to NDF mapping (see Section 7.6) or environment map-
ping (Section 8.4). Another common technique is to threshold the value of
the specular highlight [458]—Figure 8.7 shows the result.