How Does Blender Voxel Data Work? I've been looking online for a long time, searching for documentation on the subject of Blender Voxel Data.  So far, I know that Blender uses many file types, including the .bvox file type.  For the .bvox file type, I have found that it uses ASCII characters to load in density values, starting with the dimensions.  For example, a data set with dimensions 64,64,64 would save into the .bvox file as:

@@@

However, only the density values are saved.  The data set I have is formatted as follows, where dd is a density value:

xx yy zz dd
xx yy zz dd

My python code strips each line and takes only the density values and uses pythons pack struct to pack the values into a .bvox file. This works fine, but I am wondering how Blender knows where to put the coordinates of the densities?  Each density value has to be at a specific point, and how does Blender know where that point is?  And also, is it possible to specify my own coordinates for each value?
First off, that's not ASCII; this is merely a misinterpretation of the raw data. The actual format can be figured out from Blender source files render/intern/include/voxeldata.h and render/intern/source/voxeldata.c together with blenlib/intern/voxel.c. The format is used for 3-dimensional textures. 

The header is read by read_voxeldata_header(), and consists of four ints: the X, Y and Z dimensions, as well as the number of frames. There's no code to handle endianness nor size variations, so the files aren't portable across platforms. Most current platforms will store these as 32-bit little endian. 

Next come the frames, in order. Each frame is also stored in raw memory format, as X*Y*Z floats; this will typically be IEEE 754 single precision (32 bit) values. 

Within each frame, the order of the voxels is defined in the sampling functions. They use a macro named BLI_VOXEL_INDEX to perform the lookup, defined in blenlib/BLI_voxel.h. It shows that the order is along X axis first, then Y axis, then finally Z axis. 

The raw 8-bit format is similar, but has no header, and uses only 8 bit fixed point values; the voxel value is databyte/255.0. This requires the actual dimensions of the voxel to be entered in Blender. 

The image sequence format simply uses a layered group of images, along ascending Z axis. The pixel data gets averaged into a grayscale voxel texture.