PDA

View Full Version : 3D Texture Mapping questions.



wingo
09-09-2008, 07:08 AM
I've built a 3D texture out of some 2D data that I have.

I was under the impression that I could use this 128x128x128 texture like a stick of butter and cut through it with a virtual camera, and view it's insides.

However I've been mapping it to a quad, which just displays the 3D texture as a 2D on a hovering screen.

Is there a way to render the entire 3D texture so I can pass through it with a camera?

ZbuffeR
09-09-2008, 07:35 AM
You can pass trough it.

I am not sure if you want to only see the "cut plane" in front of the camera, at a fixed distance, moving trought the volume, or if you want to do true volume rendering.

For volume rendering you have to draw a bunch of blended quads, as if it were slices in the butter.
Simple methods fixes the quads along the axis which is the most parallel to the camera z axis. Better methods rotate the quads continuously so they are always aligned to the camera z.

You can search "opengl volume rendering", you will find a lot of info on the web. Try also "hardware accelerated volume rendering".

ZbuffeR
09-09-2008, 07:35 AM
See also :
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=245625#Post245625

wingo
09-09-2008, 08:11 AM
My goal is to simulate a fly through feel.

The "cut plane" that you mentioned is the plane that I have my 3D texture mapped to right?

For right now im straying away from making and mapping a bunch of QUADS.(thats what the volume rendering essentially is right?)

Right now im trying to keep the cutplane in a fixed position(not size) and alter the data that is displayed on that plane with some keyboard keys.

I feel like it's over complicating things, and wont provide a true fly through feeling.

Is that kinda of true?

Y-tension
09-10-2008, 06:37 AM
There's an article by Mark Harris on cloud rendering that uses 3D textures... I don't know if this is like what you're after but, anyway, the article is here (http://www.markmark.net/cloudsim/harrisGH2003.pdf).