[vtkusers] Rendering Multiple Volumes

John Biddiscombe john.biddiscombe at mirada-solutions.com
Mon Apr 14 05:49:27 EDT 2003

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

when a second volume is raycast...if it overlaps the first, the same process is performed, but this time when the "result" pixel is generated, it will only be copied to screen if the z-depth is closer than the pixel written previously...to get the two volume to be blended properly, one would need to override the raycast mapper and tell it to check both volumes and composite the final pixel value from the transfer functions of both individual rays (taking into account the depths of voxels in both volumes as it passes through). this is quite a lot more complicated and vtk doesn't do it.

a vtkMulti-Volume-RayCastMapper would be nice, but probably quite slow!

(PS. I may need correction on some of the above)

> -----Original Message-----
> From: Charl P. Botha [mailto:c.p.botha at its.tudelft.nl]
> Sent: 14 April 2003 08:26
> To: vtkusers at public.kitware.com
> Subject: Re: [vtkusers] Rendering Multiple Volumes
> On Mon, Apr 14, 2003 at 08:52:47AM +1000, 
> Nigel.Hoschke at csiro.au wrote:
> > At the moment I have two sets of structured points data 
> that are read from
> > .vtk files using the vtkStructuredPointsReader.  These are 
> both passed
> > through vtkVolumeTextureMapper2D into separate vtkLODProp3D 
> which are then
> > added to the vtkRenderer using the AddVolume method.  The 
> outputs of the
> > vtkVolumeTextureMapper2D are added to the vtkLODProp3D with 
> the ADDLod
> > method that takes in a vtkVolumeProperty.  A user defined
> > vtkPiecewiseFunction has been used with SetScalarOpacity 
> method for the
> > vtkVolumeProperty to make most of the volumes translucent.
> Okay.  This is still not as good as a short Python or Tcl/Tk 
> example that
> other readers of this list can run, but it's better than nothing.
> Does the same happen if you use a vtkVolume (i.e. no 
> vtkLODProp3D)?  For all
> clarity, the volume that you add to the renderer FIRST gets 
> occluded by the
> volume that you add afterwards?
> -- 
> charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: 
Follow this link to subscribe/unsubscribe:

More information about the vtkusers mailing list