Graphics Reference
In-Depth Information
expansion becomes a linear combination of SH basis functions. One advantage
is that mathematical operations such as differentiation and integration of the ex-
panded function reduce to the operation on the SH basis functions, and because
these are independent of the function L , the operation can be done without any
knowledge of the function L . How many terms to include in an approximation
depends on the particular situation. The index l is known as the degree of the ba-
sis function Y l , m .Thereare2 l
1 SH basis functions of degree l . The degree also
indicates the frequency of the basis functions: for a particular l , the basis func-
tions oscillate l times around the sphere (loosely speaking). This formalizes the
notion of “frequency” of detail in an environment map, as the minimum degree l
required for an SH approximation to faithfully represent the map.
An expansion up to degree l simply cannot capture detail that changes faster
than the oscillation of the basis functions. Terms up to twice the frequency of
the pixel resolution have to be included to capture pixel-level detail in a general
environment map. That is, about four times as many coefficients as there are pix-
els are needed to properly represent pixel-level detail. The primary use of SH
expansions is to capture the general slowly varying behavior of the function. For
an environment map, a low-frequency SH approximation is a kind of filtering of
the map. The first basis function Y 0 , 0 is actually constant, so the corresponding
coefficient L 0 , 0 is the average value of the map. The basis functions for l
+
1go
through one period around the sphere, so they represent something like a local
average per octant. The set of coefficients at degree l thus captures the general
change at that frequency. A slowly changing approximation to an environment
map can be useful in some situations, such as the approximation of diffuse light-
ing. The spherical harmonic expansion of an environment map is thus a kind of
multiresolution prefiltering of the map.
At the other end of the spectrum, a discontinuity is, in some sense, an infinitely
fast change. A finite SH expansion cannot capture a discontinuity—the infinite
SH series is needed for this. Unfortunately a convergence problem occurs with
a finite SH approximation at a discontinuity. At a “jump” discontinuity, a finite
approximation exhibits an oscillation at the frequency of the maximum degree
of the expansion. A useful analogy to this effect is a sudden strike of a bell:
the result is a decaying audible vibration. Oscillatory artifacts in approximations
in general are thus known as ringing . Spherical harmonic approximations often
exhibit ringing; the severity of the effect depends on the application.
=
7.2.5 Irradiance Environment Map
Because increasing the degree of a spherical harmonic expansion results in a
quadratic increase in the number of coefficients, the computational load gets
Search WWH ::




Custom Search