I'm working with voxels that store several different informations like "pressure", "light levels", "stress load", etc. I was wondering which one was the best approach:
-different polyvox volumes for different kind of informations
-"bigger" voxels storing all the data they need (56 bits more or less, perhaps even 48 but I'm not confident about being able to make everything fit in such a little space).
Fast access to the voxels is extremely important for me, so I expect a major boost in performance if I call "getVoxelAt()" as little as I can. Perhaps the second approach is better for this reason.
Those voxels will eat up some big space in memory, so compression is important for me, too. With RLE I would probably get bad compression, because the values varies smoothly but constantly around the volume.
I found some compression algorithms that are capable of speeds above 200/250 MB/s both for compression and decompression on a modern consumer hardware. For blocks around 32kB in size (1 byte x 32^3), that would mean about 0.2 milliseconds for decompression or compression. They do a decent job at compressing, surely a better one than plain RLE.
There's one from Google under a BSD-like license that is really interesting, called snappy:
http://code.google.com/p/snappy/Would you be interested in something like this, or you don't really care about compressing "smooth" data like density?