Was going to mention this....
http://www.volumesoffun.com/implementing-morton-ordering-for-chunked-voxel-data/#more-1755(references
https://en.wikipedia.org/wiki/Z-order_curve http://www.forceflow.be/2013/10/07/morton-encodingdecoding-through-bit-interleaving-implementations/ )
Basically I was playing with unity, and found there's a free voxel engine plugin. Developed by the same people that did Polyvox. And saw that article, and after reading the articles thought 'wow maybe that would be nice'
My first test case it turned out the the max distance from (-1,-1,-1) to (1,1,1) was 53. (even smaller than the 256 that is the distance from (0,-1,0) to (0,0,0) in black voxel) Which would mean that it would be even better for locality of voxels in cache.
However; that was just 1 case, and the real worst case is a distance of 3080(!).
7,7,7 center
min 504 00000000000000000000000111111000
max 3584 00000000000000000000111000000000
.....No
The worse case gets worse and worse.... iterating over 0-100,0-100,0-100 the average max distance is 41296(!)
Each point at 7, 15, 31, 63, is increasingly large offset...
-----------------
So ya; ignore this.
this is more of a what-not-to-do.... it looks clever to start... but having reasonably sized sectors is more advantageous... and does nothing but complicate the offsets to wrap between sectors.