physically based rendering
play

Physically-Based Rendering Shih-Chin Weng shihchin.weng@gmail.com - PowerPoint PPT Presentation

Physically-Based Rendering Shih-Chin Weng shihchin.weng@gmail.com What is PBR? The Chemical Brothers - Wide Open, The Mill Physically Based Rendering Simulate materials and lights based on physical laws or observations of real world more


  1. Physically-Based Rendering Shih-Chin Weng shihchin.weng@gmail.com

  2. What is PBR?

  3. The Chemical Brothers - Wide Open, The Mill

  4. Physically Based Rendering Simulate materials and lights based on physical laws or observations of real world more accurately.

  5. Stages of Photorealistic Rendering 1. Measurement and acquisition of scene data – BRDF, BSSRDF, BTF, etc. 2. Light transport simulation – Ray tracing, photon-mapping, radiosity, etc. 3. Visual display – Tone mapping

  6. What Is Light? Video: What Is Light? by Kurzgesagt

  7. Video: What Is Light? by Kurzgesagt

  8. Geometric Optics • Assumption: the wavelength of light is much smaller than the scale of interacted object • Light travels – in straight lines – instantaneously through a medium • Light is not influenced by gravity or magnetic fields – No diffraction, dispersion – But the movie “ Interstellar ” does simulate the light bent by gravity!!

  9. Light Matter Interaction specular diffuse diffuse scattering particles

  10. Snell’s Law Photo by Gabriel Gurrola

  11. Snell’s Law 𝑡𝑗𝑜 𝜄 𝑗 𝜃 𝑗 = 𝑡𝑗𝑜 𝜄 𝑢 𝜃 𝑢 𝜄 𝑗 𝜄 𝑗 𝜃 𝑗 Index of Refraction (IOR): 𝜃 𝜃 𝑢 𝜄 𝑢 https://en.wikipedia.org/wiki/Snell%27s_law#/media/File:Snells_law_wavefronts.gif

  12. Snell’s Law 𝑡𝑗𝑜 𝜄 𝑗 𝜃 𝑗 = 𝑡𝑗𝑜 𝜄 𝑢 𝜃 𝑢 𝜄 𝑗 𝜄 𝑗 𝜃 𝑗 Index of Refraction (IOR): 𝜃 𝜃 𝑢 𝜄 𝑢 https://en.wikipedia.org/wiki/Snell%27s_law#/media/File:Snells_law_wavefronts.gif

  13. Fresnel Effect reflection refraction Photo by Ales Krivec

  14. Fresnel Effect more and more reflective as the angle of view approaches a grazing angle F0 reflectance at normal Photo by Ashes Sitoula

  15. Fresnel • Fresnel reflectance – the amount of reflected light w.r.t. the viewing angle • Relates the ratio of reflected and transmitted energy as a function of – Incident direction – Polarization – Materials’ properties

  16. Material Properties Non-metal (dielectrics) Metal • Only reflect 4~10% of • IOR strongly depends on the incoming light in average wavelength • The reflection intensity is • Immediately absorbs independent on the refracted lights (i.e. no wavelength refraction) • No energy is absorbed – The reflected lights would during reflection change their color – but might be absorbed during subsurface scattering

  17. Fresnel Reflectance [ Real-time Rendering , 3/e, A K Peters 2008]

  18. Fresnel Reflectance [ Real-time Rendering , 3/e, A K Peters 2008]

  19. Fresnel Reflectance [ Real-time Rendering , 3/e, A K Peters 2008]

  20. Fresnel Reflectance [ Real-time Rendering , 3/e, A K Peters 2008]

  21. Reflection goes to 100% at grazing angle! Fresnel Reflectance [ Real-time Rendering , 3/e, A K Peters 2008]

  22. Fresnel for unpolarized light F r = 1 2 + 𝑠 2 2 𝑠 ∥ ⊥ Dielectric r ∥ = η t cos 𝜄 𝑗 − 𝜃 𝑗 cos 𝜄 𝑢 𝜄 𝑗 𝜄 𝑗 η t cos 𝜄 𝑗 + 𝜃 𝑗 cos 𝜄 𝑢 r ⊥ = η i cos 𝜄 𝑗 − 𝜃 𝑢 cos 𝜄 𝑢 𝜃 𝑗 η i cos 𝜄 𝑗 + 𝜃 𝑢 cos 𝜄 𝑢 𝜃 𝑢 Conductor 𝜄 𝑢 2 = η 2 + k 2 cos 2 θ 𝑗 − 2η cos 𝜄 𝑗 + 1 r ∥ η 2 + k 2 cos 2 θ 𝑗 + 2η cos 𝜄 𝑗 + 1 2 = η 2 + k 2 − 2η cos 𝜄 𝑗 + cos 2 𝜄 𝑗 r ⊥ η 2 + k 2 + 2η cos 𝜄 𝑗 + cos 2 𝜄 𝑗

  23. Radiometry the total amount 𝛸 measured at inner and outer sphere is the same (equals to the radiant flux of the point light) dQ Radiant flux Φ = dt (J/sec) The total amount of energy passing through a region of surface per unit time Φ 𝑒𝛸 Irradiance 𝐹 = 𝐹 = 4𝜌𝑠 2 𝑒𝐵 r Pre area incoming flux at a surface Radiant Exitance or Radiosity 𝑁 = 𝐶 = 𝑒𝛸 𝑒𝐵

  24. Lambert’s Cosine Law 𝑒𝐵 𝑒𝐵 𝑒𝐵 = 𝑒𝐵′ cos 𝜄 𝜄 𝐹 = 𝑒𝛸 𝑒𝐵 𝐹 1 = 𝑒𝛸 𝐹 2 = 𝑒𝛸 𝑒𝐵′ = cos 𝜄 𝑒𝛸 = 𝐹 1 cos 𝜄 𝑒𝐵 𝑒𝐵

  25. Solidangle Ω = A r 2 – The total area on a unit sphere subtended by the object – A set of directions – Measured in steradians (sr) – Often denoted as 𝜕

  26. Radiance 𝑒𝜕 flux 𝑒 2 𝛸 𝑒 2 𝛸 𝑀 = 𝑒𝜕𝑒𝐵 ⊥ = 𝑒𝜕𝑒𝐵 𝑑𝑝𝑡 𝜄 𝑒𝐵 ⊥ 𝑒𝐵 solidangle projected area The density of photons passing near x and traveling in directions near ω

  27. B idirectional 𝑔(𝜄 𝑗 , 𝜚 𝑗 , 𝜄 𝑝 , 𝜚 𝑝 ) = 𝑔(𝜕 𝑗 , 𝜕 𝑝 ) R eflection D istribution 𝑜 𝜕 𝑝 𝜕 𝑗 𝜄 𝑝 𝜄 𝑗 F unction 𝑐 𝜚 𝑝 𝜚 𝑗 Ԧ 𝑢

  28. BRDF Definition outgoing radiance 𝑔 𝜕 𝑗 , 𝜕 𝑝 = 𝑒𝑀 𝑠 𝜕 𝑝 𝑒𝑀 𝑠 𝜕 𝑝 𝑒𝐹 𝑗 (𝜕 𝑗 ) = 𝑀 𝑗 𝜕 𝑗 𝑑𝑝𝑡 𝜄 𝑗 𝑒𝜕 𝑗 incoming irradiance

  29. 𝒕𝒒𝒇𝒐𝒆𝒋𝒐𝒉 BRDF Definition 𝒋𝒐𝒅𝒑𝒏𝒇 outgoing radiance 𝑔 𝜕 𝑗 , 𝜕 𝑝 = 𝑒𝑀 𝑠 𝜕 𝑝 𝑒𝑀 𝑠 𝜕 𝑝 𝑒𝐹 𝑗 (𝜕 𝑗 ) = 𝑀 𝑗 𝜕 𝑗 𝑑𝑝𝑡 𝜄 𝑗 𝑒𝜕 𝑗 incoming irradiance

  30. Properties of BRDFs • Helmholtz reciprocity – symmetric surface reflectance 𝑔 𝜕 𝑗 , 𝜕 𝑝 = 𝑔(𝜕 𝑝 , 𝜕 𝑗 ) • Positivity 𝑔 𝜕 𝑗 , 𝜕 𝑝 ≥ 0 • Energy conservation – Total amount of outgoing energy must be less than or equal to the incoming energy

  31. from Disney Animation http://www.disneyanimation.com/technology/brdf.html [ Image courtesy of Disney. ]

  32. Isotropic vs. Anisotropic • Isotropic BRDFs are independent of incident azimuth angle 𝜚 isotropic anisotropic

  33. BRDF Acquisition [Marschner et al. 1999] [White et al, JAO 98]

  34. MERL 100 http://www.merl.com/brdf/ “A Data - Driven Reflectance Model”, Matusik et al., SIG’03

  35. BRDF Data Fitting [Ngan et al., 2005]

  36. Microfacet Model

  37. Microfacet Model Ԧ 𝑚 + Ԧ 𝑤 macrogeometry ℎ = Ԧ 𝑚 + Ԧ 𝑤

  38. Microfacet Model Ԧ 𝑚 + Ԧ 𝑤 macrogeometry ℎ = Ԧ 𝑚 + Ԧ 𝑤

  39. microfacet: ideal mirror Microfacet Model 𝑛 𝑤 Ԧ 𝜄 𝑛 Ԧ 𝜄 𝑛 𝑚 Ԧ 𝑚 + Ԧ 𝑤 macrogeometry ℎ = Ԧ 𝑚 + Ԧ 𝑤

  40. General Microfacet BRDF Normal Distribution Function (NDF) Geometric Term Fresnel reflectance 𝑤 = 𝑒𝑗𝑔𝑔𝑣𝑡𝑓 + 𝐸 𝜄 ℎ 𝐺 𝜄 𝑒 𝐻(𝜄 𝑚 , 𝜄 𝑤 ) 𝑠 Ԧ 𝑔 𝑚, Ԧ 4 𝑑𝑝𝑡 𝜄 𝑚 𝑑𝑝𝑡 𝜄 𝑤 The ratio of micro-surface area visible to the light, viewer 𝜄 𝑚 , 𝜄 𝑤 : angle between Ԧ 𝑤 and normal 𝑚, Ԧ 𝜄 ℎ : angle between normal and ℎ 𝜄 𝑒 : difference between Ԧ 𝑤) and ℎ 𝑚 (𝑝𝑠 Ԧ

  41. Fresnel • Schlick’s approximation 1 − 𝑑𝑝𝑡 𝜄 𝑗 5 𝐺 𝑇𝑑ℎ𝑚𝑗𝑑𝑙 = 𝐺 0 + 1 − 𝐺 0 2 η 2 −𝜃 1 – Where F 0 = η 2 +𝜃 1 • a.k.a. reflectance at normal, normal reflectance, etc. ? What if 𝜃 2 = 𝜃 1 𝑇𝑑ℎ𝑚𝑗𝑑𝑙 = 1 − 𝑑𝑝𝑡 𝜄 𝑗 5 ≠ 0 • 𝐺 should be zero but 𝐺

  42. NDF (Normal Distribution Function) Ԧ 𝑚+𝑤 • Half vector ℎ = Ԧ 𝑚+𝑤 • As for perfect mirror microfacets, we can only see those facets whose normal vector 𝑛 = ℎ

  43. Highlights at Grazing Angles Photo by Liu Zai Hou

  44. Data Fitting of Acquired Data [Ngan et al. , SIG’04]

  45. Highlights at Grazing Angles [Ngan et al. , SIG’04]

  46. Data Fitting of Acquired Data (Cont’d) [Ngan et al. , SIG’04]

  47. NDF (Cont’d) • Measures area density of microsurface with respect to microsurface normal 𝐸 𝜕 = න 𝜀 𝜕 𝜕 𝑛 𝑞 𝑛 𝑒𝑞 𝑛 ℳ microsurface

  48. NDF (Cont’d) • Measures area density of microsurface with respect to microsurface normal 𝐸 𝜕 = න 𝜀 𝜕 𝜕 𝑛 𝑞 𝑛 𝑒𝑞 𝑛 ℳ microsurface

  49. NDF (Cont’d) • Measures area density of microsurface with respect to microsurface normal Ω 𝐸 𝜕 = න 𝜀 𝜕 𝜕 𝑛 𝑞 𝑛 𝑒𝑞 𝑛 ℳ microsurface

  50. NDF (Cont’d) • Measures area density of microsurface with respect to microsurface normal Ω 𝐸 𝜕 = න 𝜀 𝜕 𝜕 𝑛 𝑞 𝑛 𝑒𝑞 𝑛 ℳ 𝜕 𝑛 : ℳ → Ω microsurface

  51. NDF (Cont’d) 𝑛𝑗𝑑𝑠𝑝𝑡𝑣𝑠𝑔𝑏𝑑𝑓 𝑏𝑠𝑓𝑏 = න 𝑒𝑞 𝑛 = න 𝐸 𝜕 𝑛 𝑒𝜕 𝑛 ℳ Ω 𝑞𝑠𝑝𝑘𝑓𝑑𝑢𝑓𝑒 𝑛𝑗𝑑𝑠𝑝𝑡𝑣𝑠𝑔𝑏𝑑𝑓 𝑏𝑠𝑓𝑏 = න 𝜕 𝑛 ⋅ 𝜕 𝑕 𝐸 𝜕 𝑛 𝑒𝜕 𝑛 Ω projection 𝜕 𝑕 : normal of macrosurface

  52. Masking/Shadowing masking shadowing

  53. Conservation of Projected Area [Heitz ‘14] cos 𝜄 𝑝 = න 𝐻 1 𝜕 𝑝 , ω 𝑛 𝜕 𝑝 , ω 𝑛 𝐸 𝜕 𝑛 𝑒𝜕 𝑛 Ω masking function

  54. Conservation of Projected Area [Heitz ‘14] cos 𝜄 𝑝 = න 𝐻 1 𝜕 𝑝 , ω 𝑛 𝜕 𝑝 , ω 𝑛 𝐸 𝜕 𝑛 𝑒𝜕 𝑛 Ω masking function

  55. BRDF Validation • What makes it physically-based? 1. Reciprocity: f l, v = f v, l 2. Positivity: f l, v > 0 Ω 𝑔 𝑚, 𝑤 cos 𝜄 𝑗 𝑒𝜕 𝑗 ≤ 1 3. Energy conservation: ׬ What do we miss?

  56. Multiple Surface Bounces? [Heitz, 2015]

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