[vtkusers] Rendering Multiple Volumes
Charl P. Botha
c.p.botha at its.tudelft.nl
Mon Apr 14 06:17:04 EDT 2003
On Mon, 2003-04-14 at 11:49, John Biddiscombe wrote:
> When rendering a volume using a raycast mapper, a ray is fired through
> the volume and the pixel colour/intensity id generated from the sum of
> all interactions of the ray as it passes through (given your
> compositing/transfer function). The result is a single pixel with a
> z-depth of the nearest non zero voxel the ray passed through...
He's using a vtkVolumeTextureMapper2D, which uses axis orthogonal
texture-mapped planes to do the compositing in hardware. He's adding
this to a vtkLODProp3D, which should use a vtkVolume to render this. In
that case, it's part of the translucent rendering stage, which makes the
symptoms he's seeing (the first volume occluding the second volume) a
bit more difficult to explain away.
One strange thing I'm seeing is that the depth mask is not being turned
off during this rendering (although it IS turned off for a
vtkVolumeRayCastMapper), meaning that even a semi-opaque pixel will
prevent a further away pixel from being rendered, which is not entirely
correct. This WOULD explain what he's seeing. Lisa, could you comment?
In anycase, as you've said, even if blending is allowed, there is no
easy way of perfectly blending the two volumes, unless the rendering of
the texture-mapped planes is ordered back-to-front globally for the two
volumes. Even this is not a complete solution, as the planes can
overlap. One could perhaps pre-blend the volumes cleverly if the
volumes remain static with regards to each other.
> JB (PS. I may need correction on some of the above)
Or elaboration. :)
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/
More information about the vtkusers