So I think there may be some confusion over a voxel vs a 3D texture location.
A voxel does not nessesarily have to do anything with texels. A voxel is simply a cubical "chunk" of 3D space, usually represented by 3D coordaintes (could be corner, center of voxel, etc) and an edge length. You DON'T need 3 numbers to represent width, height, and depth for CUBICAL voxels, you only need one, the edge length. Remember, all edges in a cube are the same length. You will most likely use 3 numbers for index location though (assuming your voxel is in a grid), or X, Y, Z location of corner or center of the voxel.
3D textures is a 3-dimensional array of color samples stored in memory (most likely on the GPU). If you wanted to make your voxel data correspond to a single 3D texture data, then you would scale you voxel so that your entire voxel data lies within [0, 1] and use the transformed coordinates of each voxel corner as texture coordinates. But this doesn't have to be the case, you could scale your voxel data to span 2, 3, 1000 3D textures. The choice is yours, just don't think voxels are always the same as 3D texels, because some people don't even use voxels with color data.
I'm trying to implement the sparse voxel octree structure method described in the Crassin Gigavoxels thesis using the compute shader in dx11.
A new book came out recently entitled OpenGL Insights
in which Crassin has written a chapter on how to generate the voxels on the GPU, and how to generate an SVO on the GPU. The chapter is actually in PDF form on the website as one of their sample chapters free
to download! ( http://openglinsights.com/
) look for chapter 22 PDF. It may help you in your implementation as I found it very clear and consise to read.
The way I'm currently thinking of doing it is to take the minimum and maximum coordinates of a large bounding box, split it into eight boxes and storing the minimum and maximum coordinates of each of these eight boxes and recursively split and store in this manner.
You would not store the minimum and maximum coordinates in the nodes. The span of the node is inferred implicitly from the level
of the node and the position ndx
of the node with relation to its parent node. I would refer you to read an excellent paper entitled Efficient Sparse Voxel Octrees
by Laine and Karras in which they describe exactly how the data structure is to be implemented as well as traversed. Their method is not for the GPU , but the same ideas translate to the GPU and is referenced by Crassin in his paper as being the basis for his data structure.
Edited by scyfris, 11 August 2012 - 10:58 PM.