Some points that were pending.
The format of the octree can be multilevel, keeping, instead of the color, the address of the octree that follows it, and if the octree that continues is the same, then it will be infinitely recursive, get to do a test of this and it worked.
In the first versions of this format use the language :r4 that works in 32 bits, I am currently using the successor, called r3 that is 64 bits. The code to convert a set of voxels into the octree needs to sort the cubes by the morton code of …