Game Engines 2021W Lecture 19: Difference between revisions

From Soma-notes
 
(4 intermediate revisions by the same user not shown)
Line 6: Line 6:
* [http://www.pbr-book.org/3ed-2018/Introduction/Photorealistic_Rendering_and_the_Ray-Tracing_Algorithm.html Photorealistic rendering and the ray tracing algorithm] from [http://www.pbr-book.org/3ed-2018/contents.html Physically Based Rendering: From Theory To Implementation] by Matt Pharr, Wenzel Jakob, and Greg Humphreys.
* [http://www.pbr-book.org/3ed-2018/Introduction/Photorealistic_Rendering_and_the_Ray-Tracing_Algorithm.html Photorealistic rendering and the ray tracing algorithm] from [http://www.pbr-book.org/3ed-2018/contents.html Physically Based Rendering: From Theory To Implementation] by Matt Pharr, Wenzel Jakob, and Greg Humphreys.


Godot's SDFGI
Godot's SDFGI & related tech
* [https://godotengine.org/article/godot-40-gets-sdf-based-real-time-global-illumination Godot gets SDF-based real time global illumination]
* Juan Linietsky, [https://godotengine.org/article/godot-40-gets-sdf-based-real-time-global-illumination Godot 4.0 gets SDF-based real time global illumination] (2020)
* http://advances.realtimerendering.com/s2015/DynamicOcclusionWithSignedDistanceFields.pdf
* Daniel Wright, [https://advances.realtimerendering.com/s2015/DynamicOcclusionWithSignedDistanceFields.pdf Dynamic Occlusion with Signed Distance Fields] (SIGGRAPH 2015)
* http://jamie-wong.com/2016/07/15/ray-marching-signed-distance-functions/
* Jamie Wong, [http://jamie-wong.com/2016/07/15/ray-marching-signed-distance-functions/ Ray Marching and Signed Distance Functions] (2016)
* https://deepai.org/publication/signed-distance-fields-dynamic-diffuse-global-illumination
* Jinkai Hu et al, [https://deepai.org/publication/signed-distance-fields-dynamic-diffuse-global-illumination Signed Distance Fields Dynamic Diffuse Global Illumination] (2020)


==Notes==
==Notes==

Latest revision as of 21:43, 23 March 2021

Resources

Ray tracing

Godot's SDFGI & related tech

Notes

Ray Tracing

Key questions: - how does it work? - why is it so slow? How does light work, really? "Ground truth" for how light works is Quantum Electrodynamics - i.e., quantum mechanics for electromagnetism QED - you have photons, and you have electrons - photons are absorbed by electrons, and then they are emitted by electrons - when absorbed, electrons go to "higher" orbitals (higher energy) - when an electron moves to a lower energy orbital, it emits a photon so, to model light, ultimately we're modeling how electrons and photons interact Where does color come in? - frequency, i.e. energy, of photons - have to be in a specific frequency band to be visible light photons So, for rendering, why does this matter? - how things look is determined by how photons bounce around - their energy, hence their color, changes as they bounce around - brightness is how many photons you get Light is painful to model entirely because - there are LOTS of photons - they bounce EVERYWHERE - and this all affects how things look Perceived color is contextual - you don't know the color of anything until you know what its surroundings look like - human color perception is all about correcting for this physicists will say that photons have specific colors, i.e., their frequency - but actually, we perceive light based on the color of objects Something that is "red" will not emit red light (unless it is a light source). Instead, our brains model the scene and figure out it is red based on context - because different energy (color) photons will be emitted depending on lighting conditions Dim light, different color light (indoor vs sunlight), all affect the "energy" of photons but we can tell the difference, we see the same color. So even a pure physics-based model isn't enough, have to take into account human perception This is all to say that ray tracing has its benefits, but is far from a completely general solution - we'll discuss this more Ray tracing, we start with a received "photon", and we trace back its path to a light source - optimization, as we don't care about light that can't be perceived rays won't follow a direct path - interesting lighting effects come from how the rays bounce around - have to account for much (but not all) of this bouncing Part of the complexity is the recursive nature of the ray tracing algorithm The other part is how rays interact with surfaces - they are diffracted and reflected Earlier CGI tends to focus on reflections - think Terminator 2 - a fully reflective surface is "easiest", i.e., liquid metal - because we just have to model the surface as rays bouncing off at angles defined by the surface The real world is filled with surfaces that "capture" photons - they bounce around inside the object before releasing the photons Movies use ray tracing with complex material models But then, how are we doing "real time" ray tracing? - we're fast enough to do a lot of this recursion and support non-trivial surface models Regular lighting algorithms are not recursive at all - We at most consider one bounce - we often model surfaces as "self lighting" Godot does not support ray tracing currently - but this isn't that much of a disadvantage now, since it is rarely used in practice, and only in limited ways