PDA

View Full Version : TriLinear interpolation



abhishek bansal
11-09-2010, 08:35 AM
hi all
I am working on a project related to volumetric rendering ... i am using 3D texture based technique for volume rendering...now i want to know that how can i implement trilinear interpolation with 3D textures...with or without shaders !!

i would also like to know that whether 3D textures have inbuilt trilinear interpolation or not ??

ZbuffeR
11-09-2010, 09:20 AM
It is built-in.
Just enable 3d texturing, bind the texture, set texcoords, and draw.

abhishek bansal
11-09-2010, 09:29 AM
It is built-in.
Just enable 3d texturing, bind the texture, set texcoords, and draw.

i have already applied 3D textures but when i rotate my result by 90 degrees i can clearly see slices....i.e. model is sampled..which i suppose should not have been the case wid trilinear interpolation...can plz explain This ??

ZbuffeR
11-09-2010, 09:42 AM
This has nothing to do with texture sampling, but with geometry sampling. OpenGL renders triangles only.
When you rotate the model more than 45, you have to draw a different set of slices, rotated 90 too.
Even better, keep the slices always aligned to the camera, but remember to tweak the texture coordinates according to the rotation.

abhishek bansal
11-09-2010, 09:48 AM
Even better, keep the slices always aligned to the camera, but remember to tweak the texture coordinates according to the rotation.

can plz throw some light how i can do that ??

strattonbrazil
11-09-2010, 05:07 PM
If you want my advice, forget slicing. Ray casting has taken over for GPU volume rendering. It's not easier to implement has has fewer artifacts at the edges.

abhishek bansal
11-09-2010, 11:20 PM
If you want my advice, forget slicing. Ray casting has taken over for GPU volume rendering. It's not easier to implement has has fewer artifacts at the edges.

ya ..i do know that but for my project i need to implement both algorithm for comparison purpose..since slicing is simpler i m implementing it first...