I loaded a 3d image into a 3d texture. Using clipping planes, I saw that the cube was hollow from the inside. As if the cube was made of 6 2d textures. I even saw the boarder images from the inside!! :eek: Blending was disabled. It is a cool effect, but its not what I expected!
Well, a 3D texture still has to be drawn on good old flat triangles. Common way to represent 3D textures is to draw a lot of parallel quads, a bit like cube slices.
Donât draw all of the levels of the 3D texture unless you are using alpha to threshold the image. If you are keeping it solid just draw a set of tris, or a quad or a polygon where the clipping plane would be. Then set the tex coords for all points of the new faces. 3D textures are good for getting textures for slices that arenât in line with the original grid of the texture - much better and faster than trying to interpolate it yourself.
Thanks everybody for replies,
Who could have imagined that we should resample the volume with 2d planes!!! This bit of info, i really didnât find in any reference or tutorial!
A little question, If I need alpha blending and need to view the volume data using clip planes from any direction, what is the optimum method of 2d sampling of the volume?
>> Who could have imagined that we should resample the volume with 2d planes!!! This bit of info, i really didnât find in any reference or tutorial!
You did not searched very hard apparently ? 30seconds google search for âhardware volumetric openglâ âŚ
Actually I did a lot of searching in the opengl programming guide, reference manual, online examples⌠They all said, well, 3d textures are so much like 2d textures, you just have to replace the 2d functions with the 3d functionsâŚso thatâs what I did! It seemed that I was the only creature in the world who wanted actually to use 3d textures!