Graphics Reference
In-Depth Information
{ v k : k = 1,
...
, n }
,
n
v o )= ρ d
π
v o · v k ) e k
f s ( P ,
v i ,
+
(
,
(27.23)
k = 1
where
ρ d is the diffuse reflectivity. For this to be reciprocal requires that the
vectors
v k be expressed as term-by-term multiples of
v i so that
v 1 , for instance, is
v 1 =(
ω i,x a 1, x ,
ω i,y a 1, y ,
ω i,z a 1, z ) .
(27.24)
Alternatively, one can express this by building a diagonal matrix A 1 , and then
saying that
v k = A 1 v i . Then the Lafortune model ends up being
n
v o )== ρ d
π
o A k v i ) e k ,
f s ( P ,
v i ,
+
(
(27.25)
v
k = 1
where the fact that the matrices A k are all diagonal guarantees that the BRDF is
reciprocal.
Inline Exercise 27.3: Quickly verify the preceding claim. Now suppose that
A 1 , instead of being diagonal, represents rotation through 90 about the z -axis.
Show that the resultant BRDF is not reciprocal. Conclude that the Lafortune
BRDF is reciprocal if and only if all the matrices A k are symmetric.
In practice, since the Lafortune model only uses diagonal matrices, it makes
much more sense to just store the three diagonal entries than the whole matrix,
and to treat the matrix-vector multiplication as a term-by-term multiplication.
The Lafortune model is very general. In fact, it's possible to approximate
almost any conservative, reciprocal function on S 2
S 2 by using a large enough
value of n . But to get a good fit may require a very large n indeed.
To add spectral dependence to the BRDF representation, we need to let the
diagonal matrices A k (or their three diagonal entries) be functions of wavelength;
this is typically done with RGB values.
The Lafortune model is a hybrid. It's based on a phenomenological model
(Phong), but it is motivated by a rather different kind of phenomenon: the appear-
ance of measured BRDFs! In some sense, the Lafortune model can be seen not as
a model of light scattering, but as a model of a class of functions, with the property
that observed BRDFs tend to be representable with relatively few coefficients, and
hence be amenable to rapid evaluation.
×
27.5.5 Sampling
We've described the BRDF for the mirror and Lambertian and Blinn-Phong mod-
els in a form where, given
v o ) .Butin
ray tracing/path tracing and photon mapping, which we'll describe in more detail
in Chapters 31 and 32, there are two other computations we need to perform.
For photon mapping, we're given
v i and
v o , you could easily compute f s (
v i ,
v i and we need to randomly select a vector
v o with probability density proportional to f s (
n ) . (Probability densities
are described in detail in Chapter 30; for now it's sufficient to think, “We want to
pick a vector
v i ,
v o )(
v o ·
v o more often if f s (
v i ,
v o )(
v o ·
n ) is large, and less often if it's
small.”)
 
 
 
Search WWH ::




Custom Search