SAH calculation / shortcut. back

(L) [2006/06/08] [Shadow007] [SAH calculation / shortcut.] Wayback!

Having not done any math for a long time, I'm asking myself a question : isn't there some way to stop the SAH calculation early ?

The SAH calcs look to me as some kind of parabola, depending on the number of prims and the "width" of the bounding box.

Isn't it guaranteed (except for the "empty side" bonus) that (for one axis) once more than half of the triangles are on the left side and more than half the width is covered, the cost is necessarily augmenting ?


In that case, we could cut the SAH calcs cost by almost half.

For the "last" "empty side" bonus case, it should be possible to "fast forward" to it, not doing any SAH calcs until we are sure the final position is reached.
(L) [2006/06/08] [Lynx] [SAH calculation / shortcut.] Wayback!

Uhm i think tbp and panthom mentioned a bunch of shortcuts in their postings spread all over the place [SMILEY Smile]

AFAIR, one paper mentioned that you can immediately stop if >= 2/3 of the node volume is empty, no other split can give lower cost when one child node becomes non-empty...but don't ask me if that's true, i might even remember it incorrectly [SMILEY Smile]

Haven't heard of a more general/agressive early termination criteria...but then again i haven't even done a proper n*log(n) compiler yet...

back