Revising Apetrei's bounding volume hierarchy construction algorithm to allow stackless traversal
Andrey Prokopenko, Damien Lebrun-Grandié
TL;DR
The paper addresses the challenge of enabling stackless traversal for BVHs on GPUs by modifying existing construction algorithms. It shows that Karras' internal-node ordering lends itself to easy computation of skip-connections, and that Apetrei's bottom-up approach can be adjusted to restore that ordering, enabling skip-connections in a single bottom-up pass. The key contributions are a straightforward method to determine skip-connections in Karras' approach, a modification to Apetrei's algorithm to recover Karras ordering, and a unified, bottom-up construction that yields a skip-connected hierarchy, accompanied by implementation guidance and pseudocode. This work improves GPU BVH construction performance for range queries, with practical impact demonstrated via the ArborX library and public codebase for broader adoption in ray tracing and geometric querying tasks.
Abstract
Stackless traversal is a technique to speed up range queries by avoiding usage of a stack during the tree traversal. One way to achieve that is to transform a given binary tree to store a left child and a skip-connection (also called an escape index). In general, this operation requires an additional tree traversal during the tree construction. For some tree structures, however, it is possible achieve the same result at a reduced cost. We propose one such algorithm for a GPU hierarchy construction algorithm proposed by Karras in [Karras, 2012]. Furthermore, we show that our algorithm also works with the improved algorithm proposed by Apetrei in [Apetrei, 2014], despite a different ordering of the internal nodes. We achieve that by modifying the Apetrei's algorithm to restore the original Karras' ordering of the internal nodes. Using the modified algorithm, we show how to construct a hierarchy suitable for a stackless traversal in a single bottom-up pass.
