Closed Arlorean closed 7 years ago
OK. It looks like Qubicle exports a .vox file that isn't a MagicaVoxel file. It seems to be the format for the Voxlap Engine and is detailed on Ken Silverman's FAQ. Here is the pseudocode for it:
long xsiz, ysiz, zsiz; //Variable declarations
char voxel[xsiz][ysiz][zsiz];
char palette[256][3];
fil = open("?.vox",...);
read(fil,&xsiz,4); //Dimensions of 3-D array of voxels
read(fil,&ysiz,4);
read(fil,&zsiz,4);
read(fil,voxel,xsiz*ysiz*zsiz); //The 3-D array itself!
read(fil,palette,768); //VGA palette (values range from 0-63)
close(fil);
In the voxel array, use color 255 to define your empty space (air). For interior voxels (ones you can never see), do not use color 255, because it will prevent SLABSPRI from being able to take advantage of back-face culling.
I'll see if I can add support for this as well as it looks easy.
Tested the Qubicle VOX export for the builtin meshes (e.g. Squirrel). Thumbnails don't show up.