Download presentation
Presentation is loading. Please wait.
Published byPoppy Pearson Modified over 8 years ago
1
1 Photon-driven Irradiance Cache J. BrouillatP. GautronK. Bouatouch INRIA RennesUniversity of Rennes1
2
2 Motivations Global Illumination in scenes with complex light interactions Indirect diffuse component is very important for the overall aspect of final rendering Multiples bounces, any lighting, large scenes (architectural design, walkthrough) –Interactive or view-independent Fast preview of good quality Photon-Driven Irradiance Cache
3
3 Previous work Mesh-based –Radiosity & Lightmaps [Goral et al. 84]: compute a solution for the whole scene at once, can be interactively displayed, Discontinuity meshing [Lischinski 92] Point-based –Irradiance Cache [Ward et al. 88]: Irradiance is sparsely sampled over surfaces Radiance cache splatting [Gautron et al. 05]: interactive display of an irradiance cache –Photon mapping [Jensen 96]: divides light flux into photons Complex lighting, very large scenes [Christensen et al. 04] Final gathering combined with irradiance cache Photon-Driven Irradiance Cache
4
4 Previous work Point-based (continued) –Instant radiosity [Keller 97]: approximate indirect lighting using several virtual point-light sources (VPLs) Many-light sources problem: Lightcuts [Walter et al. 05], Matrix Row-Column Sampling [Hasan et al. 07] Incremental Instant Radiosity [Laine et al. 07]: interactive, limited to one bounce interactions Metropolis Instant Radiosity [Segovia et al. 07]: reduce the number of VPLs used, view dependent –Direct-to-indirect transfer [Hasan et al. 06]: samples surface with points, precompute contribution of these points to final image Dynamic lights, fixed scene/viewpoint High-quality interactive relighting, large precomputation time (hours) –Meshless Hierarchical basis [Lehtinen et al. 08] Dynamic lights and viewpoint, long precomputation time. Photon-Driven Irradiance Cache
5
5 Our approach Point-based + short precomputation time + view independency How: combination of photon maps and irradiance cache –Photon map: Elegant method, widely used Any kind of light sources, multiple bounces, highly dense environments, large scenes –Irradiance caching: Interactive display, compact representation, no surface parameterization Compute a view-independent irradiance cache from a photon map Advantages: –Fast view-independent preview of photon map simulations –Uses GPUs (splatting) –Easy to implement Photon-Driven Irradiance Cache Our algorithm
6
6 More precisely… Photon Mapping –(+) View-independent lighting simulation (scattering photons) –(-) Rendering is either noisy or costly (final gathering), and view-dependent Irradiance Cache –(+) Interactive rendering of the cache for static scene, high quality –(-) View dependent: new records have to be created when walking through unexplored parts of the scene. Records cover the whole scene: many viewpoints Our approach –We first compute a coarse irradiance cache from a photon map Covers the whole scene: view independent No additional rays to be cast Interactive fast preview of the photon map solution –This coarse cache can be refined using final gathering Reduce the number of rays cast, using visibility information from the photon paths Photon-Driven Irradiance Cache Our algorithm
7
7 Irradiance cache: set of records A record: –Position (vector) –Harmonic mean distance, D H, from record to other objects of the scene (scalar) –Irradiance value (vector) –Irradiance gradient (vector) Deduce these values from a photon map Irradiance cache data structure Photon-Driven Irradiance Cache Irradiance cache
8
8 Algorithm overview 1 st pass : –Building a classical photon map 2 nd pass, from the photon map : –Deduce position of irradiance records and harmonic mean distance –Compute coarse irradiance values for each record –Coarse irradiance cache can be used for interactive (pre-)vizualisation 3 rd pass : –Refine irradiance values associated with each record using final gathering, compute gradients –Can be done in parallel with previzualisation –Refine first the visible records Photon-Driven Irradiance Cache
9
9 direct lightingphoton map : 250k photons Scattering the photon across the scene –We fix a minimal number of bounces, then use Russian Roulette First Pass: Photon map Photon-Driven Irradiance Cache First pass
10
10 Second Pass: Irradiance record positions We want the cache to cover most part of the scene (avoid cache misses) –Records need to be created at each point where incident irradiance is not null –Photon represents incident light We use photon positions as “candidates” for records As we process each photon position, we have to decide whether to create a new record or not. Photon-Driven Irradiance Cache Second pass
11
11 We start with an empty cache The record A is created at photon a position –This record have a zone of influence –Inside this zone, the irradiance stored in the record A will be used for interpolation. –Its data structure is augmented with a new field giving a list of all the photons within its zone of influence (kd-tree query) Irradiance record positions 1 Photon-Driven Irradiance Cache Second pass
12
12 Photon b lies inside the zone of influence of a previous created record –No need to create a new record at b position How do we know it ? –In classical irradiance caching, the records are stored in an octree –Octree query provide the neighborhood of b Millions of photons: too costly Our approach avoids any octree query How: new field in the photon data structure –w c : cumulative contribution of neighbour records, updated at the creation of each record Irradiance record positions 2 Photon-Driven Irradiance Cache Second pass
13
13 Decision on creating a new record or not relies on w c –For photon c, w c is less than a given threshold: not enough records around it –Then a new record C is created at photon position w c field of all the photons lying in the zone of influence of C is updated Irradiance record positions 3 Photon-Driven Irradiance Cache Second pass
14
14 Harmonic mean distance estimation Irradiance records need to carry D H, the harmonic mean distance to objects of the scene D H is used to determine the size of the zone of influence of the record Bad estimation leads to artifacts during rendering Photon-Driven Irradiance Cache Second pass
15
15 Usually done by casting rays towards the scene We want to deduce D H from the photon maps without additional ray casting Harmonic mean distance estimation 1 Photon-Driven Irradiance Cache Second pass
16
16 Harmonic mean distance estimation 2 Photons store information about the distance between subsequent hit points Photons close to a record K give us information about visibility around K Photon-Driven Irradiance Cache Second pass
17
17 By reprojection, we estimate visibility around K without casting rays This may miss some occluders, and introduce errors We use only photons close to K: –inside the zone of influence Neighbour clamping [Krivanek et al. 06] –Reduction of D H based on neighbour records (borders,…) Harmonic mean distance estimation 3 Photon-Driven Irradiance Cache Second pass
18
18 Estimating irradiance from photon map We estimate incoming irradiance at record positions with density estimation Usually, search for the n-nearest neighbours photons in a kd-tree –Automatic adaptation with actual density of photon at P –n can be seen as a trade off between noise and blur in the final image P A Irradiance at P = sum of flux carried by n photons divided by area A n = ? Photon-Driven Irradiance Cache Second pass
19
19 Records with large zone of influence may have high visual importance on the final rendered images Blur is visually more pleasant than noise, for previews We want n vary depending on the size of the zone of influence To this end, we use a range-search approach –Search for the nearest photon lying in the zone of influence P A r = α.D H r Photon-Driven Irradiance Cache Second pass Estimating irradiance from photon map
20
20 Coarse irradiance cache 250 k photons, 4 bounces –PM : 0.8 sec –Cache Generation : 1,20 sec Irradiance values –Still some noise –no gradients Interactive visualization Fast preview of global illumination solution from a photon map Photon-Driven Irradiance Cache Second pass Results
21
21 Third Pass: Refining the cache We would like to refine the coarse cache: –More accurate estimation of irradiance for each record –Compute irradiance gradients We use gradients from [Krivanek et al. 05] –dividing the hemisphere into cells and by casting rays (final gathering) We want to save rays thanks to information contained in the photon map Photon-Driven Irradiance Cache Third pass
22
22 Like D H estimation, reuse visibility information from photons Photons are linked along a path –Instantly retrieve the photon corresponding to last hit point Assign each last-hit-point-photon to a cell of the hemisphere. Refining the cache 1 Photon-Driven Irradiance Cache Third pass
23
23 Photons have been assigned a cumulative irradiance value at the end of the 2 nd pass If a cell has been assigned a photon: –Fast estimation of incident radiance –No ray cast Refining the cache 2 Photon-Driven Irradiance Cache Third pass
24
24 Cast rays through non already assigned cells Incident radiance along the ray –search for the nearest photon at intersection point Compute irradiance and gradients Possible to refine D H : –Consequence: creation of new records Refining the cache 3 Photon-Driven Irradiance Cache Third pass
25
25 Results Cornell Box (32 poly.) 250 k photons, 4 bounces Total time 6.7 sec –PM : 0.8 sec –Cache Generation : 1,20 sec –Refinement : 4.6 sec 39% saved rays (compared to brute force final gathering per record) visualization 40 fps Results gathered on a Pentium4 3.8 Ghz computer, 2GB RAM, NVidia GeForce 7800 GTX 512MB Photon-Driven Irradiance Cache Third pass Results
26
26 Results Sibenik Cathedral (80k poly.) 4 M photons, 9 bounces Total time 204 sec –PM : 30 sec –Cache Generation : 12 sec –Refinement : 162 sec 46% saved rays Visualization 5 fps Results gathered on a Pentium4 3.8 Ghz computer, 2GB RAM, NVidia GeForce 7800 GTX 512MB Photon-Driven Irradiance Cache Third pass Results
27
27 Fast preview comparison End of 2 nd pass View-independent: 28.3 + 11.9 sec View-dependent: 28.3 + 1.5 sec End of 3 rd pass View-independent: 28.3 + 174 sec View-dependent: 28.3 + 26 sec Photon-Driven Irradiance Cache Comparisons
28
28 Refined cache comparison Stochastic ray tracing 900 rays / pixel : 1300 sec View dependent Photon-driven Irradiance Cache 7 sec, view independent Interactive visualization Photon-Driven Irradiance Cache Comparisons
29
29 Refined cache comparison Stochastic ray tracing 900 rays / pixel : 3hour View dependent Photon-driven Irradiance Cache 204 sec, view independent Interactive visualization Photon-Driven Irradiance Cache Comparisons
30
30 Conclusion Combination of photon maps and irradiance cache Compute an irradiance cache from a photon map –Fast view-independent preview of photon map simulations –High-quality after refinement –Easy to implement Future works –Parallelization of irradiance cache creation –Glossy surfaces, using a radiance cache [Krivanek et al. 05] –Out-of-core aspects (very large scenes) Photon-Driven Irradiance Cache
31
31 Questions? Fin Photon-Driven Irradiance Cache
32
32 Our approach Point-based + short precomputation time + view independency How: combination of photon maps and irradiance cache –Photon map: Elegant method, widely used Any kind of light sources, multiple bounces, highly dense environments, large scenes –Irradiance caching: Interactive display, compact representation, no surface parameterization Compute a view-independent irradiance cache from a photon map Advantages: –Fast view-independent preview of photon map simulations –Uses GPUs (splatting) –Easy to implement Photon-Driven Irradiance Cache Our algorithm
33
33 More precisely… Photon Mapping –(+) View-independent lighting simulation (scattering photons) –(-) Rendering is either noisy or costly (final gathering), and view-dependent Irradiance Cache –(+) Interactive rendering of the cache for static scene, high quality –(-) View dependent: new records have to be created when walking through unexplored parts of the scene. Records cover the whole scene: many viewpoints Our approach –We first compute a coarse irradiance cache from a photon map Covers the whole scene: view independent No additional rays to be cast Interactive fast preview of the photon map solution –This coarse cache can be refined using final gathering Reduce the number of rays cast, using visibility information from the photon paths Photon-Driven Irradiance Cache Our algorithm
34
34 Estimating irradiance from photon map over-estimation of A Boundary bias: error in estimation of area A –Over estimation around geometry boundaries –Under estimation on curved surfaces –Light leaks Since we’re doing much less density estimations, we can use techniques to compute a more accurate approximation of A –Convex hull [Jensen01], OctoBoxes, Geometry feelers [Tobler et al. 06], … convex hull Photon-Driven Irradiance Cache Second pass
35
35 Direct visualization of photon map Photon-Driven Irradiance Cache Second pass Comparison Photon Mapping 250k photons n = 32 4 sec View dependent 1 DE / pixel Our method 250k photons 2 sec View independent Interactive display 1~2 DE / record Photon Mapping 50k photons n = 128 4 sec View dependent 1 DE / pixel [Christensen 99] caching 50k photons n = 128 1,25 + 2.5 sec View dependent 1 DE / photon
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.