A ZERO-VARIANCE-BASED SAMPLING SCHEME FOR
MONTE CARLO SUBSURFACE SCATTERING
Jaroslav KřivánekCharles University in Prague
Eugene d’EonWeta Digital
The work was done while both authors were with Weta Digital
Monte Carlo subsurface scattering
Křivánek and d'Eon - Zero-variance-based MC SSS 2
Classical random walk Oblivious to the boundary
Goal Guide paths toward the
boundary
Motivation
3Křivánek and d'Eon - Zero-variance-based MC SSS
Teaser
4Křivánek and d'Eon - Zero-variance-based MC SSS
Classical random walk New methodOblivious to the boundary Guides paths toward the boundary
Variance reduction Efficiency
improvement(shorter paths on average)
PREVIOUS WORK
Previous work in graphics
Diffusion approximation for SSS [Jensen et al. ‘01]
6Křivánek and d'Eon - Zero-variance-based MC SSS
Previous work in graphics
Diffusion approximation for SSS Multi-layered materials
[Donner and Jensen ‘05]
Hybrid MC–diffusion [Li et al. ’05, Donner and Jensen ’07]
Extended source [d’Eon and Irving ’11, Habel et al. ’13]
Direction dipole [Frisvald et al. ‘14]
7Křivánek and d'Eon - Zero-variance-based MC SSS
Diffusion-based SSS – Limitations
Assumptions do not hold in practice (flat, semi-infinite medium)
Inaccuracies of the diffusion approximation
8Křivánek and d'Eon - Zero-variance-based MC SSS
Monte Carlo SSS
Accurate, no assumptions about the geometry Fits smoothly into a physically-based path tracer
BUT slow Hundreds of scattering events to get an accurate
answer
Similar issues tackled in neutron transport
9Křivánek and d'Eon - Zero-variance-based MC SSS
“Deep penetration problems” (reactor shield design) Blind MC: One in a billion particles makes it
through
slab(reactor shield)
Previous work in neutron transport
10Křivánek and d'Eon - Zero-variance-based MC SSS
incidentradiation
transmittedradiation
Path stretching[Clark ’66, Ponti ‘71, Spanier ‘71] heuristic, manual “stretching parameter” setting
Previous work in neutron transport
11Křivánek and d'Eon - Zero-variance-based MC SSS
incidentradiation
transmittedradiation
long step
short step
Zero-variance random walk theory
Zero variance random walk theory[Kahn ‘54, Kalos and Whitlock ’08, Hoogenboom ’08, Booth ‘11]
[Dwivedi ‘81] Synergistic path stretching and angular
sampling Solid theory, no heuristics
We apply these ideas in SSS in computer graphics
12Křivánek and d'Eon - Zero-variance-based MC SSS
THEORY OF ZERO-VARIANCE RANDOM WALKS
WARNING!
Zero-variance walk much harder than calculating the desired answer!
Requires knowing the solution everywhere
Approximate zero-variance walks yield low variance [Dwivedi ‘81] This work
Transport equation
r
r’
Křivánek and d'Eon - Zero-variance-based MC SSS 15
r'rr'r'rr d)()()()( e TLLL
Solving the transport equation
r
r’
Křivánek and d'Eon - Zero-variance-based MC SSS 16
r'rr'r'rr d)()()()( e TLLL
Zero-variance estimator
Křivánek and d'Eon - Zero-variance-based MC SSS 17
r
r’
1. Terminate with prob.:
2. Score only when terminating
3. Sample r’ with pdf:
)(
)()(
e
term r
rr
L
LP
)()()|( rr'r'rr' TLp
r'rr'r'rr d)()()()( e TLLL
Proof of zero-variance
Křivánek and d'Eon - Zero-variance-based MC SSS 18
If the Le(r) term selected
Return
Terminate
)()(/)(
)(
)(
)(e
e
term
e
rrr
r
r
rL
LL
L
P
L
r'rr'r'rr d)()()()( e TLLL 1. Terminate with prob.:
2. Score only when terminating
3. Sample r’ with pdf:
)(
)()(
e
term r
rr
L
LP
)()()|( rr'r'rr' TLp
Proof of zero-variance
Křivánek and d'Eon - Zero-variance-based MC SSS 19
Else: Return
)()(
)()(
)|(
)()(
)(1
1
d)()()(1
1
term
term
rr'
r'r
rr'
rr'r'
r
r'rr'r'r
LL
LL
p
TL
P
TLP
r'rr'r'rr d)()()()( e TLLL 1. Terminate with prob.:
2. Score only when terminating
3. Sample r’ with pdf:
)(
)()(
e
term r
rr
L
LP
)()()|( rr'r'rr' TLp
Discussion
Requires knowing L(r) everywhere
Approximate L(r) yields low variance
Use in graphics MC calculation [Jensen 1995, Vorba et al. 2014] Analytic solution: this work
20Křivánek and d'Eon - Zero-variance-based MC SSS
(NEAR)-ZERO-VARIANCE SOLUTION FOR HALF-
SPACE PROBLEMS
Setup
(Unidirectional) path tracing
22Křivánek and d'Eon - Zero-variance-based MC SSS
Assumptions
Flat, semi-infinite medium Uniform, white-sky illumination
23Křivánek and d'Eon - Zero-variance-based MC SSS
x
Analytical radiance solution
“Caseology”, singular eigenfunctions [Case 1960, McCormick and Kuscer 1973]
24Křivánek and d'Eon - Zero-variance-based MC SSS
0/00
1
1
/ ),(),(),( vxvx evdvevxL
x
transient terms asymptotic terms
Singular eigenfunctions
Approximate solution
Use only the discrete asymptotic term
25Křivánek and d'Eon - Zero-variance-based MC SSS
0/00
1
1
/ ),(),(),( vxvx evdvevxL
x
asymptotic terms
Approximate solution
26
albedo = 0.95
solu
tion
depth x
albedo = 0.2
depth x
Křivánek and d'Eon - Zero-variance-based MC SSS
Use only the discrete asymptotic term
)/1(')'exp(
)/exp()exp()(
0
0
vs
vxssp
Distance sampling
27Křivánek and d'Eon - Zero-variance-based MC SSS
x
transmittance
solution
s
path stretching!
0
0)(v
vp
Directional distribution
28Křivánek and d'Eon - Zero-variance-based MC SSS
Directional distribution
Křivánek and d'Eon - Zero-variance-based MC SSS 29
albedo = 0.95 albedo = 0.2
RESULTS
Semi-infinite half-space test
J. Křivánek - Zero variance walks for subsurface scattering 31
albedo 0.4 0.8 0.95
newscheme
(Dwivedi)
classicalsampling
Semi-infinite half-space test
J. Křivánek - Zero variance walks for subsurface scattering 32
newscheme
(Dwivedi)
classicalsampling
albedo 0.4 0.8 0.95
0.132
0.025 (5.3×)variance
variance 0.093
0.034 (2.7×)
0.020
0.020 (1×)
Use in rendering
33Křivánek and d'Eon - Zero-variance-based MC SSS
Use in rendering – White sky illum.
J. Křivánek - Zero variance walks for subsurface scattering 34
25 samples per pixel
classical sampling (36 s) Dwivedi (21 s)
MIS: 75% Dwivedi (25 s)
Use in rendering – IBL
J. Křivánek - Zero variance walks for subsurface scattering 35
equal-time comparison, 100 samples per pixel, 75% Dwivedi,
our resultclassical sampling
our resultclassical sampling
WORK IN PROGRESS
Exponential radiance falloff
… does not hold for low scattering
J. Křivánek - Zero variance walks for subsurface scattering 37
albedo=0.95 albedo = 0.2
Directional distribution
38Křivánek and d'Eon - Zero-variance-based MC SSS
Dwivedi more accurate
Radiance distribution
39
albedo=0.95
Dwivedi Reference Difference
dir
dep
th
albedo = 0.2
Dwivedi Reference Difference
Improved sampling
Take boundary into account
Better radiance approximation Matching 1st and 2nd moments of the true solution
40Křivánek and d'Eon - Zero-variance-based MC SSS
Semi-infinite half-space test
J. Křivánek - Zero variance walks for subsurface scattering 41
newscheme
(Dwivedi)
classicalsampling
albedo 0.4 0.8 0.95
0.132
0.025 (5.3×)variance
variance 0.093
0.034 (2.7×)
0.020
0.020 (1×)improved
scheme
variance .001 (132×).0008 (116×).0002 (100×)
Future work
Boundary conditions (Fresnel, rough)
Anisotropic scattering
More rendering tests
Other applications of zero-variance schemes
42Křivánek and d'Eon - Zero-variance-based MC SSS
Conclusion
Solution for MC subsurface scattering
Zero-variance MC schemes
43Křivánek and d'Eon - Zero-variance-based MC SSS
Acknowledgments
Funding from Czech Science Foundation
44Křivánek and d'Eon - Zero-variance-based MC SSS
Zero-variance-based Monte Carlo subsurface scattering
Thank you!
45Křivánek and d'Eon - Zero-variance-based MC SSS
Proof of zero variance (details)
Křivánek and d'Eon - Zero-variance-based MC SSS 46
)()(
)()(
d)()(
)()()|(
e rr
rr'r'
r'rr'r'
rr'r'rr'
LL
TL
TL
TLp
)(
)()(
)()()()(
)()(
)()(
)(
)|(
)()(
)()(
)(
d)()()(1
1
e
e
e
term
r'
r'r
rrrr'r'
rr'r'
rr
r
rr'
rr'r'
rr
r
r'rr'r'r
L
LL
LLTL
TL
LL
L
p
TL
LL
L
TLP
Recommended