Ray tracing Flashcards
Lecture 11 (14 cards)
What is the main difference between rasterization and ray tracing?
- Rasterization: processes each object, then each pixel it covers
- Ray tracing: processes each pixel, then checks all objects in that direction
How does rasterization handle visibility?
It uses a depth buffer to keep the closest fragment for each pixel
How does ray tracing handle visibility?
It casts a ray per pixel and keeps the closest object hit by that ray
How do lighting and shadows differ in rasterization and ray tracing?
- Rasterization: estimates lighting using formulas; shadows need hacks (like shadow maps)
- Ray tracing: simulates lighting with real ray bounces and handles shadows naturally
What is a key similarity between ray tracing and ray marching?
Both start by casting a ray from each pixel into the scene
What is the main difference in how rays are processed between ray tracing and ray marching?
- Ray marching: takes many small steps using distances from SDFs
- Ray tracing: directly checks for ray-object intersections and can bounce rays recursively
What kind of scene definition does ray marching use?
A Signed Distance Field: a function that returns the shortest distance from a point to the nearest surface.
What kind of scene definition does ray tracing use?
An intersection function: returns the closest surface hit along a ray direction.
What is a BVH?
A Bounding Volume HierArchy is a tree of bounding boxes around groups of objects, used to speed up intersection tests.
Why is a BVH useful for ray tracing?
It avoids testing the ray against every single object, reducing computations.
How is a BVH constructed?
- Objects are wrapped in bounding boxes
- These are grouped recursively into parent nodes
- Each parent node contains the bounds of all its children
How is a BVH used during ray tracing?
- Rays are tested against the BVH root
- if a node is hit, its children are tested
- The process repeats until leaf nodes (actual geometry) are reached
What are the main benefits of ray tracing?
- Better reflections (can show things off-screen)
- Better shadows (soft, transparent, no resolution limits)
- Better transparency and refraction (no need for sorting)
What are the limitations of ray tracing?
- Must test collisions with all (or many) objects
- Complexity grows fast with recursive rays
- Needs many rays for good quality -> leads to noise and high performance cost