Game Development Reference
Figure 1.8. Number of intersections per box (a-b, red) and per primitive (c-d, green).
The images show the differences between the SLBVH (a,c,e) and the BVH (b,d,f). The
last two images (e-f) combine the intersections of both boxes and primitives.
Intersections per box and per primitive. Besides the memory waste occasioned by
the heap's scheme, the nonuniform primitives' distribution is not handled opti-
mally by the partition algorithm. Many primitives end up sharing the same leaf
node, leading to an unbalanced tree. As a result, rays intersect few boxes but a
lot of primitives. As shown in Figure 1.8, the BVH does a better job traversing
the structure than the SLBVH, though the comparison is a little unfair since they
are using different partitioning schemes. By decreasing the number of intersected
primitives, the overall performance of the structure should improve. One of the
options to decrease the number of intersected primitives per pixel is using the
SAH algorithm instead of a middle split.
As far as the authors know, the SLBVH traversal is the first heap-based structure
used for real-time ray tracing. In this approach, traversing the tree can be done
easily with bit-wise operations, removing the need for additional information like
a stack or the “ropes” in the SKD-Tree. This scheme has the additional advantage
that the traversal can be restarted at any point in the tree, which is useful when
computing reflections or refractions.
Even though the memory usage for the SLBVH is higher than the regu-
lar LBVH, its memory footprint is lower when compared with other stackless
approaches—even when storing empty nodes. The weakest part of the algorithm
it its poor partition on complex scenes. This is due to the fixed partition scheme
we used (the Morton codes) that ends up with big boxes for a wide range of primi-
tive sizes. However, using a better partition scheme (like SAH) could conceivably
solve this problem.