1
Radiance Caching for Participating Media Wojciech Jarosz Craig Donner Matthias Zwicker Henrik Wann Jensen University of California, San Diego Error Metric Validation 1D Scene with 2 Point Lights Valid radius given error thresold Numerical Reference Our Error Metric (a) (b) (c) (d) (e) (f) RC PT RC PT RC PT RC PT Valid Radius Computed Using: Position Location of Light 1 Location of Light 2 PM RC Figure 1: Our method renders the cars scene (a) in 100 minutes using 150K cache points. In a contrast-enhanced, equal-time comparison to photon mapping (d), artifacts remain in the homogeneous medium even after tracing 8M photons due to the large scene extent and many light sources. With volumetric radiance caching, the Sponza scene (b) renders in 72 minutes using only 13K cache points. Sponza is notoriously difficult for photon mapping: even using projection maps to direct photons towards the windows, tracing photons for an equal amount of time results in less than 1K usable photons. A still frame from an animation of heterogeneous smoke (c) renders in 11 minutes using 12K cache points and produces flicker-free animation. Using spherical harmonics our method renders the anisotropic media in the Cornell box (e) in 14 minutes. Images were rendered with a horizontal resolution of 1024 (a, b, c) and 512 (e) with up to 16 samples per pixel. The zoomed insets (a, b, c, e) provide equal-time quality comparisons for radiance caching (RC) and path tracing (PT). A validation of our error metric as compared to a numerically computed optimal radius is shown in (f) for a 1D scene with two point lights of differing strength. We present an extension of irradiance caching [Ward et al. 1988] to participating media. Our method is based on Monte Carlo ray trac- ing, and it exploits the smooth nature of scattering in participating media by caching radiance accurately at a sparse set of locations and using interpolation to evaluate the radiance at arbitrary points in the medium. We compute gradients of the radiative transport equation to estimate the local variation of the scattered radiance and to improve the accuracy of interpolation. Our approach handles both heterogeneous media and anisotropic phase functions, and it is several orders of magnitude faster than path tracing. Furthermore, it is view driven and well suited in large scenes where methods such as photon mapping [Jensen and Christensen 1998] become costly (see Figure 1 a, b and d). Radiative Transport In participating media, radiative transport is described by the volume rendering equation, which for a non- emissive medium is: L(e, ω )= s 0 T r (e x)σ s (x)L i (x, ω ) dx + T r (e x )L(x , ω ), (1) where T r is the transmittance between two points, and x = e + s ω . We evaluate the in-scattered radiance L i as the sum of two compo- nents L i = L s + L m (single scattering and multiple scattering). Single Scattering For single scattering we express the in-scattered radiance at a point x in direction ω as: L s (x, ω )= A p( ω , x x)L r (x x) V (x x)H(x x) dx , (2) where p is the phase function, L r is the reduced radiance, V is the visibility term, and H is a geometry term. Assuming constant visi- bility, we compute the gradients by analytically differentiat w.r.t. x: L s (x, ω )= A (p)L r VH + p(L r ) VH + pL r V (H) dx . (3) In anisotropic media, this formulation fully accounts for the change in the phase function. In heterogeneous media, the L r term ac- counts for the change in the optical thickness due to varying scat- tering properties. The gradients are computed in conjunction with the radiance during Monte Carlo integration, and our derivations place no restriction on the sampling pdf. We handle single scat- tering from point lights, cosine lights, and area lights, as well as scattering from reflective surfaces in the scene due to indirect illu- mination. Single scattering gradients of new light sources are easily incorporated into our system. Multiple Scattering For multiple scattering, we compute the ra- diance, L m (x, ω ), as an integral of random-walk paths starting at x. We express the gradient as the change of radiance arriving along the paths as x and the paths are translated as a whole. This approach takes into account how radiance changes along the full path, and, furthermore allows for importance sampling the phase function at all but the first path vertex. Caching Our method computes and caches radiance lazily during the rendering process. When evaluating radiance at some location x, we first check if interpolation is possible by querying nearby cache points in an octree (as in [Ward et al. 1988]). If cache points are found, we perform a smoothly-weighted exponential extrapo- lation suitable for participating media. When no points are found, the radiance and gradient are computed and cached for future ex- trapolation. Each cache point has a valid radius within which ex- trapolation is allowed. This valid radius is computed using a novel, perceptually-based error metric which adapts to the local smooth- ness of the radiance field. Even in the presence of saddle points when the gradient vanishes, our metric robustly approximates the largest radius that maintains a specific relative L 2 error (Figure 1f). The amount of extrapolation is controlled using an error tolerance parameter as well as minimum and maximum radius constraints in both world and screen space. In our system, we further separate our cache based on the ex- pected frequency content of the radiance values. Specifically, we maintain distinct cache points for single scattering from lights, sin- gle scattering from surfaces, and multiple scattering. This allows our system to sample low-frequency components more sparsely. For isotropic media, we store the fluence and gradients as RGB values. In anisotropic media, we project our radiance and gradient computations onto spherical harmonics (though any spherical basis could be used) and store the full spherical representations with a user-specified number of coefficients. References JENSEN, H. W., AND CHRISTENSEN, P. H. 1998. Efficient simulation of light trans- port in scenes with participating media using photon maps. In Proceedings of SIG- GRAPH. WARD, G. J., RUBINSTEIN, F. M., AND CLEAR, R. D. 1988. A ray tracing solution for diffuse interreflection. In Proceedings of SIGGRAPH.

Vrc Sketch Radiance Caching for Participating Media

Embed Size (px)

Citation preview

Page 1: Vrc Sketch Radiance Caching for Participating Media

Radiance Caching for Participating MediaWojciech Jarosz Craig Donner Matthias Zwicker Henrik Wann Jensen

University of California, San Diego

Error Metric Validation1D Scene with 2 Point Lights

Val

id r

adiu

sgi

ven

erro

r th

reso

ld

Numerical ReferenceOur Error Metric

(a) (b) (c)

(d) (e) (f)

RC

PT

RC

PT

RC

PT

RC

PT

Valid Radius Computed Using:

Position

Location ofLight 1

Location ofLight 2

PMRC

Figure 1: Our method renders the cars scene (a) in 100 minutes using 150K cache points. In a contrast-enhanced, equal-time comparison to photon mapping(d), artifacts remain in the homogeneous medium even after tracing 8M photons due to the large scene extent and many light sources. With volumetric radiancecaching, the Sponza scene (b) renders in 72 minutes using only 13K cache points. Sponza is notoriously difficult for photon mapping: even using projectionmaps to direct photons towards the windows, tracing photons for an equal amount of time results in less than 1K usable photons. A still frame from an animationof heterogeneous smoke (c) renders in 11 minutes using 12K cache points and produces flicker-free animation. Using spherical harmonics our method rendersthe anisotropic media in the Cornell box (e) in 14 minutes. Images were rendered with a horizontal resolution of 1024 (a, b, c) and 512 (e) with up to 16samples per pixel. The zoomed insets (a, b, c, e) provide equal-time quality comparisons for radiance caching (RC) and path tracing (PT). A validation of ourerror metric as compared to a numerically computed optimal radius is shown in (f) for a 1D scene with two point lights of differing strength.

We present an extension of irradiance caching [Ward et al. 1988] toparticipating media. Our method is based on Monte Carlo ray trac-ing, and it exploits the smooth nature of scattering in participatingmedia by caching radiance accurately at a sparse set of locationsand using interpolation to evaluate the radiance at arbitrary pointsin the medium. We compute gradients of the radiative transportequation to estimate the local variation of the scattered radianceand to improve the accuracy of interpolation. Our approach handlesboth heterogeneous media and anisotropic phase functions, and it isseveral orders of magnitude faster than path tracing. Furthermore, itis view driven and well suited in large scenes where methods suchas photon mapping [Jensen and Christensen 1998] become costly(see Figure 1 a, b and d).

Radiative Transport In participating media, radiative transportis described by the volume rendering equation, which for a non-emissive medium is:

L(e, ~ω) =∫ s

0Tr(e↔x)σs(x)Li(x, ~ω) dx+Tr(e↔x′)L(x′, ~ω), (1)

where Tr is the transmittance between two points, and x′ = e + s~ω .We evaluate the in-scattered radiance Li as the sum of two compo-nents Li = Ls +Lm (single scattering and multiple scattering).

Single Scattering For single scattering we express the in-scatteredradiance at a point x in direction ~ω as:

Ls(x, ~ω) =∫

Ap(~ω,x′→x)Lr(x′→x)V (x′↔x)H(x′→x) dx′, (2)

where p is the phase function, Lr is the reduced radiance, V is thevisibility term, and H is a geometry term. Assuming constant visi-bility, we compute the gradients by analytically differentiat w.r.t. x:

∇Ls(x, ~ω) =∫

A(∇p)LrV H + p(∇Lr)V H + pLrV (∇H) dx′. (3)

In anisotropic media, this formulation fully accounts for the changein the phase function. In heterogeneous media, the ∇Lr term ac-counts for the change in the optical thickness due to varying scat-tering properties. The gradients are computed in conjunction withthe radiance during Monte Carlo integration, and our derivationsplace no restriction on the sampling pdf. We handle single scat-tering from point lights, cosine lights, and area lights, as well asscattering from reflective surfaces in the scene due to indirect illu-mination. Single scattering gradients of new light sources are easilyincorporated into our system.

Multiple Scattering For multiple scattering, we compute the ra-diance, Lm(x, ~ω), as an integral of random-walk paths starting at x.We express the gradient as the change of radiance arriving along thepaths as x and the paths are translated as a whole. This approachtakes into account how radiance changes along the full path, and,furthermore allows for importance sampling the phase function atall but the first path vertex.

Caching Our method computes and caches radiance lazily duringthe rendering process. When evaluating radiance at some locationx, we first check if interpolation is possible by querying nearbycache points in an octree (as in [Ward et al. 1988]). If cache pointsare found, we perform a smoothly-weighted exponential extrapo-lation suitable for participating media. When no points are found,the radiance and gradient are computed and cached for future ex-trapolation. Each cache point has a valid radius within which ex-trapolation is allowed. This valid radius is computed using a novel,perceptually-based error metric which adapts to the local smooth-ness of the radiance field. Even in the presence of saddle pointswhen the gradient vanishes, our metric robustly approximates thelargest radius that maintains a specific relative L2 error (Figure 1f).The amount of extrapolation is controlled using an error toleranceparameter as well as minimum and maximum radius constraints inboth world and screen space.

In our system, we further separate our cache based on the ex-pected frequency content of the radiance values. Specifically, wemaintain distinct cache points for single scattering from lights, sin-gle scattering from surfaces, and multiple scattering. This allowsour system to sample low-frequency components more sparsely.For isotropic media, we store the fluence and gradients as RGBvalues. In anisotropic media, we project our radiance and gradientcomputations onto spherical harmonics (though any spherical basiscould be used) and store the full spherical representations with auser-specified number of coefficients.ReferencesJENSEN, H. W., AND CHRISTENSEN, P. H. 1998. Efficient simulation of light trans-

port in scenes with participating media using photon maps. In Proceedings of SIG-GRAPH.

WARD, G. J., RUBINSTEIN, F. M., AND CLEAR, R. D. 1988. A ray tracing solutionfor diffuse interreflection. In Proceedings of SIGGRAPH.