(L) [2014/07/31] [tby Dade] [Re: Total SAH of a BVH] Wayback!>> 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.
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.
(L) [2014/07/31] [tby ingenious] [Re: Total SAH of a BVH] Wayback!I just want to add that 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 [LINK https://graphics.cg.uni-saarland.de/2012/popovphd2012/ PhD thesis], section 3.2.