@Not_Sure
voxels aren’t about the representation but about the storage of your 3d data. A voxel is a dot in a 3D space as a pixel is a dot in a 2D space. You can give it any propriety or set of proprieties (color, alpha, random variables and values) depending on what you want to do and then display all that the way you like, should it be as polygons, sprites etc… You only have to care about the spacing between them.
-edit-
Just because i was passing by :
Here is a very basic xml representation of a 4 * 4 * 4 voxel grid with color.
The color is an index represented as you want, like hex values or rgb, rgba. Add extra data like material properties, texture or anything.
Note, as long as you use a separator, the index can be anything like a hex value containing much more data.
Finaly, the structure is simply defined by the dimensions. 3 loops (one for each dimension) will then parse the data and put your voxels where they should be.
I’ve separated the data with spaces just to see more clearly how it should be translated.
There is a smiley on the top layer and a blue square under.
<![CDATA[
1,0,0,1,
0,0,0,0,
1,0,0,1,
0,1,1,0,
0,0,0,0,
0,0,0,0,
0,0,0,0,
0,0,0,0,
0,0,0,0,
0,0,0,0,
0,0,0,0,
0,0,0,0,
2,2,2,2,
2,0,0,2,
2,0,0,2,
2,2,2,2
]]>