cuda-lbvh
is a CUDA implementation of a linear bounding volume hierarchy
(LBVH) as described by Karras (see citation below). The LBVH is designed to
allow for a very quick build, as the tree can be built in parallel. To
demonstrate its performance, naive path tracing is performed on three different
scenes. Although offline rendering of static geometry is not the use case of the
LBVH, this allows for a simple illustration of its performance.
The table below lists the construction time and the rendering time for three
scenes, each with a one megapixel resolution and a path length of up to 80
bounces. The rendering time is the average of 128 samples. Note that the images
are thumbnails, full resolution images can be found in doc
.
Scene | Triangle count | Build time | Trace time | Image |
---|---|---|---|---|
sanmiguel |
9.963.191 | 0.1429s | 3.1695s | |
sibenik |
73.564 | 0.0022s | 0.4071s | |
sponza |
262.267 | 0.0063s | 0.7160s |
The following third-party dependencies are included:
- stb for writing PNG files.
sutil
from the OptiX SDK samples for random number generation and vector- and matrix math.- Morgan McGuire's Computer Graphics Archive
for the scenes: Sponza, San Miguel, and Sibenik Cathedral. The
.obj
files are edited by triangulating faces. - CUB is used to perform a radix sort.
See cuda-sdf for details on path tracing.
- Maximizing Parallelism in the Construction of BVHs, Octrees, and k-d Trees
Karras, T. [link]
Introduces a fast construction method for LBVHs on the GPU. - Thinking Parallel, Part II: Tree Traversal on the GPU
Karras, T. [link]
Explains parallel BVH traversal. - Thinking Parallel, Part III: Tree Construction on the GPU
Karras, T. [link]
Explains parallel BVH construction.