lecture 13 bidirectional
play

Lecture 13 - Bidirectional Welcome! , = (, ) , - PowerPoint PPT Presentation

INFOMAGR Advanced Graphics Jacco Bikker - November 2019 - February 2020 Lecture 13 - Bidirectional Welcome! , = (, ) , + , , ,


  1. INFOMAGR – Advanced Graphics Jacco Bikker - November 2019 - February 2020 Lecture 13 - “ Bidirectional ” Welcome! 𝑱 𝒚, 𝒚 ′ = 𝒉(𝒚, 𝒚 ′ ) 𝝑 𝒚, 𝒚 ′ + න 𝝇 𝒚, 𝒚 ′ , 𝒚 ′′ 𝑱 𝒚 ′ , 𝒚 ′′ 𝒆𝒚′′ 𝑻

  2. Today’s Agenda: ▪ Introduction: Forward Path Tracing ▪ Virtual Point Lights ▪ Photon Mapping ▪ Path Guiding

  3. Advanced Graphics – Bidirectional 3 Forward Backward and Forward Path Tracing t = 3 t = 4 t = 6 t = 2 t = 5 = + + + + s = 6 s = 2 s = 3 s = 4 s = 5 = + + + + Images: Simon Brown, sjbrown.co.uk/2011/01/03/two-way-path-tracing

  4. Advanced Graphics – Bidirectional 4 Forward Forward Path Tracing A ‘normal’ path tracer works back to the lights (valid, Helmholtz). A light tracer or forward path tracer keeps the original propagation direction of light: towards the camera.

  5. Advanced Graphics – Bidirectional 5 Forward Forward Path Tracing A ‘normal’ path tracer works back to the lights (valid, Helmholtz). A light tracer or forward path tracer keeps the original propagation direction of light: towards the camera. Consequences / issues: 1. ‘Eye’ must have an area. 2. Or: use Next Event Estimation. 3. If the eye sees a mirror, it will be black. 4. This is a bad idea in an open world scene. 5. Paths hit random pixels (however, on average…). 6. What if the camera is behind glass?

  6. Advanced Graphics – Bidirectional 6 Forward Forward Path Tracing Tracing paths from the light helps when: ▪ the light is hard to reach ▪ the light cannot be importance sampled (using NEE) . Tracing paths from the eye is better when: ▪ the camera is hard to reach. Many scenes would benefit from both approaches. Now what? ▪ decide on a per-pixel basis? ▪ do both and average? (would that even work?) ▪ something smarter?

  7. Advanced Graphics – Bidirectional 7 Forward So… a forward path tracer cannot correctly render a scene in which Forward Path Tracing the camera directly views pure specular objects. Tracing paths from the light helps when: Is it possible to construct a scene ▪ the light is hard to reach that cannot be correctly rendered ▪ the light cannot be importance sampled (using NEE) . using a backward path tracer? Tracing paths from the eye is better when: ▪ the camera is hard to reach. Many scenes would benefit from both approaches. Now what? ▪ decide on a per-pixel basis? ▪ do both and average? (would that even work?) ▪ something smarter?

  8. Advanced Graphics – Bidirectional 8 Forward Forward Path Tracing The problem with this scene: ▪ When a path hits the torus, it can’t use NEE ▪ This is true for light tracing and path tracing. The problematic paths are SDS paths*: E: eye D: diffuse S: specular L: light (a light tracer fails on L (…) SE paths.) *: Heckbert, Adaptive radiosity textures for bidirectional ray tracing. SIGGRAPH 1990.

  9. Advanced Graphics – Bidirectional 9 Forward Path Classification t = 6 t = 2 t = 3 t = 4 t = 5 = + + + + s = 6 s = 2 s = 3 s = 4 s = 5 = + + + + energy returned by energy returned by energy returned by energy returned by energy returned by 𝑢 = 5, 𝑡 = 5 paths 𝑢 = 6, 𝑡 = 6 paths 𝑢 = 2, 𝑡 = 2 paths 𝑢 = 3, 𝑡 = 3 paths 𝑢 = 4, 𝑡 = 4 paths EL - LE EDL - LDE E(D|S)DL L(D|S)DE

  10. Advanced Graphics – Bidirectional 10 Forward Forward Path Tracing The problem with this scene: ▪ The wood inside the ring benefits from NEE ▪ But sometimes much more energy arrives via the metal. Here, NEE correctly samples the direct illumination, but the indirect illumination (via the metal) is poorly represented by the cosine pdf.

  11. Advanced Graphics – Bidirectional 11 Forward Today Paths with high throughput and a low probability yield severe noise. ▪ Sometimes it’s better to trace from the light. ▪ Sometimes backward nor forward work well. Bidirectional techniques aim to exploit benefits of both.

  12. Today’s Agenda: ▪ Introduction: Forward Path Tracing ▪ Virtual Point Lights ▪ Photon Mapping ▪ Path Guiding

  13. Advanced Graphics – Bidirectional 13 VPLs Instant Radiosity* Idea: Trace 𝑂 particles (where 𝑂 is ~ 10 3 .. 10 5 ) from the light sources, record non-specular hits. At each bounce, use Russian roulette. Each recorded hit becomes a virtual point light . Now, render the scene as usual (rasterization, or Whitted-style ray tracing). At the first diffuse surface, use the VPLs to estimate indirect light, and the lights themselves for direct illumination. (did we account for all light transport?) *: A. Keller, Instant Radiosity. S IGGRAPH ‘97.

  14. Advanced Graphics – Bidirectional 14 VPLs Instant Radiosity Images: M. Hasan, SIGGRAPH Asi a ‘09.

  15. Advanced Graphics – Bidirectional 15 VPLs Instant Radiosity Using VPLs has some interesting characteristics: ▪ No noise! Those splotches though… ▪ VPLs can bounce: they can represent all indirect light ▪ VPLs cannot represent direct light ▪ #VPLs < #pixels ▪ Evaluating VPLs can be done with or without occlusion ▪ VPL visibility can also be evaluated using shadow maps Instant Radiosity is a bidirectional technique: we propagate flux when placing the VPLs, and we propagate im importance when connecting to them. VPLs on glossy surfaces do not work. (why not?)

  16. Today’s Agenda: ▪ Introduction: Forward Path Tracing ▪ Virtual Point Lights ▪ Photon Mapping ▪ Path Guiding

  17. Advanced Graphics – Bidirectional 17 Photons Photon Mapping* Idea: what if we got rid of visibility queries altogether? With the photon mapping algorithm, we split rendering in two phases: ▪ In phase 1 we deposit flux ( Φ ) in the scene by tracing a large number of photons; ▪ In phase 2, we estimate illumination using the photon map. *: Henrik Wann Jensen, The photon map in global illumination. Ph.D. dissertation, 1996.

  18. Advanced Graphics – Bidirectional 18 Photons Photon Mapping Phase 1: propagating flux. Photon emission: ▪ Point light: emitted in uniformly distributed random directions from the point. ▪ Area light: emitted from random positions on the square, with directions limited to a hemisphere. The emission directions are chosen from a cosine distribution. All photons thus have the same power: their density is the only way to express varying brightness.

  19. Advanced Graphics – Bidirectional 19 Photons Photon Mapping Phase 1: propagating flux. Surface interaction: A photon that hits a surface may get absorbed or reflected (Russian roulette).

  20. Advanced Graphics – Bidirectional 20 Photons Photon Mapping Phase 1: propagating flux. Photon storage: At each non-specular path vertex we store the photon: struct photon { float3 position; // world space position of the photon hit float3 power; // current power level for the photon float3 L; // incident direction }; A photon may be stored multiple times along its path before it gets absorbed. Since the total set of photons represents the illumination, we divide photon power by the total number of stored photons.

  21. Advanced Graphics – Bidirectional 21 Photons Photon Mapping Phase 2: radiance estimation. In the second pass, we render the scene using rasterization or Whitted-style ray tracing; the photon map is used to estimate illumination. At each non-specular path vertex we estimate the reflected radiance: 𝑀 𝑦, 𝜕 𝑝 = න 𝑔 𝑠 𝑦, 𝜕 𝑗 , 𝜕 𝑝 𝑀 𝑗 𝑦, 𝜕 𝑗 cos 𝜄 𝑗 𝑒𝜕 𝑗 Ω 𝑦 This requires information about the radiance 𝑀 𝑗 𝑦, … arriving over the hemisphere Ω 𝑦 . We estimate this radiance by looking at the photon density at 𝑦 : 𝑂 𝑀 𝑦, 𝜕 𝑝 ≈ 1 𝜌𝑠 2 ෍ 𝑔 𝑠 𝑦, 𝜕 𝑞 , 𝜕 𝑝 ∆Φ 𝑦, 𝜕 𝑞 𝑞=1

  22. Advanced Graphics – Bidirectional 22 Photons Photon Mapping Phase 2: radiance estimation. We estimate this radiance by looking at the photon density at 𝑦 : 𝑂 𝑀 𝑦, 𝜕 𝑝 ≈ 1 𝜌𝑠 2 ෍ 𝑔 𝑠 𝑦, 𝜕 𝑞 , 𝜕 𝑝 ∆Φ 𝑦, 𝜕 𝑞 𝑞=1 Note: ▪ We assume that we gathered photons on a disc of radius 𝑠 . ▪ We assume that the gathered photons belong to the same surface. ▪ Each photon within radius 𝑠 has the same influence on the estimate.

  23. Advanced Graphics – Bidirectional 23 Photons Photon Mapping Phase 2: radiance estimation. Instead of using the same weight for each photon we can use a filter: 2 𝑥 𝑞𝑕 = 𝛽 1 − 1 − 𝑓 −𝛾 𝑒 𝑞 2𝑠 2 , 1 − 𝑓 −𝛾 2 is the squared distance between photon 𝑞 and 𝑦 . where 𝛽 = 0.918 , 𝛾 = 1.953 *. Value 𝑒 𝑞 Now: 𝑂 𝑀 𝑦, 𝜕 𝑝 ≈ ෍ 𝑔 𝑠 𝑦, 𝜕 𝑞 , 𝜕 𝑝 ∆Φ 𝑦, 𝜕 𝑞 𝑥 𝑞𝑕 . 𝑞=1 *: Mark J. Pavicic, Convenient Anti-Aliasing Filters that Minimize Bumpy Sampling. In Graphics Gems I.

  24. Advanced Graphics – Bidirectional 24 Photons Photon Mapping Algorithm characteristics: ▪ Low-frequent noise ▪ Can be used in a rasterizer ▪ Can be used for direct + indirect ▪ Still a bidirectional technique

  25. Advanced Graphics – Bidirectional 25 Photons Photon Mapping Algorithm characteristics: ▪ Low-frequent noise ▪ Can be used in a rasterizer ▪ Can be used for direct + indirect ▪ Still a bidirectional technique

  26. Today’s Agenda: ▪ Introduction: Forward Path Tracing ▪ Virtual Point Lights ▪ Photon Mapping ▪ Path Guiding

  27. Advanced Graphics – Bidirectional 27 Path Guiding

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend