Graphics Reference
In-Depth Information
vector, by comparing
with the normal n ( P ) to the surfaces; we also mentioned
that Arvo's division of the radiance field into field radiance and surface radiance
accomplishes the same thing.
For the first problem, we will say that a point on the boundary of a solid is
actually part of that solid, so a point P on the surface of a glass ball is actually part
of the ball (and for a varnished piece of wood, a point on the boundary is treated
as being in both the varnish and the wood). This means that a ray leaving P in
the direction n P first intersects the ball at P . (As a practical matter, avoiding the
intersection at t = 0 requires a comparison of a real number against zero, which is
prone to floating-point errors, so including the first hit point is easier than avoiding
it.) Thus, with this model of surface points, the notion of “bumping” is not merely
a convenience for avoiding roundoff error problems, it's a necessity.
v
32.4.1 Representation of Luminaires
32.4.1.1 Area Lights
Our simple scene model supports a very basic kind of area light: We represent
area light sources with a polygon mesh (often a single polygon) and an emitted
power Φ . At each point P of a polygon, light is emitted in every direction
with
v
v ·
0; the radiance along all such rays, in all directions, is constant over the
entire luminaire.
The radiance along each ray can be computed by dividing the luminaire's
power among the individual polygons by area; we thus reduce the problem to
computing the radiance due to a single polygon of area A and power Φ . That radi-
ance is Φ
n P >
π A , as we saw in Section 26.7.3.
We will need to sample points uniformly at random (with respect to area) on
a single area light. To do so, we compute the areas of all triangles, and form the
cumulative sums A 1 , A 1 + A 2 ,
+ A k = A , where k is the number of
triangles. To sample at random, we pick a uniform random value u between 0 and
A ; we find the triangle i such that A 1 +
...
, A 1 +
...
u , and then generate a point
uniformly at random on that triangle (see Exercise 32.6).
We'll also want to ask, for a given point P of the surface and direction
...
+ A i
with
v
v ·
) ? For our uniformly radiating luminaires,
this is a constant function, but for more general sources, it may vary with position
or direction.
n P >
0, what is the radiance L ( P ,
v
32.4.1.2 Point Lights
Point-light sources are specified by a location 1 P and a power Φ . Light radiates
uniformly from a point source in all directions. As we saw in Chapter 31, it doesn't
make sense to talk about the radiance from a point source, but it does make sense
to compute the reflected radiance from a point source that's reflected from a point
Q of a diffuse surface. The result is
Φ
L ( Q ,
v o )= f s ( Q ,
v i ,
v o )max(
v i ·
n Q ,0 )
2 .
(32.4)
4
π
Q
P
1. We only allow finite locations; extending the renderer to correctly handle directional
lights is left as a difficult exercise.
 
 
 
Search WWH ::




Custom Search