When you have to split a node, you usually evaluate a possible set of split plane candidates (using the above formula) and you pick the one with the best result.shiqiu1105 wrote:How do we use this formula if we build the BVH top-down though. We rely on SAH to split the node, yet the formula requires the node splitted to evaluate.

## Total SAH of a BVH

### Re: Total SAH of a BVH

### Re: Total SAH of a BVH

I just want to add that

This is explained in Stefan Popov's PhD thesis, section 3.2.

**graphicsMan**'s explanation, refined by**Dade**, is known as the surface area metric (SAM) or the surface area cost model. This metric gives an estimate of the cost to traverse a given tree with a ray. Ideally you want to use this metric when building the tree. However, the exact cost of a subtree is only known after that subtree has been built. So the surface area*heuristic*is a simplification which assumes that both child nodes will be leaves. So instead of the "exact" inner node cost formula, in practice only the formula for the leaf cost is used and is known to everybody as SAH.This is explained in Stefan Popov's PhD thesis, section 3.2.

**Click here.**You'll thank me later.