Participating Media
Participating Media
Participating Media
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Participating</strong> <strong>Media</strong><br />
Valerie Szudziejka
Outline<br />
Light scattering<br />
The volume rendering equation<br />
Phase functions<br />
Ray marching<br />
Rendering specifics
Light scattering<br />
Photon can continue through medium<br />
unaffected<br />
Or can be out-scattered (out of path of<br />
light ray) or absorbed - reduced radiance<br />
Or can be in-scattered (into path of light<br />
ray) or medium can emit more light -<br />
increased radiance
Light scattering<br />
Reduced radiance due to out-scattering:<br />
(⃗ω · ∇)L(x, ⃗ω) = −σ s (x)L(x, ⃗ω)<br />
Reduced radiance due to absorption:<br />
(⃗ω · ∇)L(x, ⃗ω) = −σ a (x)L(x, ⃗ω)
Light scattering<br />
Increased radiance due to in-scattering:<br />
(⃗ω · ∇)L(x, ⃗ω) = σ s (x) ∫ Ω4π p(x, ⃗ω′, ⃗ω)L i(x, ⃗ω′)d⃗ω′<br />
integrate over all directions on a sphere<br />
(surface area)<br />
Increased radiance due to emission:<br />
(⃗ω · ∇)L(x, ⃗ω) = σ a (x)L e (x, ⃗ω)
Light scattering<br />
Change in radiance:<br />
emission - out-scattering - absorption + inscattering<br />
(⃗ω · ∇)L(x, ⃗ω) = σ a (x)L e (x, ⃗ω) − σ t (x)L(x, ⃗ω) + σ s (x) ∫ Ω4π p(x<br />
x)L e (x, ⃗ω) − σ t (x)L(x, ⃗ω) + σ s (x) ∫ Ω4π p(x, ⃗ω′, ⃗ω)L i(x, ⃗ω′)d⃗ω′<br />
where<br />
σ t = σ s + σ a<br />
is the extinction coefficient.
Volume rendering equation<br />
L(x, ⃗ω) = ∫ s<br />
0 e−τ(x,x′) σ a (x′)L e (x′)dx′+<br />
∫ s<br />
0 e(−τ(x,x′) σ s (x′) ∫ Ω4π p(x′, ⃗ω′, ⃗ω)L i(x′, ⃗ω′)d⃗ω′dx′+<br />
e −τ(x,x+s⃗ω) L(x + s⃗ω, ⃗ω)<br />
where<br />
τ(x, x′) = ∫ x′<br />
x<br />
σ t(t)dt<br />
is the optical depth.<br />
integrate over length of segment (s)<br />
Must be numerically integrated<br />
Costlier than rendering equation
Phase functions<br />
∫<br />
Ω4π<br />
p(x, ⃗ω′, ⃗ω)d⃗ω = 1<br />
similar to BRDF - but unitless and<br />
normalized
Phase Functions<br />
anisotropic scattering: preferential<br />
scattering direction<br />
isotropic: no preference<br />
anisotropic medium: phase function<br />
depends on orientation of medium<br />
isotropic: no dependence
Isotropic Phase function<br />
scattering completely random<br />
p(θ) = 1<br />
4π
Raleigh Scattering<br />
p(θ) = 3<br />
16π (1 + cos2 θ)<br />
shorter wavelengths scattered more<br />
for particles smaller than a wavelength of<br />
light<br />
why the sky is blue
Henyey-Greenstein<br />
p(θ) =<br />
1−g 2<br />
4π(1+g 2 −2g cos θ) 1.5<br />
g in (-1, 1)<br />
g < 0: backward scattering<br />
g > 0: forward scattering<br />
g = 0: isotropic scattering
Henyey-Greenstein<br />
ellipsoid-shaped scattering<br />
larger g = more preferential scattering<br />
costly 1.5 exponent
Schlick Phase Function<br />
accurate shape of phase function not so<br />
important<br />
use equation of ellipse to approximate<br />
Henyey-Greenstein<br />
p(θ) =<br />
1−k 2<br />
4π(1+k cos θ) 2<br />
k is similar to g in Henyey-Greenstein
Ray marching<br />
Solves volume rendering equation<br />
Uniform steps through medium, making<br />
local simplifications<br />
Multiple scattering simulation can be<br />
done with photon map<br />
Multiple scattering needed for such things<br />
as clouds
Adaptive ray marching<br />
Better for non-homogeneous media -<br />
change in extinction coefficient<br />
Varies length of step size on the fly<br />
Ideally little change of extinction<br />
coefficient & density (albedo) within a<br />
step
Photon Tracing<br />
Requires photon map for participating<br />
media and subsurface scattering<br />
Volume (rather than surface) photon map<br />
Exclude photons coming directly from<br />
light source (separate out direct<br />
illumination)
Rendering Fire<br />
Emits light<br />
Fluid flow equations<br />
Bright enough for the eye to adapt to its<br />
color
Rendering Smoke<br />
Uses fluid flow equations<br />
Random perturbation of the flow field to<br />
simulate curling<br />
Ideally won’t look alive & growing but<br />
passive & natural
Rendering Volume Caustics<br />
form in participating media
glass sphere, fog medium
Rendering Wet Materials<br />
Can look darker, brighter, or more<br />
specular<br />
Primarily due to subsurface scattering<br />
Two interactions: air-water and watersurface
Rendering Translucent Material<br />
Can be estimated with diffuse lighting but<br />
looks coarse and fake<br />
Subsurface scattering looks much better<br />
Pretty much same algorithm as for<br />
participating media
Skim milk, whole milk, diffuse milk
References<br />
Jensen:<br />
Realistic Image Synthesis Using Photon Mapping<br />
Rendering of Wet Materials<br />
Visual Simulation of Smoke<br />
Physically based Modeling and Animation of Fire<br />
ATI:<br />
Rendering Outdoor Light Scattering in Real Time