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!
You can have a look into the source code of our Open Source volume renderer OpenQVis at:
You’ll find the slicing code in:
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,
[Edit] changed triangle strip to triangle fan
[This message has been edited by Klaus (edited 10-13-2003).]
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.
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.
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).
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.