Update for 10-11-22 20:30

This commit is contained in:
Tyler Perkins 2022-11-10 20:30:01 -05:00
parent 7f795e1810
commit 24128078c5

View File

@ -32,3 +32,55 @@ How do we calculate how much light exits a surface point in a given direction
[[maxwell_equations|Maxwell equations]]!
In practive, we dont do that. We try to think of light as a ray unless we have
to
Instead we use the rendering equation!
Terms used in diagrams
* V - direction towards the viewer
* N - surface normal
* L - vector pointing towards the light source
* R - reflected ray direction
* Theta,,i,, and Theta,,r,, - incident and reflected angles
To calcuate R `R = L - 2N(L * N)`
== Light attentuation ==
* The amount of intensity light looses as it travels farther away. Light looses
energy as well as it reflects off of surfaces
* How can we calculate attentuation?
`L * N`
Assuming that L and N are normalized, the attentuation will be equal to
`cos(theta)` where theta is the angle between L and N. This is true because of
the dot product.
== Materials ==
How can we simluate the look of different materials?
Based on how they relfect light.
* Specular surface reflects exactly one ray
* One incoming direction
* One outgoing direction
* Diffuse spreads ray into smaller rays in all directions
* On incoming direction
* many outgoing direction
* many outgoing intesntiy
* Spread breaks out the ray into a few smaller rays in a single direction
To simulate a surface, we can use a probability density function that takes
* incoming light direction
* point on surface
This method will output the _probability of a given outward direction_
Something like `probability of happening = f(incoming direction, point, outgoing direction)`.
This is known as the _Bidirectional reflectance distribution function (BRDF)_.