primary sample space and multiplexed mltanisb.github.io/slides.pdf · f(x,tt) tt is a parameter of...
TRANSCRIPT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Primary sample space and Multiplexed MLT
Anis Benyoub
Novembre 28, 2014
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Plan
PlanBackground
Rendering equationPath tracingImportance samplingMISBPTOriginal MLT
Kelemen style MLTMMLTConclusion
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Rendering equationPath tracingImportance samplingMISBPTOriginal MLT
Rendering equation Kajiya 1986
Lo(x, ωo, λ, t) = Le(x, ωo, λ, t) +∫
Ω fr (x, ωi, ωo, λ, t) Li(x, ωi, λ, t) (ωi · n) dωi
t: time; λ: wavelength;x : point in space;n: normal at x ;ωo : exiting light direction;ωi incident light direction;Li : incident radiant intensity;Lo : radiance at x ;Le : radiant intensity at x .
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Rendering equationPath tracingImportance samplingMISBPTOriginal MLT
Path tracing Kajiya 1986
Solving the rendering equation by Monte carlo sampling.I Simple implementation;I Slow convergence for indirect illumination or small light sources.
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Rendering equationPath tracingImportance samplingMISBPTOriginal MLT
Importance sampling
I Distributing samples according to fr or Li may be a good idea;I We don’t know the exact form of Li but it’s greatly influenced by the
light source position, size and shape.
For samples distributed along p(X):
I(x) =∫
D f (x) d x ≈ 1n∑n
i=1f (X)p(X)
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Rendering equationPath tracingImportance samplingMISBPTOriginal MLT
Multiple Importance sampling
I Combining several sampling methods seems like a good idea (and it is!);I The statistical model is more tricky but correct.
Let ωi be the samples’ weights:I(x) =
∫D f (x) d x ≈
∑ni=1
1ni
∑nij=1 ωi (Xij )
f (X)p(X)
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Rendering equationPath tracingImportance samplingMISBPTOriginal MLT
Bi-directional Path tracing Lafortune 1993
Solving the rendering equation by BPT.I Not that simple implementation.
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Rendering equationPath tracingImportance samplingMISBPTOriginal MLT
Bi-directional Path tracing Lafortune 1993
Efficient for indirect illumination and small lights.
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Rendering equationPath tracingImportance samplingMISBPTOriginal MLT
Bi-directional Path tracing Lafortune 1993
Still struggles with complex light paths (small pdf light paths, caustics, ...).
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Rendering equationPath tracingImportance samplingMISBPTOriginal MLT
Metropolis light transport Veach 1997
The rendering equation becomes a path integration problem:Φj =
∫P F (z) d z ≈ 1
M∑M
i=1F (zi )p(zi )
I Based on Metropolis sampling;I Several criteria: high acceptance probability, large changes to the path,
ergodicity, changes to the image location, stratification and low cost;I Involves combining several mutation strategies: bidirectional mutations,
perturbations, and lens subpath mutations;I Mutations are made in the path space.
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Rendering equationPath tracingImportance samplingMISBPTOriginal MLT
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Rendering equationPath tracingImportance samplingMISBPTOriginal MLT
Metropolis light transport Veach 1997
Efficient where BPT fails.
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Primary sample space MLT Kelemen 2002
I Veach style MLT is considered too complex to implement and not flexibleenough;
I The idea is doing the sampling in a more convinient space.
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Primary sample space MLT Kelemen 2002
Let’s review the statistical model: Φj =∫
P F (z) z ≈ 1M∑M
i=1F (zi )p(zi )
I The scalar contribution function I(z) which represents the luminance ofthe carried light;
I The pdf is defined as: p(z) = I(z)/b, b =∫
P I(z) d z;I Obviously b cannot be known precisely, this introduces a start-up bias;I We generate samples using a BPT to approximate its value. The bias is
then converted to noise.
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Primary sample space MLT Kelemen 2002
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Primary sample space MLT Kelemen 2002
The methodology focuses on two mutations: small and large mutations. Theissue of this choice is that each of them can lead to correlated samples whichleads to increasing the error.
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Primary sample space MLT Kelemen 2002
A technique that does large mutations when the contribution is low and smallmutations when the contribution is high.
→ This sounds exactly like importance sampling (Awesome!).
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Primary sample space MLT Kelemen 2002
I Importance sampling uses normalized values for each of its evaluations;I We keep the normalized values (u1, u2, ..., un), they define our sample in
the PSS;I We do a little parameter subsitution:
F (z) = F ∗(u) = F (S(u)) ·∣∣∣d S(u)
du
∣∣∣ = F (S(u))pS(U)
I The new scalar contribution function: I∗(u) = I(S(u))pS(U)
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Primary sample space MLT Kelemen 2002
Let’s focus on large steps:I Guarantee ergodicity;I Reduce the start-up bias;I The pdf is known for the sample.
After some approximations we get: a(ui → ut) ≈ T ∗(ui )T ∗(ut) ≈ 1
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
f l o a t Pr imarySample ( i n t i )
i f ( u [ i ] . modi fy < t ime )
i f ( l a r g e s t e p )
Push ( i , u [ i ] ) ;u [ i ] . modi fy = t ime ;u [ i ] . v a l u e = random ( ) ;
e l s e
i f ( u [ i ] . modi fy < l a r g e s t e p t i m e )
u [ i ] . modi fy = l a r g e s t e p t i m e ;u [ i ] . v a l u e = random ( ) ;
w h i l e ( u [ i ] . modi fy < t ime −1)
u [ i ] . v a l u e = Mutate ( u [ i ] . v a l u e ) ;u [ i ] . modi fy++;
Push ( i , u [ i ] ) ;u [ i ] . v a l u e = Mutate ( u [ i ] . v a l u e ) ;u [ i ] . modi fy++;
r e t u r n u [ i ] . v a l u e ;
f l o a t Mutate ( f l o a t v a l u e )
f l o a t s1 = 1 . / 1 0 2 4 , s2 = 1 . / 6 4 ;f l o a t dv = s2∗exp(− l o g ( s2 / s1 )∗ random ( ) ) ;i f ( random ( ) < 0 . 5 )
v a l u e += dv ; i f ( v a l u e > 1) v a l u e −= 1 ; e l s e
v a l u e −= dv ;i f ( v a l u e < 0) v a l u e += 1 ;
r e t u r n v a l u e ;Sample Next ( f l o a t I , C o n t r i b c o n t r i b )
f l o a t a = min ( 1 , I / o l d I ) ;newsample . c o n t r i b = c o n t r i b ;newsample . w = ( a+l a r g e s t e p ) / ( I /b+p l a r g e )/M;o l d s a m p l e . w += (1−a ) / ( o l d I /b+p l a r g e )/M;i f ( random ( ) < a )
o l d I = I ;c o n t r i b s a m p l e = o l d s a m p l e ;o l d s a m p l e = newsample ;i f ( l a r g e s t e p ) l a r g e s t e p t i m e = t ime ;t ime++;C l e a r S t a c k ( ) ;
e l s e c o n t r i b s a m p l e = newsample ;w h i l e ( ! I sStackEmpty ( ) ) Pop ( i , u [ i ] ) ;
l a r g e s t e p = ( random ( ) < p l a r g e ) ? 1 : 0 ;r e t u r n c o n t r i b s a m p l e ;
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Multiplexed MLT Hachisuka 2014
I BPT is inefficient for complex light paths;I Kelemen-style MLT struggles with very complex light paths (noisy
results);I Original MLT has some difficulties with glossy surface.
The idea is doing the sampling in an other space that would be more efficientfor those paths.
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Multiplexed MLT Hachisuka 2014
I The relation between Markov Chain Monte Carlo and MIS is said to beunclear for MLT;
I PSSMLT is a special case of MCMC where MIS is simply importancesampling.
I Even if BPT is used in PSSMLT, the different available importancesampling techniques are not used.
I A point in the sampling space u matches only point x in the path space.I It should match a point per combination of IS techniques!
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Serial Tempering
I MCMC sampling from a sum of parametrized distributions [Brooks 2011](which matches pretty well the case of MCMC and MIS);
I∑M
t=1 f (x ,Tt) Tt is a parameter of the distribution f (x ,T );I The acceptance probability from a to b in this case would be
min(1, r(Tta → Ttb )) where:
r(Tta → Ttb ) = f ∗(x ,Ttb )q(Ttb → Tta )f ∗(x ,Tta )q(Tta → Ttb ) ;
I The model can not be used for global illumination in the path space forstatistical reasons.
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Primary Sample Space Tempering
I A modified version of the PSS is introduced: the PSST!;I Each ditribution is warped according to it’s CDF in the primary sample
space. f ∗(u,Tt) = ωt(x)C∗t (x)pt(x)dν(x) = ωt(u)C∗
t (u)du;I The acceptance probability from a to b in this case would be
min(1, r(Tta → Ttb )) where:
r(Tta → Ttb ) =ωtb (u)C∗
tb (u)q(Ttb → Tta )ωta (u)C∗
ta (u)q(Tta → Ttb ) .
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
MMLT
Two markov chains in practive:I One for sampling the distribution;I One for sampling the samples.
Specified path length (then multiple rendering for each then combining).Simple implementation over a PSSMLT.
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Algorithm
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Implementation details
I The average image contribution is evaluated using BPTbk ≈
1Nk
∑Nki=1 w∗(u)C∗(u);
I One MCMC per length ends up to be more efficient;I Light and camera subpaths are only connected at ending.
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Comparison
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Limitations and improvements
I Still inefficient for specular-diffuse-specular paths (photon techniques aremore efficient);
I Does not guarantee better convergence than Veach MLT;I The weights for MCMC MIS should be adapted to the scene for better
convergence;I Subpath mutations are possible;I Parallelisation of one metropolis estimator is tough, but combining several
output images is a form of parallelisation.
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Demo
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Conlusion
I The theory behind PSSMLT are MMLT are interesting;I MMLT: Small improvement but very simple and costless implementation→ worth it!
At the Boundary Between Light Transport Simulation and ComputationalStatistics - Hachisuka 2014
Anis Benyoub Primary sample space and Multiplexed MLT
PlanBackground
Kelemen style MLTMMLT
Conclusion
Questions?
Anis Benyoub Primary sample space and Multiplexed MLT