Graphics Reference
In-Depth Information
16
17
18
19
20
const Color3 & c = light->emitPhoton(Q, w_o);
photonArray.append(Photon(c * totalPower/numPhotons, Q, w_o));
}
}
14.11.4 Rectangular Area Light
We now model a planar rectangular patch that emits light from a single side,
as shown in Figure 14.30. This will be a so-called “Lambertian emitter,” which
means that if we restrict our field of view so that the emitter fills it entirely, then
we perceive the emitter's brightness as the same regardless of its orientation or
distance. We describe the light source's orientation by an orthonormal reference
frame in which m is the unit normal to the side that emits photons and u and v are
the axes along the edges. The edges have lengths given by extent and the source
is centered on point C .
The total power emitted by the light is Phi . This means that if we increase
extent , the illumination level in the scene will appear constant but the emitter's
surface will appear to become darker since the same power is distributed over a
larger area.
v
C
u
m
Figure 14.30: Parameterization
of a square area light on the
ceiling.
(m 2 sr)) due to a point Q on a Lambertian emitter, emitted
The radiance (W
/
, is the total emitted power (W) divided by the area (m 2 )ofthe
emitter and the so-called “projected solid angle” (sr)
in any direction
v
Φ
A Ω + [
L ( Q ,
v
)=
(14.34)
γ ·
m ] d
γ
Φ
=
sr .
(14.35)
A
π
For a discussion of this and other radiometric terms, see Section 26.7.1.
We can now compute the biradiance at P due to Q .Let
v i = S ( Q
P ) . Light
leaving Q in direction
v i arrives at P traveling in direction
v i . The leaving
light has radiance Φ
/
( A
π
sr ) by Equation 14.35. So
A
M i ( Q , P )= L ( P ,
v i )
2 (
m
· v i ) sr
(14.36)
||
Q
P
||
Φ
A
=
2 (
m
· v i ) sr
(14.37)
A
π
sr
||
Q
P
||
= (
m
· v i
,
(14.38)
||
Q
P
||
2
π
assuming that P is on the emitting side of the light source and there is an unoc-
cluded line of sight to Q . Listing 14.13 gives an implementation of the key Light
methods for such a light source based on this derivation.
Listing 14.13: A model of a single-sided rectangular Lambertian emitter.
1
2
3
4
class RectangularAreaLight : public Light {
private :
// Orthonormal reference frame of the light
Vector3 u, v, m;
 
 
 
Search WWH ::




Custom Search