Primary Sample Space Path Guiding Jerry Jinfeng Guo

  • Slides: 30
Download presentation
Primary Sample Space Path Guiding Jerry Jinfeng Guo 1, Pablo Bauszat 1, Jacco Bikker

Primary Sample Space Path Guiding Jerry Jinfeng Guo 1, Pablo Bauszat 1, Jacco Bikker 2 and Elmar Eisemann 1 3 -July-2018 1: Delft University of Technology, the Netherlands 2: Utrecht University, the Netherlands

Background § Realistic rendering via light transport simulation • Path tracing and bi‐directional path

Background § Realistic rendering via light transport simulation • Path tracing and bi‐directional path tracing • Monte Carlo integration to solve the equation 11/29/202 0 2

Path Construction 101 § Motivation in 2 D 11/29/202 0 3

Path Construction 101 § Motivation in 2 D 11/29/202 0 3

Related Work – Path Guiding 11/29/202 0 4

Related Work – Path Guiding 11/29/202 0 4

Related Work – Path Guiding § Reduce Zero Radiance Paths • Guide rays towards

Related Work – Path Guiding § Reduce Zero Radiance Paths • Guide rays towards more promising region • Essentially importance sampling § PG with pre‐computed caches [1][2] § On‐line PG [3][4] § PG with reinforced approach [5] [1] Jensen et al. "Photon maps in bidirectional Monte Carlo ray tracing of complex objects. “, 1995 [2] Hey et al. "Importance sampling with hemispherical particle footprints. ", 2002 [3] Vorba et al. "On‐line learning of parametric mixture models for light transport simulation. ", 2014 [4] Müller et al. "Practical Path Guiding for Efficient Light‐Transport Simulation. ", 2017 [5] Dahm, Ken, and Alexander Keller. "Learning light transport the reinforced way. ", 2017 11/29/202 0 5

Related Work – Primary Sample Space § Metropolis light transport [7] • Path configurations

Related Work – Primary Sample Space § Metropolis light transport [7] • Path configurations as samples • Correlate samples as Markov states • Mutation done by tweaking path configuration § Primary sample space MLT [8] • Tweaking random numbers • Ease of implementation § Primary samples: vectors of random numbers [ …, 0. 7041869, 0. 6541869, 0. 2358438, 0. 2548385, 0. 0998318, 0. 1089318, … ] [7] Veach et al. "Metropolis light transport. “, 1997 [8] Kelemen et al. "A simple and robust mutation strategy for the metropolis light transport algorithm. ", 2002. 11/29/202 0 6

Our Objective § To build a structure that affects sample generation • Takes as

Our Objective § To build a structure that affects sample generation • Takes as input samples from standard RNG • Output are samples more concentrated in valuable regions 11/29/202 0 7

Distinction § All methods build spatial‐directional structures in scene space • Spatially distributed (3

Distinction § All methods build spatial‐directional structures in scene space • Spatially distributed (3 D) • Hemispherical or spherical representation (2 D) § We work solely in primary sample space • Out‐of‐kernel feature • No need to explicitly build structures in scene space § Clarification • This project is about unidirectional path guiding • No Metropolis sampling involved 11/29/202 0 8

Overview § A standard path tracing solution: Sampler Luminance Path Tracer Final Image {u

Overview § A standard path tracing solution: Sampler Luminance Path Tracer Final Image {u 0, u 1, u 2, u 3, …} 11/29/202 0 9

Overview § Our primary sample space guided path tracing: {u 0, u 1, u

Overview § Our primary sample space guided path tracing: {u 0, u 1, u 2, u 3, …} Sampler {u’ 0, u’ 1, u’ 2, u’ 3, …} K‐d Tree Path Tracer {u’ 0, u’ 1, u’ 2, u’ 3, …}, L Last Iteration? Final Image Luminance 11/29/202 0 10

Method – Our Structure § We use a K dimensional binary tree as our

Method – Our Structure § We use a K dimensional binary tree as our structure § K = Mx. N: • M: bounces • N: fixed random numbers each bounce consumes § Each node encodes: • Leaf flag • Counter or right child index • Luminance value 11/29/202 0 11

Method – Outline Sample collection Tree construction (refinement) Tree sampling Rendering 11/29/202 0 12

Method – Outline Sample collection Tree construction (refinement) Tree sampling Rendering 11/29/202 0 12

Method – Sample Collection 11/29/202 0 13

Method – Sample Collection 11/29/202 0 13

Method – Sample Collection § We use a two‐tree design: one for sampling, one

Method – Sample Collection § We use a two‐tree design: one for sampling, one for collection § Tree traversal, with samples & luminance ({u’ 0, u’ 1, u’ 2, u’ 3, …}, L) {u’ 0, u’ 1, u’ 2, u’ 3}, L Range for u 0 Range for u 1 Range for u 2 Range for u 3 … depth Node Add luminance value Is Leaf? Get axis ui Get split via range[] ui Go left? Update 11/29/202 0 14

Method – Tree Construction 11/29/202 0 15

Method – Tree Construction 11/29/202 0 15

Method – Tree Construction § Start with an empty tree § Refine the tree

Method – Tree Construction § Start with an empty tree § Refine the tree after each iteration • Refine the collection tree • Copy it to the sample tree § Node division criteria: leaf node counter 11/29/202 0 16

Method – Tree Sampling 11/29/202 0 17

Method – Tree Sampling 11/29/202 0 17

Method – Tree Sampling § Tree traversal, with primary sample {u 0, u 1,

Method – Tree Sampling § Tree traversal, with primary sample {u 0, u 1, u 2, u 3, …}, {u 0, u 1, u 2, u 3} Range for u 0 Range for u 1 Range for u 2 Range for u 3 … pdf Node Is Leaf? Go left? Comp. value Get axis ui Split range[] ui Update depth 11/29/202 0 18

Method – Tree Sampling § With ranges available, we get the transformed sample by

Method – Tree Sampling § With ranges available, we get the transformed sample by warping the input sample into these ranges § We use a parameter to balance tree sampling and uniform random numbers 11/29/202 0 19

Method – Rendering 20

Method – Rendering 20

Method – Rendering § Feed the path tracer with transformed sample § Simply fetch

Method – Rendering § Feed the path tracer with transformed sample § Simply fetch random number from a proper RNG after the end • The final path length is not limited by k‐d tree dimension § Combine guided with uniform using multiple importance sampling § Correctly reweight results using the pdf that comes along: 11/29/202 0 21

Implementation Details u 0 u 1 u 2 u 3 u 0 … §

Implementation Details u 0 u 1 u 2 u 3 u 0 … § Implemented in PBRT v 3 § K‐d tree: • • • K=4, M=2, N=2 K‐d tree node division criteria 4 or 8 Max depth 20 8 bytes node layout K‐d tree per image tile (16 x 16) § Probability of sampling K‐d tree 0. 5 § 1/8 total sample budget for collection … Max depth = 20 8 bytes 1 bit leaf flag 31 bits counter/index 32 bits node value 11/29/202 0 22

Results – Ajar scene Zero radiance path ratio 98. 00% Ratio 93. 00% 88.

Results – Ajar scene Zero radiance path ratio 98. 00% Ratio 93. 00% 88. 00% 83. 00% 78. 00% 64 128 256 512 1024 2048 4096 Ajar ‐ PT Sample rate Ajar ‐ Ours 2048 rendering spl. 256 collection spl. 4096 rendering spl. 1792 rendering spl. 11/29/202 0 23

Results - Dinning room scene Ratio Zero radiance path ratio 87. 40% 87. 20%

Results - Dinning room scene Ratio Zero radiance path ratio 87. 40% 87. 20% 87. 00% 86. 80% 86. 60% 86. 40% 86. 20% 86. 00% 64 128 256 512 1024 2048 4096 Dining ‐ PT Sample rate Dining ‐ Ours 256 collection spl. 2048 rendering spl. 64 collection spl. 448 rendering spl. 1792 rendering spl. 11/29/202 0 24

Results – Staircase scene 32 + 224 Zero radiance path ratio 67. 00% Ratio

Results – Staircase scene 32 + 224 Zero radiance path ratio 67. 00% Ratio 65. 00% 63. 00% 61. 00% 59. 00% 57. 00% 64 512 128 256 512 1024 2048 4096 Staircase ‐ PT Sample rate Staircase ‐ Ours 64 collection spl. 448 rendering spl. 11/29/202 0 25

Results – Kitchen scene Ratio Zero radiance path ratio 100. 00% 98. 00% 96.

Results – Kitchen scene Ratio Zero radiance path ratio 100. 00% 98. 00% 96. 00% 94. 00% 92. 00% 90. 00% 88. 00% 86. 00% 84. 00% 82. 00% 64 128 256 512 1024 2048 4096 Kitchen ‐ PT Sample rate Kitchen ‐ Ours 128 collection spl. 4096 rendering spl. 512 collection spl. 869 rendering spl. 3584 rendering spl. 11/29/202 0 26

Results – Observations § MSEs • In all scenes, our method brings down MSE

Results – Observations § MSEs • In all scenes, our method brings down MSE • Works in regions from where light can be reached with one or two bounces § Zero radiance path ratios • In all scenes, our method brings down zero radiance paths, best case by 39. 5% • Zero radiance path ratio goes down as more samples/iterations are invested 11/29/202 0 27

Future work § Make the per tile structure adaptive § Higher dimensions • Apply

Future work § Make the per tile structure adaptive § Higher dimensions • Apply to Bi‐directional path tracing Acknowledgement § PBRT authors for the book and pbrt § Benedikt Bitterli [1] for the awesome 3 D scenes freely available online § Reviewers for the insightful feedback [1] https: //benedikt‐bitterli. me/resources/ 11/29/202 0 28

Conclusion § We presented an unbiased path guiding scheme § Path guiding in primary

Conclusion § We presented an unbiased path guiding scheme § Path guiding in primary sample space is practical • Easy to implement • Out‐of‐kernel feature • Efficient 11/29/202 0 29

Thank you! Questions are welcome! 11/29/202 0 30

Thank you! Questions are welcome! 11/29/202 0 30