i
i
i
i
i
i
i
i
190 III Global Illumination Effects
Figure 5.6. Illustration of the approximation error with 4 SH coefficients and a coarse
lattice. Note that both the analytical result (green) and propagated result (red) are
represented as a final convolved irradiance.
These coefficients are scaled according to the corresponding world-space size and
reflected flux of the surfel, yielding four coefficients per color channel. In order
to simplify the following description, we show only one set of SH coefficients.
Offsetting surfels. As the LPV is a coarse grid, we have to take care when injecting
surfels, as their exact position inside a cell is no longer available after injection. If
a surfel’s normal points away from the cell’s center, its contribution should not be
added to this cell, but rather to the next cell, in order to avoid self-illumination
(see Figure 5.7). For this, we virtually move each VPL by half the cell-size in
the direction of its normal before determining the cell. Note that this shifting
of the surfels still does not guarantee completely avoiding self-illumination and
light bleeding, but largely removes artifacts from the injection stage.
Figure 5.7. Example of a VPL injection causing self-illumination of the thin geometry.
i
i
i
i
i
i
i
i
5. Diffuse Global Illumination with Temporally Coherent Light Propagation Volumes 191
5.4.1 Propagation
The propagation stage consists of several iterations, where every iteration repre-
sents one step of light propagation. The propagation stage has some similarity to
the SH discrete ordinate method [Chandrasekhar 50,Evans 98]. These techniques
are typically employed for light-propagation simulation in scattering media. Es-
sentially we use the same process; however, we use a different cell-to-cell prop-
agation scheme. The application of this method to light propagation through
vacuum instead of scattering media suffers from the fact that propagation direc-
tions are blurred out. Fortunately, our results show that this is an acceptable
artifact in many application scenarios.
Intensity propagation. The propagation consists of the following steps:
The input for the first iteration step is the initial LPV obtained from the
injection stage. Each cell stores the intensity as an SH-vector and we prop-
agate the energy to the six neighbors along the axial directions.
All subsequent propagation steps take the LPV from the previous iteration
as input and propagate as in the first iteration.
The main difference from SHDOM methods is the propagation scheme. In-
stead of transferring energy from a source cell to its 26 neighbor cells in a regular
grid, we propagate to its 6 neighbors only, thus reducing the memory footprint.
To preserve as much directional information as possible, we compute the transfer
to the faces of these neighbor cells and reproject the intensities to the cells’ cen-
ter (see Figure 5.8). This mimics, but is of course not identical to, the use of 30
unique propagation directions. Please see [Kaplanyan and Dachsbacher 10] for
the details. There are two ways to implement this propagation process: scatter-
ing and gathering light. The gathering scheme is more efficient in this case due
to its cache-friendliness.
Figure 5.8. Propagation from one source cell (center) to its neighbor cells. Note that
we compute the light propagation according to the intensity distribution I(ω) to all
yellow-tagged faces of the destination cells (blueish).
i
i
i
i
i
i
i
i
192 III Global Illumination Effects
Figure 5.9. Left: Light propagation from the source cell (gray) to the bottom face of
the destination cell (blueish). Right: during propagation we can account for occlusion
by looking up the blocking potential from the geometry volume.
When propagating the light from a source cell to one face of the destination
cell, we compute the incoming flux onto the face using the solid angle ω of the
face and the central direction ω
c
of the propagation cone (see Figure 5.9). The
flux reaching the face is then computed as
Φ
f
=
ω
4π
I(ω
c
),
where I(ω
c
) is the intensity of the source cell towards the center of face obtained
by evaluating the SH approximation. Here we assume that the intensity does not
vary over the solid angle of the face.
Reprojection. The flux incident on a face is then reprojected back into the in-
tensity distribution of the destination cell. The reprojection is accomplished by
creating a new virtual surfel at the destination cell’s center, pointing toward the
face and emitting exactly as much flux as the face received from the propaga-
tion
f
):
Φ
l
=
Z
Φ
f
hn
l
, ωi =
Φ
f
π
.
Similar to the light injection stage, the corresponding clamped cosine lobe is
scaled by Φ
l
and accumulated into SH coefficients of the destination cell. In
other words, we compute the incoming flux for each face of the destination cell
and transform it back into an intensity distribution.
Blocking for indirect shadows. Indirect shadows, i.e., the blocking of indirect light
due to scene geometry, can also be incorporated into the LPVs. In order to add
indirect shadows, we construct a volumetric representation of the scene’s surfaces
(see Section 5.4.2). This so-called geometry volume (GV) is a grid of the same
resolution as the LPV and stores the blocking potential (also represented as SH)
i
i
i
i
i
i
i
i
5. Diffuse Global Illumination with Temporally Coherent Light Propagation Volumes 193
for every grid cell. The GV is displaced by half the grid size with respect to
the LPV. That is, the cell centers of the GV reside on the corners of the LPV
cells. Whenever we propagate from a source to a destination cell, we obtain the
bilinearly interpolated SH coefficients—at the center of the face through which
we propagate—from the GV, and evaluate the blocking potential for the propa-
gation direction to attenuate the intensity. Note that this occlusion should not be
considered for the very first propagation step after injection, in order to prevent
immediate self-shadowing.
Iterations. The sum of all intermediate results is the final light distribution in the
scene. Thus we accumulate the results of every propagation in the LPV into a
separate 3D grid. The number of required iterations depends on the resolution
of the volume. We recommend using two times the longest dimension of the grid
(when not using a cascaded approach). For example, if the volume has dimensions
of 32 ×32 × 8, then the light can travel the whole volume in 64 iterations in the
worst case (which is a diagonal of the volume). However, when using a cascaded
approach it is typically sufficient to use a significantly lower number of iterations.
Illustrative example of light propagation process in the Cornell Box–like scene. The
light propagation is shown in Figure 5.10. The top-left image shows the coarse
LPV initialized from the RSM in the injection stage. The noticeable band of
reflected blue and red colors has a width of one cell of LPV. Note that after four
iterations the indirect light is propagated and touches the small white cube. After
eight iterations the indirect light has reached to the opposite wall.
Figure 5.10. Example of the light propagation process in a simple scene.
i
i
i
i
i
i
i
i
194 III Global Illumination Effects
Figure 5.11. Light from a small area light source (smaller than the cell size). The
analytical result shows the ground truth solution (left). The light propagation illustrates
the ray effect and an unwanted propagation behind the light source (right).
Limitations. The iterative propagation has three main limitations. First, the
coarse resolution of the grid does not capture fine details and might even cause
light bleeding. Second, due to the SH representation of the intensity distribution
and the propagation process itself, the light strongly diffuses and a strictly di-
rected light propagation is not possible. Consequently, there is also no reasonable
chance of handling glossy surfaces during propagation. Lastly, the propagation
together with the reprojection introduces spatial and directional discretization;
this is called the ray effect and is common to all lattice-based methods (see Fig-
ure 5.11). Note that some of these artifacts can be suppressed to an acceptable
level using cascaded grids to provide finer grids closer to the camera and smart
filtering when looking up the LPV.
5.4.2 Indirect Occlusion (Optional Step for Indirect Shadows)
The geometry volume storing the blocking potential of the scene geometry is
only required when computing indirect shadows. To this end, we again sample
the surfaces using RSMs (and deferred shading buffers, see below) and each texel
represents a small part of a surface. Using this sampled scene information, we
model the occlusion in the spirit of [Sillion 95], using the accumulated blocking
potential of surfels in a grid cell as a probability for blocking light from a certain
direction. In this way we can render soft shadows, but shadows of objects smaller
than the GV’s cell size can of course not be resolved.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.154.121