Total SAH of a BVH

Practical and theoretical implementation discussion.
Posts: 206
Joined: Fri Dec 02, 2011 8:00 am

Re: Total SAH of a BVH

Post by Dade » Thu Jul 31, 2014 7:30 am

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.

Posts: 282
Joined: Mon Nov 28, 2011 11:11 pm
Location: London, UK

Re: Total SAH of a BVH

Post by ingenious » Thu Jul 31, 2014 9:43 am

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 PhD thesis, section 3.2.
Image Click here. You'll thank me later.

Post Reply