Unit content
Bounding volumes and bounding-volume hierarchies
Testing every ray against every primitive makes naive ray tracing scale poorly. A bounding volume encloses a more complicated object with a shape that is cheap to test, such as an axis-aligned bounding box.
If a ray misses an object's bounding box, it cannot hit any primitive inside that box, so the renderer can reject the entire group at once.
A bounding-volume hierarchy (BVH) organizes these bounds as a tree. Internal nodes bound groups of descendants, while leaves contain a small number of actual primitives.
Ray traversal begins at the root and descends only into bounds the ray intersects. A well-built BVH therefore turns many primitive tests into a much smaller number of box tests plus tests near the actual hit.
The hierarchy is an acceleration structure, not a change to the rendered geometry. Different BVHs can enclose the same scene while producing the same ideal image but different performance.
BVH quality depends on how tightly and evenly primitives are partitioned; a poor hierarchy can leave too much overlapping volume and reduce pruning.