Ray Tracing Flashcards
Helmhotz Reciprocity Rule
We can trace rays backwards as well as forwards.
BRDF(x, ψ’, ψ, λ) = BRDF(x, ψ, ψ’, λ)
How do we order the basis of the View and World coordinate systems?
View = Left Hand Rule World = Right Hand Rule
4 Steps to translate pixel locations to world space for ray tracing
- Translate the pixel (x, y, 0) by (-hx / 2, -hy / 2, d)
- Preserve aspect ratio with a scale (-w / nx, -h /ny, 1)
- Rotate to look at correct direction
- Translate to origin of view
P = (T_y R_z) S_z T_I
T_y R_z = M_vw
What does pixel translation look like if
d=1, lookfrom = (0s), look at = (0s) and up = (0, 1, 0)?
?
Texture Mapping
A way of adding surface detail without increasing model complexity
Paper: Blinn & Newell 1976
UV Mapping
Convert (x, y, z) -> (u, v) unit square. Retrieve (u, v) from (di, dj) in the texture and map it back to the original 3D point.
Different projections: Plane, Sphere, Cube, Cylinder
Bump Mapping
Perturb normal with image by taking difference between pixels in texture as the change in u and v and applying that change to the normal.
Paper: Blinn 1978 “Wrinkled Surfaces”
Solid Texture
3D Textures to replicate wood, marble, and other textured objects with volume.
Paper: Perlin 1985 “Image Synthesizer”
Computational Solid Geometry
Allow for intersections, unions, and boolean operations of models/geometry to create new shapes. With raytracing, find the near and far points of intersection with every object and then calculate appropriate point based on type of operation.
Bounding box
Surround each complex geometry with a box so ray intersection only has to check the more complex intersection if it intesects the box. Use box aligned with coordinate axes.
Tradeoff with bounding box construction time.
Spatial Subdivision
Split space into subregions so only subregions through which the ray passes need to be checked for intersections.
Use voxels or trees. Useful with lots of small objects in scene.
Grid Acceleration
Good: if occupancy does not vary significantly
Bad: Stepping through empty cells
Use: Bressenham’s line algorithm
O( c_1 cubedroot(n) )
Octree Acceleration
Good: if Occupancy varies
Bad: Must traverse height of tree
O( log n )