How to Build a BVH (Bounding Volume Hierarchy) on the CPU
jacco.ompf2.com
jacco.ompf2.com
It’s nice to see the surface area heuristic still hasn’t gone anywhere :)
_A bounding volume hierarchy (BVH) is a tree structure on a set of geometric objects. All geometric objects, that form the leaf nodes of the tree, are wrapped in bounding volumes. These nodes are then grouped as small sets and enclosed within larger bounding volumes. These, in turn, are also grouped and enclosed within other larger bounding volumes in a recursive fashion, eventually resulting in a tree structure with a single bounding volume at the top of the tree. Bounding volume hierarchies are used to support several operations on sets of geometric objects efficiently, such as in collision detection and ray tracing._
[1] https://www.amazon.com/Real-Time-Collision-Detection-Interac...
Rasterizing triangles requires O(1) space. So you can cram 4096 or whatever very, very dumb "cores" into a GPU that can rasterize, but if you want to spend the same amount of silicon to raytrace? Not so much.