i have programmed a simple volume renderer. At this time
it uses the 2D texture mapping for creating the volume.
Now i want to implement 3D texture mapping. does anyone has experience with it ? I’ve read on the internet some things about
this topic. but it never has been explained in detail how to get the texture’s created out of the volume data and what happens when
the camera rotates. In 2D texture mapping you have to switch the
x y and z axis acoording to the view vector. In 3D texture mapping
you have one 3D texture that builds the model. but it is also said the textured slices will be build perpendicular along the viewvector inside a cube.
Can some one explain it to me , please ?
This is a code snippet from ATI’s example of a very simple
direct volume rendering. You can find the example here
glBindTexture(GL_TEXTURE_3D_EXT,names); glTexParameteri(GL_TEXTURE_3D_EXT,GL_TEXTURE_WRAP_S,GL_CLAMP_TO_EDGE_EXT); glTexParameteri(GL_TEXTURE_3D_EXT,GL_TEXTURE_WRAP_T,GL_CLAMP_TO_EDGE_EXT); glTexParameteri(GL_TEXTURE_3D_EXT,GL_TEXTURE_WRAP_R_EXT,GL_CLAMP_TO_EDGE_EXT); glTexParameteri(GL_TEXTURE_3D_EXT,GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_3D_EXT,GL_TEXTURE_MIN_FILTER,GL_LINEAR); glTexImage3DEXT(GL_TEXTURE_3D_EXT,0,GL_ALPHA8,tWidth,tHeight,tDepth,0,GL_ALPHA, GL_UNSIGNED_BYTE,image1);
I know I have to load the 3d texture extension. Thats not the question here.