[vtkusers] mutiple imageactor transparency probem

Charl P. Botha cpbotha at cpbotha.net
Sun Apr 16 07:49:13 EDT 2006


On 4/16/06, Ugur BOZKAYA <u.bozkaya at fmcon.com> wrote:
> I have 3 imageactor rendered in the same window. I want to give transparency
> to them. They are intersecting actors. Orthogonal view of 3 slices from a
> volume data. I have the below code. My problem is that the transparency is
> ok on the x and y axis. But on Z axis it is opaque. When you look to the x-y
> plane from top or bottom the other side is not shown. Bu there is no problem
> on the other planes. Is it a bug or should a call any function explicitly to
> give transparency in Z dimension?

The three transparent actors are rendered in the order in which you
added them to the renderer.  Because they intersect each other, this
will not composite correctly.

There are hardware tricks that you can use to work around this
problem, but the text-book solution is to sort the polygons according
to depth along the view axis and to render them with the correct depth
ordering.  See for example
http://www.vtk.org/doc/nightly/html/classvtkDepthSortPolyData.html



More information about the vtkusers mailing list