#bvh #bounding-box #sah #cwbvh #ploc

obvhs

BVH Construction and Traversal Library

1 unstable release

0.1.0 Jul 25, 2024

#341 in Graphics APIs

MIT/Apache

1MB
4.5K SLoC

OBVHS - BVH Construction and Traversal Library

  • PLOC BVH2 builder with Parallel Reinsertion and spatial pre-splits.
  • CWBVH An eight-way compressed wide BVH8 builder. Each BVH Node is compressed so that it takes up only 80 bytes per node.
  • CPU traversal for both BVH2 and CWBVH (SIMD traversal, intersecting 4 nodes at a time)
  • For GPU traversal example, see the Tray Racing benchmark

demo demoscene example

OBVHS optionally uses rayon to parallelize building. Many parts of the building process are parallelized, but single threaded building speed has initally been the priority so there is still quite a bit of room for improvement in parallel building performance.

Benchmarks

See Tray Racing.

Acknowledgments

Dependencies

~4–34MB
~553K SLoC