[vtkusers] Rendering multiple actors with opacity (alpha)

scsrsao at leeds.ac.uk scsrsao at leeds.ac.uk
Wed Aug 16 05:16:41 EDT 2006


Hi Eugene,
 Have you tried to modify the opacity property of the actors instead of playing
with the lookup table? that's the way I have used to display multiple
semi-transparent objects. The code looks something like this

vtkActor *actor = vtkActor::New();
actor->GetProperty()->SetOpacity(0.5);

opacity values are in the range [0,1] where 0 means completely invisible and 1
means no transparency at all.

Hope it helps,
Rodolfo

> Message: 7
> Date: Mon, 14 Aug 2006 17:05:58 -0700 (PDT)
> From: Eugene Kim <eugene at salk.edu>
> Subject: [vtkusers] Rendering multiple actors with opacity (alpha)
> To: vtkusers at vtk.org
> Message-ID: <Pine.LNX.4.62.0608141659110.1434 at gauss.snl.salk.edu>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
>
> Hi everyone,
>
>  	I've had an annoying little problem which should have an easy
> solution.  For any given actor that I add to an assembly, modifying it's
> alpha values in a lookup table makes its opaque to itself, but only
> somewhat so to other objects.  Depending on the order in which objects are
> added to the scene (via assembly), the first object will be opaque to
> itself but no other object, the second to only itself and the first, the
> 3rd to itself the second and the first, and so on.  It's very peculiar.
> Anyone know how to get this properly working?
>
> Thanks,
> Eugene
>
>
> ------------------------------




More information about the vtkusers mailing list