PDA

View Full Version : volume rendering, view-aligned 3d textures.



torisutan
10-13-2003, 03:33 AM
hi, can anyone point me to a good resource (or explain) exactly how to compute view aligned slices from volume rendering?
i've been reading papers on volume rendering, but can't seem to find any good resources that explain exactly how to calculate the view aligned slices and texture coordinates :(

thanks in advance!

Klaus
10-13-2003, 09:24 AM
You can have a look into the source code of our Open Source volume renderer OpenQVis at:
openqvis.sourceforge.net

You'll find the slicing code in:
[cvs]/openqvis/OpenQVis/src/volume/Render_3DTexture.cpp

Basically, it computes the intersection of the slicing plane with each edge of the bounding box of the volume, sorts the intersections and draws a triangle fan.

Hope that helps,
Klaus

[Edit] changed triangle strip to triangle fan

[This message has been edited by Klaus (edited 10-13-2003).]

dorbie
10-13-2003, 03:43 PM
You can also use glclipplanes to clip the slices and texgen for the coords doing it all in graphics hardware. It can be a win depending on your hardware.

torisutan
10-14-2003, 03:55 AM
Klaus, thanks i'll have a play with the code and see if i can get it going.

however, i like the sound of dorbie's suggestion as well. can this be done? i havn't been able to find anything on using glClipPlanes with volume rendering, but it sounds like it would be a much better solution rather than doing all the calculations in software.

Klaus
10-14-2003, 04:57 AM
Never tried dorbie's approach. In volume visualization you normally want to keep the clipping planes for volume clipping.

As the number of slice polygons in volume rendering is rather limited, computing the vertices on the CPU and sending them to the GPU for each frame should not be the bottleneck (VolVis is fill-limited).

jtipton
04-14-2007, 05:18 PM
The clipping plane thing works. I have used it before, but you end up using 6 of your clip-planes for computing the intersection. It seems to be a waste of resources.