Download presentation
Presentation is loading. Please wait.
Published byClarissa Williams Modified over 6 years ago
1
Ray Tracing via Markov Chain Monte-Carlo Method
Toshiya Hachisuka, Anton S. Kaplanyan, Carsten Dachsbacher, Multiplexed Metropolis Light Transport, SIGGRAPH 2014. Toshiya Hachisuka, Henrik Wann Jensen, Robust Adaptive Photon Tracing Using Photon Path Visibility, ACM TOG 2011. Jungpyo Hong
2
Contents Basic Backgrounds
Metropolis-Hastings Method Metropolis Light Transport (MLT) Primary Sample Space (PSS) Multiplexed Metropolis Light Transport (MMLT) Multiple Importance Sampling Multiplexed Primary Sample Space Robust Adaptive Photon Tracing Problem Specification Replica Exchange Monte-Carlo
3
Metropolis-Hastings (MH) Method
A kind of Markov Chain Monte-Carlo (MCMC) method A sampling method from a unknown probability distribution P π₯ You can compute a value of function π π₯ , while P π₯ β π π₯ So it is difficult to calculate the normalize constant β«π π₯ ππ₯ Arbitrary jumping distribution π π₯ π₯ β² is needed
4
Metropolis-Hastings (MH) Method
Algorithm From current state π₯ π‘ , pick a target state π§ π§~π π§ π₯ π‘ , π₯ 0 is an arbitrary point Calculate π π₯ π‘ , π π§ ,π π₯ π‘ π§ , π π§ π₯ π‘ Calculate an acceptance probability π π₯ π‘ ,π§ = min π π§ π π₯ π‘ π§ π π₯ π‘ π π§ π₯ π‘ ,1 Accepted: π₯ π‘+1 =π§ Rejected: π₯ π‘+1 = π₯ π‘ π π₯ π₯ π‘ π π§ π₯
5
Metropolis-Hastings (MH) Method
Algorithm From current state π₯ π‘ , pick a target state π§ π§~π π§ π₯ π‘ , π₯ 0 is an arbitrary point Calculate π π₯ π‘ , π π§ ,π π₯ π‘ π§ , π π§ π₯ π‘ Calculate an acceptance probability π π₯ π‘ ,π§ = min π π§ π π₯ π‘ π§ π π₯ π‘ π π§ π₯ π‘ ,1 Accepted: π₯ π‘+1 =π§ Rejected: π₯ π‘+1 = π₯ π‘ π π₯ π₯ π‘ π π₯ π‘ ,π§ = min π π§ π π₯ π‘ π§ π π₯ π‘ π π§ π₯ π‘ ,1 π§ π₯
6
Metropolis-Hastings (MH) Method
Algorithm From current state π₯ π‘ , pick a target state π§ π§~π π§ π₯ π‘ , π₯ 0 is an arbitrary point Calculate π π₯ π‘ , π π§ ,π π₯ π‘ π§ , π π§ π₯ π‘ Calculate an acceptance probability π π₯ π‘ ,π§ = min π π§ π π₯ π‘ π§ π π₯ π‘ π π§ π₯ π‘ ,1 Accepted: π₯ π‘+1 =π§ Rejected: π₯ π‘+1 = π₯ π‘ π π₯ π₯ π‘ π₯ π‘+1 After a sufficient steps, π₯ π‘ will follows π π₯ βπ π₯ π₯ π‘+10 π₯
7
Metropolis Light Transport (MLT)
Use MH to sample paths while rendering! Idea Pick paths which contributes more (radiance) on the image very important not such important
8
Metropolis Light Transport (MLT)
Algorithm From a current path π₯ π‘ , pick a target path π§ π§ is mutated path from π₯ π‘ Calculate the acceptance probability π π₯ π‘ ,π§ = min π π§ π π₯ π‘ π§ π π₯ π‘ π π§ π₯ π‘ ,1 π π₯ is an radiance of path π₯ π₯ π‘+1 =π§ if accepted, π₯ π‘+1 = π₯ π‘ if rejected Problem: how to mutate paths (well)? π is often symmetric so that π π₯ π‘ π§ =π π§ π₯ π‘ (Metropolis method) π₯ π‘ π§
9
Primary Sample Space (PSS)
MLT has a hard time to cover all possible mutations Idea Mutate the paths in another transformed spaces!
10
Primary Sample Space (PSS)
Veach, Eric, and Leonidas J. Guibas. "Metropolis light transport."Β Proceedings of the 24th annual conference on Computer graphics and interactive techniques, 1997. MLT has a hard time to cover all possible mutations Idea Mutate the paths in another transformed spaces!
11
Primary Sample Space (PSS)
Primary sample spaces are defined as a hypercube π’= π’ 1 , β¦, π’ π π where π is a length of path π₯ π’ π β 0, 1 π’ π are the parameters which select the shape of path π₯ Two MCMC papers today uses PSS
12
Multiplexed Metropolis Light Transport
Toshiya Hachisuka, Anton S. Kaplanyan, Carsten Dachsbacher ACM TOG (SIGGRAPH 2014), 2014.
13
Multiple Importance Sampling (MIS)
Weighted sum of many importance samplings
14
Multiple Importance Sampling (MIS)
(Ordinary) importance sampling For known PDF π π₯ , sample π times: π₯ 1 β¦ π₯ π β«π π₯ ππ₯β 1 π π π₯ π π π₯ π Works better if πβπ Multiple importance sampling For πΎ known PDF π π π₯ β π=1..πΎ , sample π π times each: π₯ 1 β¦ π₯ π π β«π π₯ ππ₯β π‘=1 πΎ 1 π π‘ π=1 π π π π₯ π,π π π₯ π,π π π π₯ π,π π π is a MIS weight function such that π=1 πΎ π π π₯ =1
15
Multiple Importance Sampling (MIS)
By using MIS, we can use different PDFs according to the situation VEACH, E., AND GUIBAS, L. J Optimally combining sampling techniques for Monte Carlo rendering. In SIGGRAPH β95, 419β428.
16
Arbitrary distribution
Pros and Cons Multiple Importance Sampling + : Can use various techniques according to the situation β : We need to know sampling PDFs exactly So βSampling from radianceβ is impossible Metropolis Light Transport + : Can sample from unknown function value (like radiance distribution) β : Path tracing (or other single technique) only Multiple techniques Arbitrary distribution MC via MIS Yes No MLT ?
17
Expanding Primary Sample Space
Transform
18
Expanding Primary Sample Space
Multiplexed Primary Sample Space technique 1 Transform technique 2 technique 3
19
Expanding Primary Sample Space
Multiplexed Primary Sample Space technique 1 Transform technique 2 technique 3
20
Expanding Primary Sample Space
Multiplexed Primary Sample Space technique 1 Transform technique 2 technique 3 (Ordinary) path mutation
21
Expanding Primary Sample Space
Multiplexed Primary Sample Space technique 1 Transform technique 2 technique 3 Inter-technique mutation
22
Multiplexed MLT (MMLT)
Multiplexed Metropolis Light Transport Set type of technique as a MC state, too! technique 1 Ordinary MLT π π’ π‘ ,π§ = min π π§ π π’ π‘ ,1 By adapting MIS, π ( π’ π‘ ,π), π§, π β² = min π π β² π§ π(π§) π π β² (π§) π π π’ π‘ π( π’ π‘ ) π π ( π’ π‘ ) ,1 technique 2 technique 3
23
Overall Algorithm Initialize current state with any (visible) path and technique Mutate current state to make target state Calculate its radiance Calculate its acceptance probability Accept or reject the target Loop from 2 until converged
24
Metropolis Light Transport Result
Experiment MMLT do better than MLT when various materials are mixed Metropolis Light Transport Result
25
Multiplex Metropolis Light Transport Result
Experiment MMLT do better than MLT when various materials are mixed Multiplex Metropolis Light Transport Result
26
Experiment β Door MLT (RMSE: 0.0314) PSSMLT (RMSE: 0.0517) MMLT
27
Experiment PSSMLT MLT MMLT
28
Robust Adaptive Photon Tracing Using Photon Path Visibility
Toshiya Hachisuka, Henrik Wann Jensen ACM TOG, (Volume 30 Issue 5, presented at SIGGRAPH 2013) 2011.
29
Problem Statement (Progressive) Photon Mapping Pros: can handle
specular-diffuse-specular problem State of the Art in Photon Density Estimation SIGGRAPH 2012 Course Kavita Bala, Computer Sicence, Cornel University From Presentation of Prof. Sungeui Yoon
30
Problem Statement (Progressive) Photon Mapping
Cons: cannot handle scene with small indirect lighting Kavita Bala, Computer Sicence, Cornel University From Presentation of Prof. Sungeui Yoon MCMC may be handle this?
31
More Problem Statement
Why photon mapping cannot handle such scene? Too many photons are wasted by invalidation Light Window Valid lights Camera Invalid light
32
Applying Metropolis Method
Unlike before, this paper uses βvisibility functionβ on sampling Sample visible paths more Visibility function π(π’): 1 if photon path π’ is visible, else 0 Normalized visibility function πΉ π’ = π(π’) β«π π’ ππ’ = π(π’) π π π’ Use MCMC method to sample from function πΉ(π’) Acceptance probability: min 1, πΉ π§ πΉ π’ ?
33
Replica Exchange Monte-Carlo
Directly applying MCMC is dangerous Because πΉ(π’) is very sparse function πΉ(π’) Too far to reach! Jumping probability π’ 1 π’ 2 π’ 3 π’ 4 π’ 5 π’ 6 Visible Invisible
34
Replica Exchange Monte-Carlo
Letβs think about π independent MCMC π functions to be sampled: πΉ 1 β¦ πΉ π π independent states: π’ 1 β¦ π’ π Replica exchange Monte-Carlo allows to exchange states inter-distribution Acceptance probability π π’ π , π’ π = min 1, πΉ π π’ π πΉ π π’ π πΉ π π’ π πΉ π π’ π If it is accepted, π’ π and π’ π are exchanged
35
Replica Exchange Monte-Carlo
This paper uses two importance function πΉ π’ is a normalized visibility function πΌ π’ =1 is a constant function π’ πΌ , π’ πΉ is a state of constant/visibility function π π’ πΌ , π’ πΉ = min 1, πΉ π’ πΌ πΌ π’ πΉ πΉ π’ πΉ πΌ π’ πΌ = min 1, πΉ π’ πΌ π π =π π’ π It means that accept (exchange state) if path from uniform dist. is visible reject if it is invisible
36
Overall Algorithm Uniformly sample any path
Exchange to current path if it is visible If it is not, do regular MCMC method Target path = Mutate the current path Accept if it is visible -> change to the current path Reject if it is not
37
Experiment Photon sampled by uniform distribution
Photon sampled by MCMC
38
by uniform distribution
Experiment Photon sampled by uniform distribution Photon sampled by MCMC
39
Experiment Photon sampled by uniform distribution
Photon sampled by MCMC
40
Experiment RMSE of previous scene
41
Thank you! Please ask a question if you have
42
Quiz 1. (T/F) In the first paper βMultiplexed Metropolis Light Transportβ, MMLT algorithm fuses multiple importance sampling and Markov Chain Monte-Carlo method. 2. (T/F) In the second paper βRobust Adaptive Photon Tracing Using Photon Path Visibilityβ, the algorithm uses only Metropolis method to do MCMC sampling.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.