Graphics Reference
In-Depth Information
The advantage of this form of the expression is that when we evaluate the integral
at the center of the rendering equation, namely,
L ( P ,
v i ) f s ( P ,
v i ,
v o )
v i ·
n ( P ) d
v i ,
(31.65)
v i S + ( P )
both L and f s are expressed in the spherical harmonic basis. This will soon let us
evaluate the integral very efficiently. Note, however, that in expressing the BRDF
as a sum of harmonics, we were assuming that the BRDF was continuous; this
either rules out any impulses (like mirror reflection), or requires that we replace
all equalities above by approximate equalities.
Unfortunately, while L may be expressed with respect to the global coordinate
system, f s is usually expressed in a coordinate system whose x - and z -directions
lie in the surface, and whose y -direction is the normal vector. Transforming L 's
spherical-harmonic expansion into this local coordinate system requires some
computation; it's fairly straightforward for low-degree harmonics, but it gets pro-
gressively more expensive for higher degrees. If we write the field radiance L at
point P in spherical harmonics in this local coordinate system (absorbing a minus
sign as we do so),
v i )= u m h m (
L ( P ,
v i ) ,
(31.66)
then the central integral takes the form
v o )=
v i S + ( P )
v i )
jk
S (
u m h m (
w jk h j (
v i ) h k (
v o ) d
v i ;
(31.67)
m
v o )
=
k
v i )
j
h k (
u m h m (
w jk h j (
v i ) d
v i ;
(31.68)
v i S + ( P )
m
w jk u m
v i S + ( P )
=
k
v o )
j , m
h k (
h m (
v i ) h j (
v i ) d
v i .
(31.69)
The integral in this expression is 0 if j and m differ, and 1 if they're the same. So
the entire expression simplifies to express the surface radiance in direction
v o as
v o )=
k
v o )
j
S (
h k (
w jk u j .
(31.70)
The inner sum can be seen as a matrix product between the row vector u of the
coefficients of the field radiance and the matrix of coefficients for the cosine-
weighted BRDF. The product vector provides the coefficients for the surface radi-
ance in terms of spherical harmonics in the local coordinate system.
At the cost of expressing the BRDF and field radiance in terms of spherical
harmonics, we've converted the central integral into a matrix multiplication. This
is another instance of the Basis principle: Things are often simpler if you choose
a good basis . In particular, if you're likely to be integrating products, a basis like
the spherical harmonics, in which the basis functions are pairwise orthogonal, is
especially useful.
If the field radiance can be assumed to be independent of position (e.g., if most
light comes from a partly overcast sky), then the major cost in this approach is
transforming the spherical harmonic expression for field radiance in global coor-
dinates to local coordinates. If not, there's the further problem of converting sur-
face radiance at one point, expressed in terms of spherical harmonics there, into
 
Search WWH ::




Custom Search