IT lexicon › Programming › Surface area heuristic (SAH)

Surface area heuristic (SAH)

Programming På svenska → Updated: 2026-10-26

A cost model that chooses where to split an acceleration tree by weighing the probability a ray hits each branch against how many objects it holds.

When building a BVH or a kd-tree, every node has to be split somewhere. SAH picks the split that minimizes expected traversal cost: the chance a random ray hits a child node is proportional to that node's surface area, so the cost becomes the area fraction times the object count in the child, summed over the children.

The idea traces back to Goldsmith and Salmon (1987) and became standard for ray tracing. Evaluating every possible split is expensive, so builders use binning — objects are sorted into a handful of bins and only the boundaries between them are tested. The result is trees noticeably faster to traverse than naive median splits.

← Back to the lexicon