GAMES202_Lecture_05 (ucsb.edu)
Pros: Faster than shadow maps, and looks way better.
Cons: Memory cost.
Input: Coordinate
Output: The minimum distance from that coordinate to the object being described
May use signs to represent whether the point is inside/outside the object
Related to optimal transport.
Preserving Boundary: Blending two SDF results in a moving boundary (rather than a blurred object)
Combining Geometric Shapes: Combining SDFs results in a blended shape.
Therefore, it is easy to compute SDF for moving objects that are interacting with the scene.
Hard to apply textures to SDF objects: Hard to do
Used in ray marching to perform ray-SDF intersections.
Safe distance: Assume there is a distance field for the entire scene, and assume at point
The ray will not intersect any object if it travels
Therefore, each time at a given point
The value of
The smaller the "safe" angle, the less the visibility
During ray marching
Calculate the "safe" angle from the eye at every step
Keep the minimum
To compute the visibility (related to the safe angle) during ray marching:
Use
Larger
If the
Why not use
To avoid expensive computations.
Interpolating the SDF to achieve smooth boundary on fonts.
Pros:
Fast*:
When compared with hard shadow generating by ray marching: Almost no additional cost (regardless of distance field generation)
When compared with traditional shadow mapping: faster precomputation, approximately the same time for querying
High quality
Cons:
Needs precomputation:
When deformation of objects occurred, re-computation is required
Needs heavy storage:
3D texture storage
Artifacts:
For example, around connections between objects
Hiearchies:
Trees (KD Trees, ...)
Compression by deep learning
Environment lighting: Simulate lighting coming from the surroundings of a scene.
There are spherical maps and cube maps. In the following context we may assume we have already obtained the lighting information regardless of the underlying structure.
The environment lighting is used when solving the rendering equation. In this chapter we will discuss shading only - that is, the visibility term will be ignored.
Environment maps provide information of incoming radiance on a specific shading point.
General Solution: Monte Carlo Integration
Numerical
Large amount of samples required
Can be slow:
Sampling is not preferred in shaders* in general: High time complexity.
Recently, many temporal methods that relies on sampling are used.
In the industry, the resulting integral is computed using sampling and summing, thus it is called split sum rather than split integral.
Used in Unreal Engine.
State of Art
The split sum approximation avoids sampling by approximating the given integral in a way described in Lecture 4:
General BRDFs satisfy the requirements for accuracy in all cases:
If the BRDF is glossy, then
If the BRDF is diffuse, then
Note the slight edit on
We approximate the rendering equation as follows:
Prefiltering of the environment lighting: Computing the first term
Pre-generating a set of differently filtered environment lighting.
Filter size in-between can be approximated via (trilinear) interpolation.
Size of the filter should correspond to solid angle (but not a fixed size on the resultant texture)
And then querying the pre-filtered environment lighting at
For diffusions you may follow the direction of
Note that there is a another solution as of the time writing this note.
Linearly Transformed Cosines: Eric Heitz's Research Page (wordpress.com)
The idea is to:
Precompute the value of the integration left in equation
Too many dimensions: roughness
Compute the latter part of equation
where
The "base color
and both integrals can be precomputed with only 2 parameters, as now there are only roughness
Precomputed texture: Each integral produces one value for each
Completely avoided sampling!
Very fast and almost identical: