Graphics Reference
In-Depth Information
systems: the incident irradiance is normally expressed in a global coordinate sys-
tem, while the BRDF and the clipping term are in the local coordinate system at
the particular surface point. A rotation must therefore be performed on one set
of SH coefficients before the product formula can be applied. A more serious
problem arises from the dependence of the BRDF on both the incoming and out-
going angles. The SH expansion has to be separately computed for each outgoing
direction
v ; fortunately, these expansions are independent of the incident radiance
function so they can be precomputed.
BRDF textures. An attempt to solve these problems was described in a paper en-
titled “Fast, Arbitrary BRDF Shading for Low-Frequency Lighting Using Spheri-
cal Harmonics” by Jan Kautz, Peter-Pike Sloan, and John Snyder [Kautz et al. 02].
In this method, the SH expansion for the clipped and weighted BRDF function is
in the local coordinates at each sample point on the surface of an object. As usual,
the local coordinate system has the z -axis coincident with the surface normal, and
the x -axis is chosen either arbitrarily, or to align with the principal direction of
anisotropy if the BRDF is not isotropic. The incident radiance function L is ro-
tated at render time to the local coordinate system; the authors employ a fast
algorithm to compute the linear coefficients if the lighting or the object changes
dynamically at render time.
An SH expansion of the (cosine-weighted and clipped) BRDF function is per-
formed for a fixed set of outgoing vectors
v , each in the local coordinate system.
This produces a set of BRDF SH coefficients b i
(
)
v ,where i runs from
1to n 2 ( n is the approximation order). The authors use an order-5 approxima-
tions, which results in 25 SH coefficients for each approximation. The BRDF
coefficients values are stored in texture maps called BRDF textures .Aseparate
texture, or subtexture, is used to store all the values of b i (
v
for each
for a given i ;thatis,
the position in the BRDF texture of index i corresponds to the direction
v
)
v .
The process of rendering using BRDF textures is illustrated in Figure 10.7.
For the purposes of illustration, it is assumed that the illumination comes from
a distant environment map. That way, the incident light function is the same at
every point on the object. The first step is to compute the SH expansion of the
environment map. The resulting coefficients are stored in a light vector (Step 1
in Figure 10.7 ) . The precomputed BRDF textures, which contain the BRDF SH
coefficients, are constructed in the local surface coordinates of the point to be ren-
dered, while the incident light is expanded in global coordinates. Consequently,
the SH coefficients contained in the light vector have to be rotated to the local sur-
face coordinate system. As described above, this rotation is effected by a linear
transformation, which in the case of the 25-dimensional approximations used by
the authors, is a 25
×
25 matrix (Step 2a in Figure 10.7 ) . Next, the SH coefficients
Search WWH ::




Custom Search