0% found this document useful (0 votes)
55 views14 pages

Real-Time Volume Rendering in Dynamic Lighting Environments Using Precomputed Photon Mapping

Volume rendering
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views14 pages

Real-Time Volume Rendering in Dynamic Lighting Environments Using Precomputed Photon Mapping

Volume rendering
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

JOURNAL OF LATEX CLASS FILES, VOL. 6, NO.

1, JANUARY 2007 1

Real-time Volume Rendering in Dynamic


Lighting Environments using Precomputed
Photon Mapping
Yubo Zhang, Student Member, IEEE, Zhao Dong, Member, IEEE, and Kwan-Liu Ma, Fellow, IEEE

Abstract—We present a framework for precomputed volume radiance transfer that achieves real-time rendering of global
illumination effects for volume datasets such as multiple scattering, volumetric shadows, etc. Our approach incorporates the
volumetric photon mapping method into the classical precomputed radiance transfer pipeline. We contribute several techniques
for light approximation, radiance transfer precomputation and real-time radiance estimation, which are essential to make the
approach practical and to achieve high frame rates. For light approximation, we propose a new discrete spherical function which
has better performance for construction and evaluation when compared with existing rotational invariant spherical functions such
as spherical harmonics and spherical radial basis functions. In addition, we present a fast splatting-based radiance transfer
precomputation method and an early-evaluation technique for real-time radiance estimation in the clustered PCA space. Our
techniques are validated through comprehensive evaluations and rendering tests. We also apply our rendering approach to
volume visualization.

Index Terms—Volume Rendering, Precomputed Radiance Transfer, Volume Ray Casting, Multiple Scattering, Volume Shadow.

1 I NTRODUCTION advanced shading techniques such as ambient occlusion and


Light traversing a volume usually undergoes absorption approximated scattering effects, the quality and accuracy
and scattering events. Before reaching the view point, the of the real-time methods cannot match the previously
radiance energy can scatter one time (i.e. single scattering mentioned offline rendering techniques. To achieve real-
(SS)) or multiple times (i.e. multiple scattering (MS)) time performance and high visual quality at the same time,
inside the volume. Following the definition of surface light a practical strategy is to introduce preprocessing.
transport, we can regard the shading from SS as the direct Recently, the precomputed radiance transfer (PRT) tech-
illumination and from MS as the indirect illumination or nique was developed for real-time surface rendering with
global illumination (GI) for the volume dataset. The volume GI effects including soft shadows and subsurface scatter-
GI effects can greatly enhance the visual perception of ing [3]. Its application for rendering surface meshes gives
the volume dataset. For example, global occlusion and promising results, so many extensions and improvements
shadow effects present better depth order information and have been made. However, most PRT-based research fo-
MS effects can also highlight the local thickness of the cuses on rendering surface meshes, and the design of
spatial structures given appropriate light settings. However, a general PRT framework for volume rendering has not
simulating all light transportation within volume including received much attention. The issues involved are lighting
absorption and scattering is time consuming. Therefore, approximation, volume radiance approximation, efficient
most existing methods for volume rendering have to strike precomputation of general volumetric effects, volume ra-
a balance between performance and quality. Great efforts diance compression, and sampling strategy during real-
have been made to accelerate the light simulation process time volume rendering. To achieve efficient precomputation
while preserving shading quality such as two-step radi- while maintaining volume GI effects, volumetric photon
ance estimation [1] and volumetric photon mapping [2]. mapping (VPM) [2] is a practical method to use. The major
Although they achieve high quality results, it is difficult challenges are the seamless incorporation of VPM into the
to achieve interactive frame rates with these techniques. precomputation stage with an appropriate photon casting
For comparison, classic volume ray casting with simple method and the determination of a fast radiance estimation
Phong shading can achieve real-time performance using strategy. We present a novel precomputed volume radiance
modern graphics processing units (GPUs). Still, even with transfer (PVRT) method to achieve successful integration
so that high-quality volume GI effects can be rendered
• Yubo Zhang and Kwan-Liu Ma are with the Department of Computer
in real-time (Fig.1). With PVRT, we introduce a photon
Science, University of California Davis, One Shields Avenue, Davis, casting method that generates all the photons at the volume
CA 95616. boundary. Each photon has varying energy and may also
E-mail: {ybzhang,klma}@ucdavis.edu
• Zhao Dong is with the Program of Computer Graphics at Cornell
carry negative energy. To estimate the radiance, we adopt
University, 588 Rhodes Hall, Cornell University, Ithaca, NY 14853. an efficient splatting-based radiance estimation method. We
E-mail:[email protected] also contribute a new discrete spherical function (DSF) for
lighting approximation. DSF achieves better quality than
JOURNAL OF LATEX CLASS FILES, VOL. 6, NO. 1, JANUARY 2007 2

the classic spherical harmonics (SH) basis function for ray marching is performed and at each step the stored
approximating high-frequency lighting, and unlike wavelet photons are gathered to compute the final radiance. This
basis functions, it is also rotationally invariant. In addition, final radiance gathering step can also be computed more
the interpolation property of DSF enables much faster efficiently by photon splatting [14]. The creation and main-
construction and evaluation when compared with spherical tenance of the hierarchical data structure prevents VPM
radial basis functions (SRBF) [4], while the approximation from achieving interactive performance. Even with a GPU-
quality is similar. To summarize, our contributions include: based kd-tree [15], rendering high-frequency volume caus-
• A novel DSF for light approximation, which is rota- tics with tens of millions of photons is still non-trivial. Our
tionally invariant, fast to construct and evaluate, and PVRT method also adopts photon tracing to simulate light
has the ability to approximate high-frequency lighting. transport, and efficiently precomputes the radiant exitance
• A PVRT method that successfully incorporates the for each voxel based on photon splatting.
VPM method into the PRT framework and achieves Basis Function in PRT In the precomputation stage,
efficient and general volume radiance estimation. PRT-based methods simulate complex light transfer and
• A comprehensive performance and quality evaluation approximate the radiance transfer using certain kinds of
of our approach. We also demonstrate its application in basis functions. Then, the radiant exitance can be approx-
interactive scientific and medical volume visualization. imately reconstructed by multiplying the coefficients of
The remainder of this paper is organized as follows. Sec.2 incident lighting and the radiance transfer matrix. Several
describes existing works and Sec.3 reviews the background functions have been successfully applied in PRT, such as
of light transport in participating media. After an overview SH [3], wavelets [16], [17], spherical radial basis functions
of the PVRT method in Sec.4. Sec.5 introduces the new (SRBF) [4], Gaussians [18], etc. Each of these functions
discrete spherical function (DSF) and its properties. Next, has its own pros and cons. The SH basis smoothly re-
Sec.6 and Sec.7 discuss the general procedure for incor- constructs low-frequency lighting effects very well and
porating the VPM technique into the PRT framework as can be freely rotated, but it cannot efficiently represent
well as the final rendering step. Several implementation high-frequency signals. The wavelet basis can represent
details are discussed in Sec.8. The experimental results and all-frequency effects with a small number of coefficients,
a comprehensive evaluation of our method are given in but its rotation is non-trivial and could introduce temporal
Sec.9. Finally, Sec.10 concludes the paper and introduces flickering due to nonlinear reconstruction. The SRBF can
plan for future works. reconstruct all-frequency effects and is easy to rotate, but
its precomputation cost is much higher than that of other
2 R ELATED W ORKS functions. To realize all-frequency rendering, we introduce
a novel discrete spherical function (DSF) that achieves
We refer readers to [5], [6] for a complete survey of volume similar quality to SRBF with much less precompuation.
GI rendering, and to [7], [8] for a comprehensive introduc-
tion of precomputed radiance transfer (PRT) methods. In Precomputation-based Volume GI Rendering Most
this section, we only cover the most relevant works. existing PRT-based methods deal with the light transfer
Offline Volume GI Rendering The rendering of volume between rigid surfaces, and recently some advanced tech-
GI effects is essentially the solution of the radiative transfer niques can additionally handle deformable scenes [19].
equation [9]. Kajiya and Von Herzen [1] presented a two- However, precomputation-based GI rendering for volume
pass ray tracing method. First, to estimate radiance for datasets has received far less attention. Wyman et al. [20]
each voxel, the radiative transfer equation is approximately introduced a method to precompute the GI using SH for
evaluated using spherical harmonics (SH). Thereafter, ray interactive rendering of isosurfaces extracted from volume
marching is performed along view rays to gather the final datasets. Their method supports direct lighting, volumetric
radiance. Since the MS inside the volume usually exhibits shadows and indirect lighting effects with interactively
low-frequency behavior, only the first few SH bases are changing viewpoints, lighting and isovalues. Still, the com-
necessary for generating visually convincing results. Af- plex scattering behavior inside the volume is ignored.
terwards, several methods have been proposed to compute Sharing the same motivation, Beason et al. [21] proposed
numerical solutions of the radiative transfer equation by an enhanced isosurface GI rendering method that further
using either ray tracing [10], [11] or radiosity [12]. These supports translucency and caustics, but this method is
solutions can render various volume GI effects, but the limited to static lighting. Ritschel [22] incorporated a GPU-
computational cost is enormous, so they can only run in based hierarchical visibility approximation into the precom-
offline mode. To improve performance, Stam [13] suggested putation to quickly compute the visibility inside the volume,
to approximate MS effects using the diffusion process, but it only handles low-frequency effects. In comparison,
which can be simulated by either a multi-grid scheme or a our PVRT method can generally support various volume GI
finite-element blob method. Nevertheless, the speed is still effects with few constraints for the input volume dataset.
far from interactive. Furthermore, the precomputation-based routine has also
The volumetric photon mapping (VPM) method [2] was been adopted in the offline rendering of the MS effect in
proposed to render volume caustics. In its first stage, hair [23].
photons are traced through the volume and stored into Real-time Volume GI Rendering Kaplanyan et al. [24]
a hierarchical data structure, like a kd-tree. Afterward, developed a cascaded light propagation volume (LPV)
JOURNAL OF LATEX CLASS FILES, VOL. 6, NO. 1, JANUARY 2007 3

(a) Smoke Plume, 300 × 300 × (b) Bone, 512 × 512 × 512, 40fps (c) Smoke Wall, 400 × 300 × 100, (d) Machine Room, 417 × 345 ×
150, 45fps 42fps 60, 47fps
Fig. 1. Examples of real-time rendering including volume GI effects using the PVRT method.

method to approximate indirect lighting very efficiently, Radiance GPU


Transfer Volume
which can further be extended to render SS effects in Estimation Rendering
volumetric media. However, the LPV method only supports
low-frequency effects in coarse resolution volumes, and it Volume Data ... Radiance Result
Transfer
is non-trivial to support complex lighting with this method. Basis Lighting Local & Environment
For optically thick media, like smoke, the MS effect, Lighting

which is much more costly compared with SS, dominates Fig. 2. The pipeline of the PVRT method for rendering
the overall appearance. Recently, Engelhardt et al. [25] multiple scattering.
suggested to create a set of virtual point lights (VPLs)
within the medium and combine the SS contributions from p A 3d point within medium
all VPLs to render MS in real-time. Unfortunately, the pin ,pout Entry/Exit point in medium
limited number of VPLs usually leads to low-frequency x A 3d point
effects. Several GPU-accelerated approaches [26], [27] have ωi , ωo Incident, outgoing radiance direction
been proposed to render high-quality volumetric smoke S Sphere of directions
under low-frequency environment light. For comparison, D(p) Volume density field at p
our PVRT method can render the MS effect under an all- κs (p) Scattering coefficient
frequency environment light in real-time. κa (p) Absorption coefficient
κt (p) Extinction coefficient
Ω(p) Albedo of participating medium
τ (p, x) Transmittance from u to x
τ∞ (p, ω) Transmittance from infinity to x
f (u, ωo , ωi ) scattering phase function at u
Hernell et al. [28] presented an efficient method to Lin (ω) Incoming radiance from light source
compute ambient and emissive tissue illumination, which Lout (x, ω) Outgoing radiance arriving at x
exploits ray casting to determine ambient illumination, and Lri (x, ω) Reduced incident radiance
adopts a multi-resolution volume to speed up rendering. Lm (x, ω) Media radiance
Similarly, to render simple scattering and ambient occlusion J(x, ω) Scattered radiance
for isosurfaces, a GPU-based Monte Carlo ray casting Lre (ω) Radiance exitance function
method was proposed in [29]. When compared with these T Radiant exitance matrix
methods, our PVRT method is superior in its support
for complex scattering, especially MS effects, for general Fig. 3. Nomenclature
volume data formats under complex lighting conditions.
Kniss et al. [30] proposed a shading model to interac-
tively render volumes, which generates volumetric shad- 3 R ADIANCE T RANSPORT IN VOLUMETRIC
ows and forward scattering through translucent materials. M EDIA
Ropinski et al. [31] presented a physically more accurate
optical model for volume rendering, which incorporates Before the introduction of our PVRT method, we briefly
scattering, shadowing and specular reflections. However, review radiance transport in volumetric media. Following
applying these volume shading models to handle complex the definition in [5], the radiance quantities that we use
environmental lighting and general scattering effects is non- are listed in the table of Fig.3. The input volume data
trivial. To render high-quality volume shadows, Kronander is modeled as a sequence of volumetric density fields.
et al. [32] presented a method which encodes local and Regular mesh grids are used to store the volumetric density
global volumetric visibility into an efficient multi-resolution field at cell centers. Considering a 3D position p in the
grid over the extent of the volume to achieve real-time volumetric media (shown in Fig.4), we represent the volume
performance. Compared with it, our PVRT method can density field of p at each frame as D(p), the absorption
generate various volume GI effects, not just shadow, in real- coefficient as κa (p), the scattering coefficient as κs (p), the
time. extinction coefficient as κt (p) = κa (p) + κs (p), and the
JOURNAL OF LATEX CLASS FILES, VOL. 6, NO. 1, JANUARY 2007 4

scattering albedo as Ω(p) = κκst (p)


(p)
. Our method supports and Jss (p, ωo ) together contribute to the direct illumination
both environmental and local directional lighting. We use effects for the volume.
Lin to represent the incident radiance from the light source. The MS term Jms represents the radiance that has been
Fig.4 illustrates the radiance transport in volumetric bounced more than one time before arriving at p, which
media under environmental lighting. For view point x, the accounts for the global illumination (GI) effects. In Fig.4,
radiance reaching x along direction ωo is composed of the red arrows represent the incident media radiance Lm
two parts: the reduced incident radiance Lri and the media contributed from MS:
radiance Lm : ∫
Ω(p)
Jms (p, ωo ) = Lm (p, ωi )f (p, ωo , ωi )dωi (6)
Lout (x, ωo ) = Lri (x, ωo ) + Lm (x, ωo ) (1) 4π S
Similarly to surface shading, the computation of GI effects
The reduced incident radiance Lri (x, ωo ) describes the
is much more time-consuming when compared with direct
source illumination Lin (ωo ) that arrives directly at x along
illumination, so MS always becomes the bottleneck of the
direction ωo with some attenuation by the medium:
volume GI rendering.
Lri (x, ωo ) = τ∞ (x, ωo )Lin (ωo ) (2) Algorithm 1 Pseudocode of the PVRT method
where τ∞ (x, ωo ) is the transmittance from infinite light- 1 Define final view radiance Lout = 0
2 Precomputation:
ing to x along∫ the direction ωo , that can be com- 3 Approximate the lighting using certain basis (SH or DSF).

puted as exp(− x ωo κt (u)D(u)du). The media radiance 4 FOR each basis light:
5 Part1: Direct illumination
6 Sample Ns directions uniformly.
7 FOR each voxel:
8 Accumulate Lri (Eq.2) from each direction.
9 Compute radiant exitance vector.
10 ENDFOR
11 Part2: Global illumination
12 Trace photons through volume grids.
13 Splat absorbed photon’s energy into neighbor voxels.
14 FOR each voxel:
15 Accumulate the photon’s energy.
16 Compute radiant exitance vector.
17 ENDFOR
18 ENDFOR
19 Compress the radiant exitance matrices of all voxels using CPCA.
Fig. 4. Illustration of the radiance transport in volumet- 20 Rendering:
ric media. 21 Project the current lightings into basis space.
Lm (x, ωo ) represents the radiance energy that has scattered 22 FOR each CPCA cluster:
23 FOR each basis transfer matrix:
one or multiple times in the medium before arriving at 24 Compute view-dependent radiance.
x along the direction ωo . It is computed by integrating 25 ENDFOR
radiance contributions along the view ray: 26 ENDFOR
∫ pout 27 Reconstruct and store radiance volume.
Lm (x, ωo ) = τ (p, x)κt (p)D(p)J(p, ωo )dp (3) 28 GPU-based ray marching to evaluate Lout .
pin

where source radiance J(p, ωo ) represents the light that


scatters at point p toward direction ωo . In usual non- 4 A LGORITHM OVERVIEW
emissive media, such as smoke, fog, etc., this source Like PRT, the PVRT method includes a precomputation
radiance consists of a single scattering (SS) term Jss and stage and a rendering stage, as shown in Algorithm 1.
a multiple scattering (MS) term Jms : Precomputation The precomputation stage is involved
with both direct and global illumination. To achieve effi-
J(p, ωo ) = Jss (p, ωo ) + Jms (p, ωo ) (4)
cient volume GI effects, one of our contributions is the
As shown in Fig.4, the SS term Jss represents the reduced seamless integration of the VPM method [2] into the
incident radiance Lri whose first scattering interaction in precomputation stage, including photon traversal through
the medium occurs at p: the volume as well as the evaluation and compression of
∫ the radiance transfer matrices for each voxel. To achieve
Ω(p)
Jss (p, ωo ) = Lri (p, ωi )f (p, ωo , ωi )dωi (5) this goal, there exist three major challenges in the precom-
4π S putation stage.
where f (p, ωo , ωi ) is the phase function that defines the The first challenge is the selection of the basis func-
scattering distribution of the current media, and S represents tions for representing radiance from high-frequency in-
the set of different incident directions ωi that distributes on cident lighting. As aforementioned, SH can only handle
the local sphere centered at p. Same as Eq.2, Lri (p, ωi ) can low-frequency lighting. To approximate higher frequency
be computed as τ∞ (p, ωi )Lin (ωi ). Notice that Lri (x, ωo ) lighting, spherical wavelet basis functions (SWBFs) [17]
can also be regarded as a special SS case. The Lri (x, ωo ) or spherical radial basis functions (SRBFs) [4] are good
JOURNAL OF LATEX CLASS FILES, VOL. 6, NO. 1, JANUARY 2007 5

candidates. However, both have disadvantages as well. The each sample requires the processing of hundreds of vari-
SWBFs are not rotationally invariant, which prevents fast ables. For example, if we use 6th order SH for irradiance
rotation of the basis functions. The SRBFs can be freely and 4th order SH for radiant exitance, the size of the
rotated but their construction and evaluation are quite slow radiance transfer matrix is 36 × 16 = 576 and the size of
because the SRBFs do not have the interpolation property the light vector is 36. Then we need to perform a matrix-
and local support. The interpolation property means the vector multiplication of this size for each sample and it
coefficients are equal to the spherical function values at is impossible to evaluate it in real-time for all voxels.
the sampling directions, so that reconstructing the spherical Therefore, we introduce an early-evaluation technique to
function can be rapidly achieved by interpolation. The significantly reduce the rendering cost. It is achieved by
basis functions with local support ensure that only a small using clustered PCA for transfer matrix compression and
number of coefficients are needed for evaluation of the reducing the compressed basis transfer matrices into scalar
spherical function at arbitrary directions. To fulfill these values based on view and lighting changes before decom-
properties, we introduced a new discrete spherical function pression. The technical details are presented in Sec.7.
(DSF) that is rotationally invariant, interpolation-based and In general, as shown in Fig.2, the PVRT method ap-
also has locally supported basis functions. The DSF can proximates the lighting using a set of basis lights and
achieve similar accuracy to the SRBFs for approximating each basis light corresponds to a basis function. During
high-frequency environment light. the precomputation stage, aided by the VPM technique,
The second challenge is how to cast photons. Photon the radiance transfer estimation is performed to compute
casting is simple if all the light sources and geometries the radiant exitance for each voxel. To save storage and
are clearly defined. However, in the PRT pipeline, the improve performance, we further compress the radiant
lighting environment is approximated using a set of basis exitance data for the whole volume. Thereafter, during the
functions, such as SH and DSF. The values of these basis rendering stage, the precomputed radiant exitance data is
functions are distributed nonuniformly and the values can efficiently decompressed and used to compute the final
be either positive or negative. Therefore, we must design view-dependent radiance for each voxel. The PVRT method
a general photon casting scheme for different types of supports both environment light and directional light.
basis functions. To generate photons with correct energy
distributions, instead of casting photons from distant planes 5 D ISCRETE S PHERICAL F UNCTION
facing random directions with direction-dependent casting Before introducing the PVRT method, we first present
rate, we cast photons from the boundary surface of the the discrete spherical function (DSF) that has both the
volume and each photon has a random direction and also a interpolation property and local support.
direction-dependent energy value. This assures that all the 1.5

generated photons will go into the volume and the energy


distributions will converge to the spherical basis functions 1

faster than a normal implementation. Such a photon casting


Wh

strategy has been tested and worked well for both SH and 0.5

DSF.
Another challenge is the efficient radiance transfer es- 0
−1.5 −1 −0.5 0 0.5 1 1.5
θ

timation using VPM. For classic PRT rendering, we can


directly integrate the incident radiance on the surface over Fig. 5. Illustration of the discrete spherical function.
a hemisphere using backward ray tracing. Since photon
mapping is a forward light tracing technique, a photon 5.1 Definition
gathering step is required during the radiance estimation
We sample a set of uniformly distributed directions Ω =
within the volume. If using an unmodified VPM that stores
ω1 , ω2 , . . . , ωn over a unit sphere using icosahedral mesh
the photons inside a kd-tree, the computational cost for
subdivision, as shown in Fig.5. Using sk to represent the
approximating the volume radiance transfer is extremely
sampled value at direction ωk , the DSF for an arbitrary
high. This is because the spherical numerical integrations
direction ω is defined as:
for all pairs of irradiance and radiant exitance basis func-
tions have to be considered. Moreover, sampling photons ∑n
W (ω, ωk ) ∑
n
S(ω) = ∑n h sk = w̄k (ω)sk (7)
from the kd-tree is difficult to parallelize and memory i=1 Wh (ω, ωi )
k=1 k=1
efficiency is low. To address such a situation, we introduce a
fast splatting-based radiance transfer estimation technique, where w̄k (ω) is the DSF basis function, which represents
wherein each photon’s energy is splatted and accumulated a normalized weight. Wh (ωi , ωj ) is a symmetric kernel
into its neighbor voxels for further numerical integration. function, and it is defined as:
{
Rendering To achieve real-time volume rendering, there (h2 − |θij |2 )3 , |θij | < h
are also some technical challenges. Volume rendering usu- Wh (ωi , ωj ) = (8)
0, |θij | ≥ h
ally demands lots of samples along the rays, which is fast
for simple scalar fields or low-dimensional vector fields. Where θij = cos−1 (ωi · ωj ) is the angle between any two
However, combined with the PRT framework, evaluating directions ωi and ωj . h is defined as h = mini,j θki kj ,
JOURNAL OF LATEX CLASS FILES, VOL. 6, NO. 1, JANUARY 2007 6

which is the minimum angular distance between any pair compute the corresponding coefficient for each basis. With
of sampled directions ωki and ωkj in Ω. As shown in Fig.5, these coefficients, afterward we can reconstruct the value of
h can be regarded as the radius of the local impact region the lighting function at arbitrary directions by evaluating the
of each sampled direction. The definition of Wh follows the basis functions. Comparing the reconstructed value with the
kernel definition in smoothed particle hydrodynamics [33], original value can help us verify the accuracy of the lighting
which is widely applied for fluid simulation. Compared approximation. We perform such a lighting reconstruction
with the Gaussian kernel, it has been proven to be more experiment [16] to test the DSF.
efficient for evaluation and has compact support in local
region.
With such a definition, the kernel function Wh has the
following properties:
• Local Support
{
> 0, θij < h
Wh (ωi , ωj )
= 0, θij ≥ h
As shown in Fig.5, Wh provides compact support in
local region.
• Monotonicity
dWh (ωi , ωj )
≤0
dθij
(a) Input EM (b) 162, 13.2% (c) 642, 8.9% (d) 2562, 7.3%
• Interpolation Based on the definition of h, if we pick Fig. 6. Comparison of the approximation accuracy
up any two sampled directions ωki and ωkj in Ω, then using different number DSF bases for a synthetic high-
{
frequency EM (a). The 1st row lists the reconstruction
1, ki = kj
Wh (ωki , ωkj ) = results, and the 2nd row shows the approximation er-
0, ki ̸= kj rors (’red’ and ’blue’ represent the positive and negative
Therefore, Wh guarantees that when ω = ωk , S(ωk ) = values, respectively.). The number of DSF bases and
sk and the DSF function can recover the sampled orig- L2 errors are given for (b) (c) and (d).
nal value. When ω is located between several samples, The initial directional sampling of the DSF is based on
as shown in Fig.5, its value is the interpolation of its icosahedral mesh generation, and the number of samples
neighbor samples (inside red dot circle) weighted by over the sphere Ω can be 42, 162, 642, 2562 . . . depending
Wh . on the order of icosahedral subdivision. To select the
Eq.7 actually represents the reconstruction of the spher- optimal number of the DSF bases to achieve a good
ical function using DSF and sk can be regarded as the balance between approximation quality and performance,
corresponding coefficients for the DSF bases. For other we reconstruct a synthetic high-frequency “checkerboard”
bases, such as SH and SRBF, computing the coefficients environment map (EM) with different numbers of DSF
is a process of projecting the spherical function onto basis bases and compare the results using standard L2 errors
space and such a projection step is usually time-consuming. between the pixels in the original cube map and the
However, for the DSF sk is just a sampling of the spherical pixels in the reconstructed one. As shown in Fig.6, the
function, so the projection step is very efficient. Actually reconstruction quality essentially improves by increasing
computing sk is not a simple point sampling, and to the number of DSF bases. Notice that using 2562 bases
balance the frequency between the spherical function and rather than 642 bases only improves quality by a factor of
the DSF we introduce a prefiltering step for the spherical 1.6%, but multiplies the total number of basis lights by four.
function which will be discussed in Sec.8. Relying on the Therefore, we choose the optimal number of DSF bases to
local support property of DSF, the evaluation of Eq.7 for be 642.
To compare the approximation quality between the DSF
arbitrary directions can be efficiently computed because
and other existing bases, in Fig.7, we test the lighting
only a limited number of bases need to be considered.
reconstruction for both synthetic and real EM lights using
The definition of the DSF basis w̄k (ω) is a normalized
different bases with a similar number of basis functions.
weight for local interpolation, so w̄k (ω) is invariant during
Clearly, DSF can achieve the best approximation quality
the rotation of the spherical function. Therefore, when
with lowest L2 error. To verify the high-frequency render-
rotating the environment light, we only need to rotate the
ing effects using different bases, in Fig.8 we test the shadow
prefiltered environment light and sample it again to get the
effects under directional light. It is obvious that using a
new coefficient sk , which is simple and efficient.
low-frequency SH basis misses the high-frequency shadow
details and the ringing artifacts of SH darken the whole
5.2 Lighting Approximation Using DSF scene. Both DSF and SRBF achieve good high-frequency
To approximate the lighting using this basis function, we shadow effects.
project the original lighting function onto basis space and The statistical results in our experiments show that
JOURNAL OF LATEX CLASS FILES, VOL. 6, NO. 1, JANUARY 2007 7

for the projection step. The DSF performs very efficiently


for both steps because its interpolation property and local
support ensure fast light projection and evaluation.

6 P RECOMPUTING R ADIANT E XITANCE


In this section, we describe the precomputation stage of
(a) Synthetic (b) 11.7% (c) 9.4% (d) 8.9% the PVRT method in detail. Since the environment light is
more challenging, we use it for explaining the algorithmic
steps.

6.1 Radiance and Lighting Approximation


As described in [3], a low-frequency spherical function can
be approximated using sth order spherical harmonics
(e) Grace (f) 12.94% (g) 9.5% (h) 9.33% ∑
s−1 ∑
l
L(ωi ) = ctl Ylt (ωi ) (9)
l=0 t=−l

where Ylt are the orthogonal real spherical harmonics (SH)


basis functions and ctl are their corresponding coefficients.
The radiant exitance of each voxel is actually a 2D spherical
function that has a corresponding value for each direction
over the unit sphere based on the phase function within
(i) Galileo (j) 12.2% (k) 10.6% (l) 9.4% the current voxel. Arbitrary phase functions are supported
for computing radiant exitance in our method. However,
storing the radiant exitance values can be challenging.
Based on the fact that multiple scattering (MS) inside the
volume exhibits low-frequency behavior [1], we choose
the SH basis to approximate the 2D spherical function
of the radiant exitance for each voxel. Depending on the
current phase function, the selected order of SH varies.
(m) Uffizi (n) 10.9% (o) 10.2% (p) 10.1% Following [26], we adopt 1st order SH for the isotropic
Fig. 7. Comparison of the approximation results for phase function and 4 − 6th order SH for the anisotropic
the synthetic (a) and real EMs (e,i,m). The 2nd column phase function.
uses the 26th order SH with 676 coefficients, the 3rd The low-frequency environment light can also be well
column uses SRBF with 642 coefficients, and the 4th approximated using the low order SH (i.e. l ≤ 6) ba-
column uses DSF with 642 coefficients. The L2 errors sis [3]. For the high-frequency environment light we use
are given for all the reconstructed results. the aforementioned DSF for lighting approximation, and
the radiance from arbitrary direction ωi can be represented
as
∑n
L(ωi ) = w̄k (ωi )sk (10)
k=1

where w̄k (ωi ) is the DSF basis function and sk is the


(a) SH,676 (b) SRBF,642 (c) DSF,642 radiance value at the kth pre-sampled direction. After the
approximation, the environment light is converted into a set
Fig. 8. Comparison of the shadow reconstruction
of basis lights, and each basis light can be treated as distant
accuracy using different bases.
spherical lighting.

dealing with an arbitrary EM light with size 6 × 256 × 256, 6.2 Direct Illumination
for each SH, SRBF and DSF basis, the average timing of For direct illumination, the incident energy for each voxel
the projection step is 539ms, 91ms, 2ms, respectively, and is just the reduced radiance Lri (Eq.2), so photon tracing is
the average timing of evaluation for an arbitrary direction unnecessary for its precomputation. For a voxel at position
is 0.369ms, 0.059ms, 0.013ms, respectively. It is clear that p, when using the SH or DSF basis to approximate incident
SH is the most time-consuming basis for both projection lighting, the incident reduced radiance in ωi from each basis
and evaluation, and hence normally we should not use many light can be computed as Lri (p, ωi ) = τ∞ (p, ωi )Ylm (ωi )
SH bases to approximate high-frequency functions. SRBF or Lri (p, ωi ) = τ∞ (p, ωi )w̄k (ωi ). In the precomputation
computation involves numerical integration [4], and there- stage, for each basis light we uniformly sample Ns di-
fore its time cost is much higher than the DSF, especially rections either over a unit sphere (for SH) or inside a
JOURNAL OF LATEX CLASS FILES, VOL. 6, NO. 1, JANUARY 2007 8

small solid angle around the current basis light (for DSF). with high-frequency lighting, rather than distributing pho-
Considering all the Lri s from Ns directions, each Lri is ton’s direction ω over the whole unit sphere, we may restrict
multiplied with the phase function value at the current the ω inside a small differential solid angle for each DSF
voxel position to get the radiant exitance Lre . As mentioned basis light. Therefore, although the number of DSF bases
above, Lre , which is a 2D spherical function, is non-trivial is usually much higher than the number of SH bases, much
to store directly. Therefore, we use SH to approximate fewer photons are actually needed for each DSF basis light.
Lre with good accuracy. For each basis light, the radiant
exitance of each voxel can thus be approximated and stored 6.3.2 Volumetric Photon Tracing
as a vector. After processing all basis lights, the radiant Starting from the boundary voxel, the photons travel
exitance of each voxel finally forms a radiant exitance through the volume with a pre-defined step size. At each
matrix. Methods for determining the value of Ns will be step, a photon can either pass unaffected through the
discussed in Sec.8. medium inside current voxel, or be scattered or absorbed.
We choose the side length of the voxel ∆l as step size for
6.3 Global Illumination using VPM photon propagation so that the maximum number of poten-
In this section, we focus on how to address the second tial steps matches the volume resolution. The probability
and third challenges that are mentioned in Sec.4 for the of an absorption or scattering event occurring at point p is
seamless incorporation of the VPM method into the PRT integrated along the photon path from the entry point pin
framework and the achievement of efficient precomputation to p:
{ ∫ p }
for the rendering of volume GI effects.
P (p) = 1 − exp − (σa + σs )ρ(x)dx (13)
pin
6.3.1 Volume Photon Sampling under Spherical
Lighting where ρ is the density field function for volume media,
As is the case for the standard VPM method, the first step which is often obtained from the original volume data
is to generate the photons for each basis light. Our basic through a user-defined mapping. σa and σs are absorption
idea is to cast photons at the boundary cells (voxels) of and scattering coefficients, respectively. When a random
the volume with varying flux energy for each photon. The number 0 ≤ X ≤ 1 satisfies X ≤ P , Russian Roulette is
photon generation fulfills the following requirements: (1) used to determine whether it is an absorption or scattering
the initial directions of all the generated photons in each event based on the probability values σa /(σa + σs ) and
boundary voxel are uniformly distributed on the unit sphere, σs /(σa + σs ). The new scattering direction of a photon
and (2) each photon’s energy is proportional to the radiance is chosen using importance sampling based on the phase
from the basis light in the photon’s direction. As shown in function within the current voxel [2], and arbitrary phase
functions can be supported in our method.

6.3.3 Photon Splatting for Radiance Estimation


To avoid creating a hierarchical data structure to store
photons [2], rather than gathering neighbor photons’ energy
for each voxel, the PVRT method chooses to splat each
photon’s energy into its neighbor voxels [14]. For an
absorbed photon p with direction ω, its energy Φp (ω)
Fig. 9. Illustration of the volume photon sampling. (Eq.11 or 12) is splatted into the photon’s neighbor voxels
Fig.9, for each boundary voxel in the volume we generate weighted by the distance between the photon and voxel.
k photons from the boundary surfaces of the voxel. Each Such a splatting process has an equivalent effect to the
photon starts from a random position over the boundary standard gathering process [2]. To ensure both efficient
surface and has a random direction ω that is uniformly evaluation and compact support in local regions, again we
distributed over the sphere. For each photon under SH basis adopt the polynomial kernel [33] as the weighting function:
light Ylt , the flux energy is: {
9 (h − |d| ) , |d| < h
315 2 2 3
W (d) = 64πh (14)
Φ(ω) = Ylt (ω)∆l2 (ω · n)dω (11) 0, |d| >= h
where ∆l and n are the side length and the outward normal where d is the distance between the voxel and the photon
of the boundary voxel, respectively. For each DSF basis p. h = c∆l is the kernel radius that is set based on the grid
light w̄k , the flux energy of each photon is: resolution, and c is a user-defined constant (e.g. c = 4).
After the splatting, we compute the radiant exitance
Φ(ω) = w̄k (ω)∆l2 (ω · n)dω (12)
for each neighbor voxel based on its phase function
Some of the generated photons may immediately exit the f (x, ωo , ωi ). With the weighted photon energy W (d)Φp (ω)
volume region. Such photons are discarded before further and photon’s direction ω, the radiant exitance of each
computation. It is obvious that the number of generated neighbor voxel can be represented as Lpre (ωo ) =
photons increases as the resolution of volume data in- W (d)Φp (ω)f (x, ωo , ω). After processing all the photons,
creases. To reduce the number of photons when dealing the final radiant exitance of each voxel is Lre (ωo ) =
JOURNAL OF LATEX CLASS FILES, VOL. 6, NO. 1, JANUARY 2007 9


Q
cluster index k and N = 4 PCA floating point coefficients.
W (d)Φp (ω)f (x, ωo , ω), where Q is the number of the
p=0 For each matrix cluster, we also store the mean matrix
neighboring photons. Again, we use SH to approximate Tmean and N = 4 basis matrices. Overall, such a strategy
Lre (ωo ) and the radiant exitance of each voxel is approx- saves lots of storage and also ensures real-time performance
imated and stored as a vector. With the radiant exitance for further radiance estimation in the ray casting step. The
for each voxel, we can evaluate the incident radiance for accuracy of our compression strategy is discussed in Sec.9.
arbitrary view rays in the subsequent volume ray casting
process. 7 R EAL - TIME VOLUME R ENDERING
The major steps in the real-time rendering stage consist
6.4 The Radiant Exitance Matrix and Its Compres- of (1) view-dependent volume radiance estimation, and (2)
sion volume ray casting. All the operations in the rendering stage
For each voxel, the radiant exitance under each basis light can be efficiently performed on the GPU.
is represented as a vector with length n. After processing
m basis lights, the radiant exitance from all the basis 7.1 Lighting Approximation
lights forms a m × n matrix T , called the radiant exitance
Incident lighting is projected into basis function space,
matrix, which can be regarded as a linear transformation
either SH or DSF, and can be represented as a vector of
that transforms the input lighting vector Lin into final
projection coefficients Lin . This is a standard step in PRT-
radiant exitance vector Ie :
based methods and is performed in each frame.
Ie = T Lin (15)
Here the length of Lin and Ie is m and n, respectively, 7.2 View-dependent Volume Radiance Estimation
which represent the number of used bases. Computing T After updating the lighting environment, in each cluster k,
for each voxel is the major task during the precomputation we multiply the new light coefficient vector Lin to the mean
k
stage. If using a 6th order SH for the environment light matrix Tmean as well as all the basis transfer matrices Tik .
and a 4th order SH for the anisotropic phase function (i.e. ∑
N
m = 36 and n = 16 ), the dimension of T will be 36 × 16. k
Imean k
= Tmean Lin Iik = Tik Lin (18)
Storing a 36 × 16 matrix for each voxel is impractical, so i=1
we need to further compress the precomputated data. k
where Imean and Iik represent the transferred mean and
We adopt the clustered principal component analysis
basis radiant exitance vector of the kth cluster, respectively.
(CPCA) method [34] to achieve further compression. All
The final radiance vector Ie at voxel t can be recovered by:
the matrices of the voxels are first clustered in signal space
using vector quantization. Note that empty voxels with zero ∑
N
k
density gradients are excluded from the clustering and zero Ie = Imean + wit Iik (19)
weights are assigned directly. The total number of clusters i=1
are adjustable by compromising between quality and speed, where wit is the PCA coefficients for voxel t. The straight-
and a relatively optimal cluster number is 128 based on forward strategy is to store the Ie for each voxel for further
our experiments (Sec.9). Thereafter, within each cluster, the radiance estimation. However, Ie is a vector of length n and
standard principal component analysis (PCA) is performed directly saving it for all voxels requires n × Sizevolume
to compute the mean matrix, the set of the basis matrices GPU memory, which is costly. Furthermore, evaluating
and the set of corresponding coefficients for each voxel’s Eq.19 is also inefficient for all the voxels in each frame.
radiant exitance matrix. Using CPCA, the transfer matrix Notice that in each frame the current view info is known
T at a certain voxel t can be approximated through before volume ray casting. As shown in Line 22 − 26 in

N Algorithm 1, for the kth cluster we can first compute the
T ≈ Tmean
k
+ wit Tik (16) view-dependent radiance value LkV for Imeank
and each Iik ,
i=1 respectively, by evaluating the basis functions with the view
direction. When using the SH basis, IVk is computed as
where k is the index of the cluster that t belongs to, Tmean
(using Eq.9):
is the mean matrix of the kth cluster, Tik is the ith PCA
basis matrix, and wit is the corresponding coefficient. N ∑
s−1 ∑
l
is the number of PCA basis transfer matrices, and our LkV = Il(l+1)+t+1 Ylt (ωx→xV ) (20)
experiments demonstrate that N = 4 works well in most l=0 t=−l
cases (Sec.9). Putting Eq.16 into Eq.15, the linear radiance when using DSF basis, it is computed as (using Eq.10):
transformation at each voxel is approximated as:

n


N LkV = w̄k (ωx→xV )sk (21)
Ie ≈ (Tmean
k
+ wik Tik )Lin . (17) k=1
i=1 where x → xV is a unit vector from voxel position x to
After the CPCA compression, the storage of the precom- current view point xV . Thereafter, for each voxel, its view-
putation results of each voxel includes only one integer dependent radiance value LV can be efficiently computed
JOURNAL OF LATEX CLASS FILES, VOL. 6, NO. 1, JANUARY 2007 10

as the linear combination of the LkV s weighted by the PCA 8.3 Number of Photons for Each Voxel
coefficients of current voxel. With such an early-evaluation In the PVRT method, the photons are emitted from bound-
strategy, we only need to save one floating point value for ary voxels and the number of photons per voxel NP is
each voxel, and the storage for all the voxels is reduced to controlled by the user. NP affects the rendering quality
be just one additional radiance volume texture. and it scales well as the resolution of the input volume
dataset changes. For example, if we set NP to be 100, a
1003 volume would cast 6 × 1003 = 6 million photons
7.3 Volume Ray Casting in total because there are only 6 × 1002 boundary voxels.
The aforementioned radiance estimation for each voxel As discussed in Sec.6.3.1, when using DSF NP is much
leads to a very simple ray casting stage. The traditional smaller compared with using SH. Based on our experimen-
GPU-based volume ray casting method [35] can be applied tal results, we found that NP = 10 and NP = 100 achieve
to render the volume data. In addition, we just need to a good balance between quality and speed for DSF and SH,
sample the radiance LV from the radiance volume texture respectively. More results and discussions will be shown in
at each sampling point along the ray. Sec. 9.

8.4 Performance Optimizations


8 I MPLEMENTATION There are several performance optimization strategies: (1)
In this section, we will discuss several issues and the cor- When computing direct illumination during precomputa-
responding solution strategies we use for implementation. tion, each voxel marches Ns = 642 rays through the
volume to gather incident lighting. If the volume resolution
is 5123 , the total number of ray samplings will be 86
8.1 Environment Map Prefiltering for DSF billion. To accelerate this process, we skip all the empty
voxels (D(p) ≤ 0). Also, a ray is terminated early if a high
We adopt 642 DSF bases to approximate the high-frequency cumulative density is reached during its marching proce-
lighting. However, the size of input EM usually contains dure. (2) We use pre-calculated lookup tables to store SH
more than 642 pixels. For example, a standard EM might basis function values instead of evaluating them at runtime,
have 6 × 256 × 256 pixels. Sampling 642 values discretely which greatly accelerates the photon splatting operation and
from the EM will probably miss important lighting energy, radiance integration. (3) In the precomputation stage, the
especially for high-frequency lighting. Therefore, to match computation for different basis lights and different photons
the frequency between the EM and DSF, we introduce a is highly independent. Therefore, it is easy to parallelize the
prefiltering step for the EM. The directions of DSF bases computation of each individual case (i.e. certain basis light)
are uniformally distributed over the sphere (Fig.5), and using the evolving many-core hardware. Our CUDA-based
since each EM pixel corresponds to a direction, we can parallel implementation for precomputation achieves more
map the DSF basis direction to the pixels in EM. To ensure than two orders of magnitude speed improvement over the
the prefiltering results cover the whole spherical domain, single-threaded CPU implementation.
we choose a spherical Gaussian with bandwidth equal to
minimum angular distance h (defined in Eq.8). To perform
the prefiltering, we use an image space Gaussian centered 8.5 System Integration
at the pixel corresponding to the DSF basis direction with It is easy to integrate our method into existing rendering
the bandwidth computed by mapping h into image space. frameworks. Our renderer consists of two modules includ-
The prefiltering step can be computed in real-time. After ing a preprocessor and a real-time renderer. The preproces-
the prefiltering, each pixel value in the prefiltered EM is sor is called once, which takes the density volume together
a coefficient for a DSF basis. The prefiltering step only with several parameters as input and outputs the volume
needs to be performed once unless the content of input EM radiance transfer data. Then the real-time renderer takes
changes (e.g. video EM). When rotating the EM lighting, the volume data, the volume radiance transfer data as well
we just need to rotate the prefiltered EM and then sample as other rendering parameters as input and outputs the final
it directly to get the new coefficients after rotation. image. In our implementation, we fit our renderer into an
OpenGL-based application framework and created several
graphics user interfaces for adjusting the parameters.
8.2 Directional Light
It is well known that the directional light can be easily 9 R ESULTS AND D ISCUSSIONS
represented by the SH bases evaluated at the light direction. In this section, we report on the accuracy and performance
Approximating the local directional light using DSF, we of the PVRT method. Further, we compare the results of our
only need to find the three nearest DSF directions for method with the references generated by the VPM [2]. Our
the current light direction based on angular distance, and method is implemented in OpenGL and CUDA [36]. All
compute three corresponding weights using barycentric in- results were rendered on a laptop equipped with an Intel⃝R

⃝R
terpolation. Then, the directional light can be approximated i7 740QM 1.73GHz CPU, an NVIDIA Geforce GTX
by the linear combination of the three DSF basis lights. 460M GPU and 6GB of physical memory. All the results,
JOURNAL OF LATEX CLASS FILES, VOL. 6, NO. 1, JANUARY 2007 11

if not specifically mentioned, utilize DSF with 642 bases truth. The first row shows the results with only direct
to approximate incident lighting. The number of CPCA illumination from SS, and the second row shows the full GI
clusters is 128, and the number of PCA bases is 4. with both SS and MS. Visually, we can clearly distinguish
TABLE 1 the difference between with and without volumetric GI
Performance data. effects. The difference images show that our results are very
VolData DataRes
NumP Prep RV Render close to the references. To compare the accuracy of different
(mil.) (sec.) (ms) (ms) basis functions, Fig.11 shows the comparison between the
Smoke Plume 300 × 300 × 150 3.6 110 0.8 20
Smoke Wall 400 × 300 × 100 3.8 165 0.8 23 references and the results generated by the PVRT method
Aneurism 256 × 256 × 256 3.9 81 0.9 19 using different bases. In the first row, we utilized a synthetic
Bonsai 256 × 256 × 256 3.9 113 0.9 20 environment light with three spherical lights in different
Bone 512 × 512 × 512 7.9 241 1 23
Part 504 × 504 × 228 9.7 395 1 25 colors, and in the second row we adopted a real EM. It
Machine Room 417 × 345 × 60 3 73 0.7 21 is easy to notice that DSF reaches the best visual quality
The performance timings for different datasets are listed compared with other bases, especially SH. The L2 errors
in Table 1. As shown, the number of sampled photons also numerically demonstrate this conclusion. To verify the
(col. NumP) increases as the resolution of volume dataset
increases. The precomputation time (col. Prep) is related to
both the number of photons and the density field occupation
inside the volume that determines the effective voxels
during ray/photon marching. Usually, more photons de-
mand more precomputation time. Note, the precomputation (a) 209 × 173 × 30 (b) 417 × 345 × 60 (c) Diff(10x)
time listed in Table 1 includes the timings of both single Fig. 12. Comparison of volume GI rendering with
(SS) and multiple scattering (MS). The PVRT method different volume resolution.
aims at handling high-resolution volumes, and even with quality loss of using CPCA compression, we compared the
a 504 × 504 × 228 volume, the precomputation time is rendering of a smoke dataset, wherein density distribution
just around 6.5 minutes. Also note that the current test is random , using different numbers of CPCA clusters. The
GPU is designed for laptops, and thus has much weaker statistical data is shown in Table 2, which shows that using
performance when compared with the PC version. With 128 clusters only introduces 0.1% more L2 error compared
state-of-the-art GPUs, our precomputation performance is with using 256 clusters, while the CPCA compression
expected to be further improved by at least a factor of 3. using 256 clusters spends almost double the time compared
For the rendering stage, the step of generating the radiance with using 128 clusters. Hence, using 128 clusters for
volume texture is very efficient, and for all datasets we CPCA compression is optimal to achieve a good balance
tested it only takes around 1 ms (col. RV). Relying on the between performance and quality. To test the impact of
radiance volume texture, the following ray marching can
be performed in real-time (col. Render).

(a) Reference (b) 60k photons (c) 600k photons


24

(a) VPM,SS (b) DSF,SS (c) Diff(25x)


Precomputation Time (sec.)

22

20

18

16

14

12

10
0 1 2
10 10 10

No. Photons / Boundary Voxel

(d) Timing (e) Diff(25x),1.4% (f) Diff(25x),0.6%

(d) VPM,SS+MS (e) DSF,SS+MS (f) Diff(25x) Fig. 13. Comparison of using different number of
photons.
Fig. 10. Comparison between the ground truth gener-
ated by VPM and our results using DSF. different input volume resolutions on the rendering quality,
we spatially down-sampled the machine room dataset to
TABLE 2
half the resolution, and rendered it using directional light.
Statistics of different number of CPCA clusters.
Since the resolution decreases, the total number of photons
No. Cluster L2 CPCA Time (s)
and the precomputation time is reduced to be 0.75 mil. and
32 2.2% 12
64 1.3% 19 21 sec., respectively, compared with the original dataset
128 0.9% 31 (Table 1). Yet, as shown in Fig.12, the rendering quality
256 0.8% 52 also declines and the L2 error from the result using high-
To validate the accuracy of our method, Fig.10 gives resolution volume is 4.3%. As mentioned in Sec.8.3, when
a comparison between our results using DSF and the using DSF, each boundary voxel shoots NP = 10 photons
references generated by VPM, which is treated as ground for each basis light. To verify the quality, in Fig.13, we
JOURNAL OF LATEX CLASS FILES, VOL. 6, NO. 1, JANUARY 2007 12

(a) VPM (b) DSF, 642, 3.78% (c) SRBF, 642, 6.78% (d) SH, 676, 10.96%

(e) VPM (f) DSF, 642, 1.27% (g) SRBF, 642, 2.24% (h) SH, 676, 3.62%
Fig. 11. Comparison between the references generated by VPM and the results using different bases.

compared the rendering results using NP = 1 and NP = 10 features and hence provides a much better perception.
with the reference. This resolution of this Pillars volume is Therefore, along with the real-time performance, the PVRT
1003 , and hence the total number of boundary voxels is method offers high potential for improving the scientific
6 × 1002 . Since the VPM strategy only contributes to the and medical visualization quality.
indirect illumination of the final rendering, visually it is not Limitations In the precomputation stage of the PVRT
easy to distinguish the differences between using different method, the physical properties of each voxel, such as
numbers of photons. However, the difference images (10x) density field value, phase function, etc, can impact the
and the L2 errors clearly show the accuracy difference. transport of each photon and determine the final radiant
Since when using NP = 10 photons, the L2 error is below exitance. Therefore, although we can render the volumetric
1%, and hence it provides sufficient visual quality at good effects in real-time, the physical properties of each voxel
performance. Further, Fig.13 (d) illustrates the trend of the cannot be changed during rendering because the radiance
precomputation time as a function of number of photons for transportation is precomputed. Also the indirect light trans-
each boundary voxel, which yields almost a linear curve. portation does not change according to the change of opac-
We applied the PVRT method for various visualization ity mapping. However, since photon tracing is pursued for
scenarios. Fig.14 shows three study cases where our ren- each basis light, the basis coefficients for current lighting
derer is used for volume visualization. The first row shows can be freely changed. Hence we can support dynamic
the rendering of a bone volume dataset using conventional lighting, view and color transfer function change, in real-
volume ray casting with local shading and our method time (as shown in the accompanying video).
(using DSF) with volume GI effects. In the first image,
it is obvious that certain features, such as the spatial
structure of the spine, cannot be clearly perceived under
10 C ONCLUSION AND F UTURE W ORKS
direct illumination. However, these features are correctly In this paper, we present a precomputed volume radiance
presented using our method with volume GI. In addition, transfer (PVRT) method that is feasible to incorporate
by using both key light and back light, MS effects from global illumination at real-time rates for rendering volume
the back light offer better perception of the structure data. The added realism and clarity can greatly benefit
within the spine. The second and third dataset is a CT practical visualization tasks. To simulate time-consuming
scan of a bonsai tree and an aneurysm, respectively. It is multiple scattering, the PVRT method incorporates the vol-
noticeable that our result looks more 3D and provides a umetric photon mapping technique into the precomputation
much better visual perception of the depth order of complex stage, and introduces a novel photon sampling strategy and
leaves or vessel structures. To demonstrate whether the photon splatting routine to compute the radiant exitance
high-frequency lighting is meaningful for visualization, in for each voxel. Our PVRT framework currently supports
Fig.15, we tested the part dataset under environment light both distant spherical lighting and local directional lighting.
that is approximated using 6th SH and DSF with 642 To approximate all-frequency lighting, we further present
bases, respectively. From this test, we can easily see that the discrete spherical functions (DSF), which has a local
the rendering using low-frequency lighting smoothes out a interpolation property and is accurate and efficient for
great deal of the spatial features over the volume (shown in reconstruction. The PVRT method is practical for rendering
the yellow square), while the volume rendering results with high quality volume GI effects for various high-resolution
high-frequency lighting preserves the important volume volume datasets. Our experimental results demonstrate its
JOURNAL OF LATEX CLASS FILES, VOL. 6, NO. 1, JANUARY 2007 13

(a) LI, Key Light (b) GI, Key Light (c) GI, Key & Back Light

(d) Bonsai, LI (e) Bonsai, GI (f) Aneurism, LI (g) Aneurism, GI


Fig. 14. Comparison of volume rendering results between local illumination (LI) and global illumination (GI) using
our method.

Fig. 15. Comparison of volume GI rendering for visualization between using low-frequency SH (left column) and
using high-frequency DSF (right column).

merits and show that it can benefit both interactive graphics DE-FC02-12ER26072, program manager Lucy Nowell. We
and scientific visualization applications. would like to thank volvis.org for the volume data and Paul
For future work, we aim at removing the current con- Debevec for the environment maps. Finally, we sincerely
straint of fixing the volume physical properties in pre- thank the reviewers and Bob Miller for helping improve
computation so that the user can interactively edit the the manuscript.
volume dataset. Further, since the PVRT method inherits the
routine of VPM, it inherently could support the rendering R EFERENCES
of volume caustics. As a next step, we would thus like to
[1] J. T. Kajiya and B. P. Von Herzen, “Ray tracing volume densities,”
investigate high-quality volume caustics rendering using the SIGGRAPH Comput. Graph., vol. 18, pp. 165–174, 1984.
PVRT method. [2] H. W. Jensen and P. H. Christensen, “Efficient simulation of light
transport in scences with participating media using photon maps,”
ACKNOWLEDGMENTS [3]
in Proc. of SIGGRAPH. ACM, 1998, pp. 311–320.
P.-P. Sloan, J. Kautz, and J. Snyder, “Precomputed radiance transfer
This research was sponsored in part by the U.S. National for real-time rendering in dynamic, low-frequency lighting environ-
Science Foundation through grants OCI 0905008, OCI ments,” ACM Trans. Graph., vol. 21, pp. 527–536, 2002.
[4] Y.-T. Tsai and Z.-C. Shih, “All-frequency precomputed radiance
0850566, and OCI 0749227, and also by the U.S. Depart- transfer using spherical radial basis functions and clustered tensor
ment of Energy through grants DE-FC02-06ER25777 and approximation,” ACM Trans. Graph., vol. 25, pp. 967–976, 2006.
JOURNAL OF LATEX CLASS FILES, VOL. 6, NO. 1, JANUARY 2007 14

[5] E. Cerezo, F. Perez-Cazorla, X. Pueyo, F. Seron, and F. Sillion, [32] J. Kronander, D. Jönsson, J. Low, P. Ljung, A. Ynnerman, and
“A survey on participating media rendering techniques,” the Visual J. Unger, “Efficient visibility encoding for dynamic illumination in
Computer, 2005. direct volume rendering,” To Appear in IEEE Trans. Vis. Comput.
[6] M. Hadwiger, P. Ljung, C. R. Salama, and T. Ropinski, “Advanced Graph., 2011.
illumination techniques for gpu volume raycasting,” in ACM SIG- [33] M. Müller, D. Charypar, and M. Gross, “Particle-based fluid sim-
GRAPH ASIA 2008 courses, 2008, pp. 1:1–1:166. ulation for interactive applications,” in Proc. of SCA’03, 2003, pp.
[7] J. Kautz, P.-P. Sloan, and J. Lehtinen, “Precomputed radiance trans- 154–159.
fer: theory and practice,” in ACM SIGGRAPH Courses. ACM, [34] P.-P. Sloan, J. Hall, J. Hart, and J. Snyder, “Clustered principal
2005. components for precomputed radiance transfer,” ACM Trans. Graph.,
[8] R. Ramamoorthi, “Precomputation-based rendering,” Foundations vol. 22, no. 3, pp. 382–391, 2003.
and Trends in Computer Graphics and Vision, vol. 3, no. 4, pp. [35] J. Kruger and R. Westermann, “Acceleration techniques for gpu-
281–369, 2009. based volume rendering,” in Proc. of IEEE Visualization 2003
[9] S. Chandrasekhar, Radiative Transfer. New York: Dover Publica- (VIS’03), 2003, pp. 287–292.
tions, 1960. [36] NVIDIA, “Cuda programming guide,” 2011,
[10] M. Levoy, “Efficient ray tracing of volume data,” ACM Trans. http://developer.nvidia.com/cuda-downloads.
Graph., vol. 9, pp. 245–261, 1990.
[11] E. P. Lafortune and Y. D. Willems, “Rendering participating media
with bidirectional path tracing,” in Proc. of EGWR, 1996, pp. 91–
100.
[12] H. E. Rushmeier and K. E. Torrance, “The zonal method for calcu-
lating light intensities in the presence of a participating medium,”
SIGGRAPH Comput. Graph., vol. 21, pp. 293–302, 1987.
Yubo Zhang is a Ph.D student of computer
[13] J. Stam, “Multiple scattering as a diffusion process,” in Proc. of
science at the University of California, Davis.
EGWR, 1995, pp. 41–50.
He received his M.Phil. degree in applied
[14] A. Boudet, P. Pitot, D. Pratmarty, and M. Paulin, “Photon splatting
mathematics from Hong Kong Baptist Uni-
for participating media,” in Proc. of GRAPHITE, 2005, pp. 197–204.
versity in 2009 and B.S. degree in compu-
[15] K. Zhou, Q. Hou, R. Wang, and B. Guo, “Real-time kd-tree
tational mathematics from Zhejiang Univer-
construction on graphics hardware,” ACM Trans. Graph., vol. 27,
sity in 2007. His current research interests
pp. 126:1–126:11, 2008.
include scientific visualization, volume ren-
[16] R. Ng, R. Ramamoorthi, and P. Hanrahan, “All-frequency shad- dering and physically-based animation.
ows using non-linear wavelet lighting approximation,” ACM Trans.
Graph., vol. 22, pp. 376–381, 2003.
[17] W.-C. Ma, C.-T. Hsiao, K.-Y. Lee, Y.-Y. Chuang, and B.-Y. Chen,
“Real-time triple product relighting using spherical local-frame pa-
rameterization,” Vis. Comput., vol. 22, no. 9, pp. 682–692, Sep. 2006.
[18] P. Green, J. Kautz, W. Matusik, and F. Durand, “View-dependent
precomputed light transport using nonlinear gaussian function ap-
proximations,” in Proc. of I3D, 2006, pp. 7–14.
[19] K. Zhou, Y. Hu, S. Lin, B. Guo, and H.-Y. Shum, “Precomputed Zhao Dong is a postdoc at Program of Com-
shadow fields for dynamic scenes,” ACM Trans. Graph., vol. 24, puter Graphics of Cornell University. He re-
no. 3, pp. 1196–1201, Jul. 2005. ceived his Ph.D. degree in Computer Graph-
[20] C. Wyman, S. Parker, P. Shirley, and C. Hansen, “Interactive display ics from Max-Planck-Institut Informatik, Ger-
of isosurfaces with global illumination,” IEEE Trans. Vis. Comp. many in 2011, and M.S. and B.S degrees
Graph., vol. 12, no. 2, pp. 186–196, Mar. 2006. from Zhejiang University, China, in 2005 and
[21] K. M. Beason, J. Grant, D. C. Banks, B. Futch, and M. Y. Hussaini, 2001, respectively. His current research in-
“Pre-computed illumination for isosurfaces,” in Proc. of Visualization terests include real-time global illumination
and Data Analysis, 2006, pp. 98–108. rendering, physically-based material mod-
[22] T. Ritschel, “Fast gpu-based visibility computation for natural illu- elling and rendering, and volume graphics.
mination of volume data sets,” in Proc. of Eurographics, 17-20, Ed.,
2007.
[23] J. T. Moon, B. Walter, and S. Marschner, “Efficient multiple scatter-
ing in hair using spherical harmonics,” ACM Trans. Graph., vol. 27,
pp. 31:1–31:7, 2008.
[24] A. Kaplanyan and C. Dachsbacher, “Cascaded light propagation
volumes for real-time indirect illumination,” in Proc. of I3D. ACM,
2010, pp. 99–107.
[25] T. Engelhardt, J. Novak, and C. Dachsbacher, “Instant multiple Kwan-Liu Ma an IEEE Fellow, is a profes-
scattering for interactive rendering of heterogeneous participating sor of computer science and the chair of
media,” Karlsruhe Institut of Technology, Tech. Rep., December the Graduate Group in Computer Science
2010. (GGCS) at the University of California, Davis.
He leads the VIDi research group and di-
[26] K. Zhou, Z. Ren, S. Lin, H. Bao, B. Guo, and H.-Y. Shum,
rects the UC Davis Center for Visualization.
“Real-time smoke rendering using compensated ray marching,” ACM
Professor Ma received his PhD degree in
Trans. Graph., vol. 27, pp. 36:1–36:12, 2008.
computer science from the University of Utah
[27] Z. Ren, K. Zhou, S. Lin, and B. Guo, “Gradient-based interpolation
in 1993. He was a recipient of the PECASE
and sampling for real-time rendering of inhomogeneous, single-
award in 2000. His research interests include
scattering media,” Computer Graphics Forum, pp. 1945–1953, 2008.
visualization, high-performance computing,
[28] F. Hernell, P. Ljung, and A. Ynnerman, “Efficient Ambient and Emis- computer graphics, and user interface design. Professor Ma was a
sive Tissue Illumination using Local Occlusion in Multiresolution paper chair of the IEEE Visualization Conference in 2008 and 2009,
Volume Rendering,” in IEEE/EG Volume Graphics, 2007. and an associate editor of IEEE TVCG (2007-2011). He is a founding
[29] C. R. Salama, “Gpu-based monte-carlo volume raycasting,” in Proc. member of the IEEE Pacific Visualization Symposium and the IEEE
of Pacific Graphics, 2007, pp. 411–414. Symposium on Large Data Analysis and Visualization. Professor Ma
[30] J. Kniss, S. Premoze, C. Hansen, P. Shirley, and A. McPherson, “A presently serves on the editorial boards of the IEEE CG&A, the
model for volume lighting and modeling,” IEEE Trans. Vis. Comp. Journal of Computational Science and Discoveries, and the Journal
Graph., vol. 9, no. 2, pp. 150–162, Apr. 2003. of Visualization. Contact him via email: [email protected].
[31] T. Ropinski, C. Döring, and C. Rezk-Salama, “Interactive volumetric
lighting simulating scattering and shadowing,” in Proc. of PacificVis,
2010, pp. 169–176.

You might also like