VDB - the better octree

18 August 2025

Tags: Data Structures Voxels

I have implemented a voxel data structure similar to an octree, but with a larger branching factor (still powers of 2), that contains a hashmap at the root of the tree. It takes inspiration from the paper “VDB: High-Resolution Sparse Volumes with Dynamic Topology” by Ken Museth.

Voxels

The image shows the mesh graph voxelized into a tree containing depths 2, 3 and 4 (VDB<2, 3, 4>). Depth 2 gives 64 children, 3 gives 512 children, and 4 gives 4096 children. See the following overview:

DepthChild count
01
18
264
3512
44096
532768

Having these higher child counts (i.e. branching factor), helps to keep the tree shallow, i.e. not as tall as an octree, where each depth only has 8 children.

Voxels

The open-source implementation OpenVDB can be found here: https://www.openvdb.org. I chose to make my own version for intellectual curiousity and because my usecase is much simpler.