Home

Awesome

BVH (Bounding Volume Hierarchy) Visualization

BVH Visualization written in OpenGL. Visualizes the bounding boxes (AABBs) of the BVH as wireframe interactively (first person camera).

Compile / Run

Requirements: OpenGL 4.3

git clone --recursive git@github.com:MircoWerner/BVHVisualization.git
cd BVHVisualization
./pre-build.sh
mkdir build
cd build
cmake ..
make
./BVHVisualization

If no command line arguments are provided, the example BVH will be visualized. To render your own BVH use:

./BVHVisualization <pathToYourBVHFile.csv>

File Format / BVH CSV File

The BVH has to be provided in the following format:

left right primitiveIdx aabb_min_x aabb_min_y aabb_min_z aabb_max_x aabb_max_y aabb_max_z  # first line header
1 2 0 -5.6406 0.3184 -2.2571 -5.4849 0.4859 -2.1585 # then the data
...

Controls / UI

Screenshots

A screenshot showing an entire BVH of the Stanford Dragon model:

img bvh visualization

Leaf nodes can be visualized with a different color:

img bvh visualization leafs