Physically-Based Rendering
Shih-Chin Weng
shihchin.weng@gmail.com
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
Shih-Chin Weng
shihchin.weng@gmail.com
The Chemical Brothers - Wide Open, The Mill
– BRDF, BSSRDF, BTF, etc.
– Ray tracing, photon-mapping, radiosity, etc.
– Tone mapping
Video: What Is Light? by Kurzgesagt
Video: What Is Light? by Kurzgesagt
– in straight lines – instantaneously through a medium
– No diffraction, dispersion – But the movie “Interstellar” does simulate the light bent by gravity!!
specular diffuse diffuse scattering particles
Photo by Gabriel Gurrola
Index of Refraction (IOR): 𝜃
𝜄𝑗 𝜄𝑗 𝜄𝑢
𝜃𝑗 𝜃𝑢
https://en.wikipedia.org/wiki/Snell%27s_law#/media/File:Snells_law_wavefronts.gif
Index of Refraction (IOR): 𝜃
𝜄𝑗 𝜄𝑗 𝜄𝑢
𝜃𝑗 𝜃𝑢
https://en.wikipedia.org/wiki/Snell%27s_law#/media/File:Snells_law_wavefronts.gif
Photo by Ales Krivec
refraction reflection
Photo by Ashes Sitoula
F0
reflectance at normal more and more reflective as the angle of view approaches a grazing angle
– the amount of reflected light w.r.t. the viewing angle
– Incident direction – Polarization – Materials’ properties
Non-metal (dielectrics)
incoming light in average
independent on the wavelength
during reflection
– but might be absorbed during subsurface scattering
Metal
wavelength
refracted lights (i.e. no refraction)
– The reflected lights would change their color
[Real-time Rendering, 3/e, A K Peters 2008]
[Real-time Rendering, 3/e, A K Peters 2008]
[Real-time Rendering, 3/e, A K Peters 2008]
[Real-time Rendering, 3/e, A K Peters 2008]
[Real-time Rendering, 3/e, A K Peters 2008]
Reflection goes to 100% at grazing angle!
𝜄𝑗 𝜄𝑗 𝜄𝑢
𝜃𝑗 𝜃𝑢
Fr = 1 2 𝑠
∥ 2 + 𝑠 ⊥ 2 Dielectric
r∥ = ηt cos 𝜄𝑗 − 𝜃𝑗 cos 𝜄𝑢 ηt cos 𝜄𝑗 + 𝜃𝑗 cos 𝜄𝑢 r⊥ = ηi cos 𝜄𝑗 − 𝜃𝑢 cos 𝜄𝑢 ηi cos 𝜄𝑗 + 𝜃𝑢 cos 𝜄𝑢
Conductor
r∥
2 = η2 + k2 cos2 θ𝑗 − 2η cos 𝜄𝑗 + 1
η2 + k2 cos2 θ𝑗 + 2η cos 𝜄𝑗 + 1 r⊥
2 = η2 + k2 − 2η cos 𝜄𝑗 + cos2 𝜄𝑗
η2 + k2 + 2η cos 𝜄𝑗 + cos2 𝜄𝑗 for unpolarized light
Radiant flux Φ =
dQ dt (J/sec) The total amount of energy
passing through a region of surface per unit time
Irradiance 𝐹 =
𝑒𝛸 𝑒𝐵 Pre area incoming flux at a surface
Radiant Exitance or Radiosity
𝑁 = 𝐶 = 𝑒𝛸 𝑒𝐵 𝐹 = Φ 4𝜌𝑠2
the total amount 𝛸 measured at inner and outer sphere is the same (equals to the radiant flux of the point light) r
𝐹 = 𝑒𝛸 𝑒𝐵
𝑒𝐵 = 𝑒𝐵′ cos 𝜄 𝑒𝐵
𝐹1 = 𝑒𝛸 𝑒𝐵 𝐹2 = 𝑒𝛸 𝑒𝐵′ = cos 𝜄 𝑒𝛸 𝑒𝐵 = 𝐹1 cos 𝜄
𝜄 𝑒𝐵
– The total area on a unit sphere subtended by the object – A set of directions – Measured in steradians (sr) – Often denoted as 𝜕 Ω = A r2
flux projected area solidangle
𝑒𝐵 𝑒𝜕 𝑒𝐵⊥ The density of photons passing near x and traveling in directions near ω
𝑐 Ԧ 𝑢 𝑜
𝜕𝑗 𝜕𝑝 𝜄𝑗 𝜄𝑝 𝜚𝑗 𝜚𝑝
𝑔(𝜄𝑗, 𝜚𝑗, 𝜄𝑝, 𝜚𝑝) = 𝑔(𝜕𝑗, 𝜕𝑝)
incoming irradiance
incoming irradiance
– symmetric surface reflectance 𝑔 𝜕𝑗, 𝜕𝑝 = 𝑔(𝜕𝑝, 𝜕𝑗)
𝑔 𝜕𝑗, 𝜕𝑝 ≥ 0
– Total amount of outgoing energy must be less than or equal to the incoming energy
http://www.disneyanimation.com/technology/brdf.html
[Image courtesy of Disney.]
from Disney Animation
isotropic anisotropic
[White et al, JAO 98] [Marschner et al. 1999]
http://www.merl.com/brdf/
“A Data-Driven Reflectance Model”, Matusik et al., SIG’03
[Ngan et al., 2005]
ℎ = Ԧ 𝑚 + Ԧ 𝑤 Ԧ 𝑚 + Ԧ 𝑤 macrogeometry
ℎ = Ԧ 𝑚 + Ԧ 𝑤 Ԧ 𝑚 + Ԧ 𝑤 macrogeometry
𝜄𝑛 𝜄𝑛 𝑛 Ԧ 𝑚 Ԧ 𝑤 ℎ = Ԧ 𝑚 + Ԧ 𝑤 Ԧ 𝑚 + Ԧ 𝑤 microfacet: ideal mirror macrogeometry
𝑠 Ԧ
Normal Distribution Function (NDF) Fresnel reflectance Geometric Term 𝜄𝑚, 𝜄𝑤: angle between Ԧ 𝑚, Ԧ 𝑤 and normal 𝜄ℎ: angle between normal and ℎ 𝜄𝑒: difference between Ԧ 𝑚 (𝑝𝑠 Ԧ 𝑤) and ℎ
The ratio of micro-surface area visible to the light, viewer
𝐺
𝑇𝑑ℎ𝑚𝑗𝑑𝑙 = 𝐺 0 + 1 − 𝐺
1 − 𝑑𝑝𝑡 𝜄𝑗 5 – Where F0 =
η2−𝜃1 η2+𝜃1 2
? What if 𝜃2 = 𝜃1
𝑇𝑑ℎ𝑚𝑗𝑑𝑙 = 1 − 𝑑𝑝𝑡 𝜄𝑗 5 ≠ 0
Ԧ 𝑚+𝑤 Ԧ 𝑚+𝑤
Photo by Liu Zai Hou
[Ngan et al., SIG’04]
[Ngan et al., SIG’04]
[Ngan et al., SIG’04]
𝐸 𝜕 = න
ℳ
𝜀𝜕 𝜕𝑛 𝑞𝑛 𝑒𝑞𝑛
microsurface
𝐸 𝜕 = න
ℳ
𝜀𝜕 𝜕𝑛 𝑞𝑛 𝑒𝑞𝑛
microsurface
𝐸 𝜕 = න
ℳ
𝜀𝜕 𝜕𝑛 𝑞𝑛 𝑒𝑞𝑛
microsurface Ω
𝐸 𝜕 = න
ℳ
𝜀𝜕 𝜕𝑛 𝑞𝑛 𝑒𝑞𝑛
microsurface Ω 𝜕𝑛: ℳ → Ω
𝑛𝑗𝑑𝑠𝑝𝑡𝑣𝑠𝑔𝑏𝑑𝑓 𝑏𝑠𝑓𝑏 = න
ℳ
𝑒𝑞𝑛 = න
Ω
𝐸 𝜕𝑛 𝑒𝜕𝑛
𝜕: normal of macrosurface
𝑞𝑠𝑝𝑘𝑓𝑑𝑢𝑓𝑒 𝑛𝑗𝑑𝑠𝑝𝑡𝑣𝑠𝑔𝑏𝑑𝑓 𝑏𝑠𝑓𝑏 = න
Ω
𝜕𝑛 ⋅ 𝜕 𝐸 𝜕𝑛 𝑒𝜕𝑛
projection
masking shadowing
[Heitz ‘14]
cos 𝜄𝑝 = න
Ω
𝐻1 𝜕𝑝, ω𝑛 𝜕𝑝, ω𝑛 𝐸 𝜕𝑛 𝑒𝜕𝑛
masking function
[Heitz ‘14]
cos 𝜄𝑝 = න
Ω
𝐻1 𝜕𝑝, ω𝑛 𝜕𝑝, ω𝑛 𝐸 𝜕𝑛 𝑒𝜕𝑛
masking function
Ω 𝑔 𝑚, 𝑤 cos 𝜄𝑗 𝑒𝜕𝑗 ≤ 1
[Heitz, 2015]
University, CS 6630, Fall 2015.