[vtkusers] mutli actors in one scene (some with transparent colors and some with solid colors)

Amir M. Tahmasebi tahmaseb at cs.queensu.ca
Thu Oct 26 10:39:57 EDT 2006


Hello VTK experts,

I am trying to load several actors to one scene. They are at different 
distances from the camera and they have different opacities. I realized 
adding the actors to the scene regardless of any ordering method, is not 
performing correctly. For instance, I have two actors, one is 
transparent and the other is solid. The solid one is further away from 
camera than the transparent one. When I add the solid one first and then 
the transparent, everything looks fine (I can see both, first the 
transparent and through the transparent one I can see the solid object) 
but if I do it the other way (first add the transparent and then the 
solid), I won't be able to see the transparent actor since it is covered 
by the solid one. It shouldn't be the case since the solid one is behind 
the transparent object. Right?

I checked through the vtkRenderer class (AddActor) and I realized each 
time a new actor is added to the renderer window, it is placed in the 
scene without updating the scene based on the opacity of the objects 
being added. I guess this needs to be changed so that each time first we 
check the opacities and add the solid actors first and then add the 
transparent ones after regardless of the order the user is trying to do 
that. Am I right?? Is there any other way to fix it? Any help is 
appreciated very much.

Regards,

Amir Tahmasebi,

Ph.D. Candidate,
Medical Image Analysis Lab,
School of Computing,
Queen's University,
Kingston, ON
Canada



More information about the vtkusers mailing list