computer graphics global illumination: photon mapping , participating media lecture 1 2
DESCRIPTION
Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2 Taku Komura. last lecture . Monte-Carlo Ray Tracing Path Tracing Bidirectional Path Tracing Photon Mapping. Today. Methods to accelerate the accuracy of photon mapping - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/1.jpg)
Computer GraphicsGlobal Illumination:
Photon Mapping, Participating Media
Lecture 12Taku Komura
![Page 2: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/2.jpg)
2
last lecture
Monte-Carlo Ray Tracing Path Tracing Bidirectional Path Tracing
Photon Mapping
![Page 3: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/3.jpg)
3
Today
Methods to accelerate the accuracy of photon mapping
Rendering Participating Media
![Page 4: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/4.jpg)
Accelerating the accuracy of photon mapping
Combine with ray tracing to visualize the specular light visible from the camera
Shoot more photons towards directions where more samples are needed Caustics photon map
Tracing photons only towards specular surfaces
![Page 5: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/5.jpg)
A Practical Two-Pass Algorithm
Building photon maps by photon tracing Separate the photon paths into different
categories according to the reflectance Rendering
Combining the radiance of difference light paths
![Page 6: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/6.jpg)
Light Transport Notation
L: Lightsource E: Eye S: Specular reflection D: Diffuse reflection (k)+ one or more k events (k)* zero or more of k events (k)? zero or one k event (k|k’) a k or k’ event
![Page 7: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/7.jpg)
Photon Tracing
Create two photon maps Global photon map (the usual photon map)
All Photons with property L(S|D)*D are stored. Caustics photon map
Created by tracing photons that hit the specular surfaces Cast the photons only toward specular objects LS+D
![Page 8: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/8.jpg)
Rendering
Separate the irradiance into four groups Direct illumination (by ray tracing or global
photon map) : LD Diffuse indirect illumination (by global photon
map) : LD(S|D)+D Specular reflection (by ray tracing) L(S|D)*S Caustics (by caustics photon map) LS+D
![Page 9: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/9.jpg)
Caustics Photon Map
Caustics require high resolution Need to cast more photons towards
surfaces that generates caustics Projection Map
![Page 10: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/10.jpg)
Projection map A map of the geometry seen from the light source
Made of many cells – which is on if there is a geometry in that direction, and off if not
For a point light, it is a spherical projection For directional light, a planar projection Use a bounding sphere to represent the objects
![Page 11: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/11.jpg)
Direct + Indirect + Specular
![Page 12: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/12.jpg)
![Page 13: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/13.jpg)
Why is photon mapping efficient?
It is a stochastic approach that estimates the radiance from a few number of samples Kernel density estimation
Can actively distribute samples to important areas Caustics photon map
![Page 14: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/14.jpg)
14
Today
Methods to accelerate the accuracy of photon mapping
Rendering Participating Media
![Page 15: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/15.jpg)
Participating Media Dusty air, clouds, silky water Translucent materials such as marble,
skin, and plants Photon mapping is good in handling
participating media In participating media, the light is
scattered to different directions
![Page 16: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/16.jpg)
Single / Multiple scattering
![Page 17: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/17.jpg)
The brightness of a point
Is decided by Out scattering Absorption In scattering
),(
xL
'
)',(
xLi
),(
xL
![Page 18: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/18.jpg)
Light out-scattering
• The change in radiance, L, in the direction ω, due to out scattering is given by
• The change in radiance due to absorption is
),()(),()(
xLxxL s
tcoefficien absorption: )(
tcoefficien scattering : )(
),()(),()(
x
x
xLxxL
a
s
a
),(
xL
![Page 19: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/19.jpg)
In-scattering
• The change due to inscattering
where the incident radiance, Li, is integrated over all directions
p is called the phase function describing the distribution of the scattered light
4
')',(),',()(),()(
dxLxpxxL is
'
)',(
xLi
![Page 20: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/20.jpg)
Phase function Isotropic scattering
Scattered in any random direction
Henyey-Greenstein Phase Function Scattered in the direction more
towards the front Dust, stone, clouds
4
1)( p
2
12
2
)cos21(4
1)(
gg
gp
11 g
![Page 21: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/21.jpg)
Phase function
![Page 22: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/22.jpg)
Examples
Cornell Box scene – isotropic, homogeneous participating medium.
200,000 photons used with 65,000 in the volume map. Radiance
estimate used 100 photons.
Cornell Box scene – anisotropic, homogeneous participating medium.
200,000 photons used with 65,000 in the volume map. Radiance
estimate used 50 photons.
![Page 23: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/23.jpg)
Ray marching and single scattering
),()(),',()',(),( xxLexxxpxLxL x
s
N
li
t
• Now we compute how the light will be accumulated along a ray
• This is called ray marching
where N is the number of light sources and Li is
the radiance from each light source
The last term is the light entering from behind, which is attenuated by proceeding Δx
![Page 24: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/24.jpg)
Ray marching through a finite size medium (Single Scattering)
),()(),',()',(),(1 xxLexxxpxLxL n
xsl
N
llin
t
),2( ),,( ),,(1
xxLxxLxL nnn
![Page 25: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/25.jpg)
• For multiple scattering, it is necessary to integrate all the in-scattered radiance at every segment
• Here S sample rays are used to estimate the in-scattered light
Multiple scattering
),(
)(),',()',(1
)(),',()',(),(
)(
1
1
xxLe
xxxpxLS
xxxpxLxL
nxx
ss
S
sss
sl
N
lldn
t
![Page 26: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/26.jpg)
• Photon mapping can efficiently handle multiple scattering
• The photons interact with the media and are scattered / absorbed
• The average distance the photon proceeds after each interaction is
• Here S sample rays are used to estimate the in-scattered light
Photon mapping participating media
t coefficienon terminati:
1
ast
t
t
d
![Page 27: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/27.jpg)
Photon Scattering
• The photon is either absorbed or scattered• The probability of scattering is
• Deciding what happens by Russian Roulette
• Once the photon interacts with the media, it is stored in a volume photon map
t
s
absorbed isPhoton
scattered isPhoton [0,1]Given
![Page 28: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/28.jpg)
Volume Radiance Estimate
• Same as we did for surface radiance estimate, locate n nearest photons and estimate the radiance
31
34
),(),',(),()(
r
xxfxL p
n
ppo
![Page 29: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/29.jpg)
Rendering Participating Media
• By ray tracing • If a ray enters a participating media, we use
ray marching to integrate the illumination.
),(
34
),(),',(
)(),',()',(),(
)(
31
1
xxLe
xr
xxf
xxxpxLxL
nxx
pn
pl
sl
N
llln
t
Single scattering term
multiple scattering term
![Page 30: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/30.jpg)
Examples
single scattering multiple scattering
![Page 31: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/31.jpg)
Subsurface Scattering• In computer graphics, reflections of non-metallic materials
are usually approximated by diffuse reflections. • Light leaving from the same location where it enters the
object• For translucent materials such as marble, skin and milk, this
is a bad approximation• The light leaves from different locations
![Page 32: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/32.jpg)
Single scattering
Direct single scattering: Compute the distance the light has
traveled and attenuate according to the distance
Indirect Multiple scattering : Photon maps
![Page 33: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/33.jpg)
Subsurface Scattering by Photon Mapping
• Photon tracing – as explained before• Rendering – Ray marching
![Page 34: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/34.jpg)
BSSRDF
• Bidirectional Scattering Surface Reflectance Distribution Function (BSSRDF)
• Relates the differential reflected radiance dLr, at x in the direction ω, to the differential incident flux, dΦ, at x’ from direction ω’.
• We can capture/model the BSSRDF and use it for rendering
)','(
),()',',,(
xd
xdLxxS
i
r
![Page 35: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/35.jpg)
Rendering using BSSRDF
(a) sampling a BRDF (b) sampling a BSSRDF Collect samples of incoming rays over an area
http://graphics.ucsd.edu/~henrik/animations/BSSRDF-SIGGRAPH-ET2001.avi
![Page 36: Computer Graphics Global Illumination: Photon Mapping , Participating Media Lecture 1 2](https://reader033.vdocument.in/reader033/viewer/2022042718/5681308e550346895d966a9f/html5/thumbnails/36.jpg)
Rendering by BSSRDF
Human skin reflectance simulated by
BRDF BSSRDF
• Readings : Realistic Image Synthesis Using Photon Mapping by Henrik Wann Jensen, AK Peters Chapter 9, 10