This is going to be a brief post, but with an image that makes me exceptionally happy:
I've been implementing 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.
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:
Depth | Child count |
---|---|
0 | 1 |
1 | 8 |
2 | 64 |
3 | 512 |
4 | 4096 |
5 | 32768 |
Having these higher child counts (i.e. branching factor), helps to keep the tree very wide, as opposed to an octree, where each depth only has 8 children.