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?
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”.
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.