A tetrahexacontree is like an octree except at each node it subdivides space into 64 children (4x4x4) instead of 8 children (2x2x2) with an octree. The tetrahexacontree I've implemented is a sparse data structure. One can think of it as a squashed octree in that for a given amount of leaf nodes, it has half the depth. Less depth means better performance for ray marching because there is less moving up and down the tree (via a stack). My implementation of the tetrahexacontree has voxel volumes (16x16x16 voxels) for leaf nodes.
With a large scene loaded, I'm seeing a tetrahexacontree depth of four.
Here's a screen shot with tetrahexacontree nodes and volumes shown as wireframe cubes:
The blue lines are a corner of the tetrahexacontree root node, green wireframe cubes are nodes in between the root node and the voxel volumes, and the red wireframe cubes are the voxel volumes.
Here's the algorithm I'm using:
Pastebin -- Tetrahexacontree Voxel Volume Raymarching
You're welcome. Keep up the hard work! I say "hard work" because it has been a struggle to get my voxel engine to where it is at now. I'm still struggling with the compute shader stuff in between working on others parts of the code.
I got mipmaps generating via a compute shader but mipmap regeneration for voxel volume updates (adding or removing voxels) still has a bug.
If you haven't done so already, check out Douglas Dwyer's videos about his voxel engine which is farther along than my voxel engine: https://www.youtube.com/@DouglasDwyer/videos
Wikipedia on Mipmap: https://en.wikipedia.org/wiki/Mipmap
I'm using 3D mipmaps of voxel volumes to improve performance and visual quality of volumes that are farther away as part of the level of detail system in my voxel engine.
This video shows them (color coded for testing) in action: