[vtkusers] Opacity adjustment of actors

Andrew Usher A.C.J.Usher at damtp.cam.ac.uk
Thu Mar 11 18:20:20 EST 2004


Hi all,

I'm currently having some strange behaviour with a small application I'm 
developing.

I'm wanting to to have three actors (basically spheres) with textures 
mapped on to them, each one marginally smaller than the last, with each 
successively smaller sphere being inside the larger (although only just!).
The smallest sphere is the unit sphere and next outer shell is slightly 
larger, and the third slightly larger again. The effect I want to create 
is to zoom in, and as you get closer, increase the transparency of the 
outer shell to reveal the inner sphere, and have this happen again on the 
second to third sphere. This is like the nVidia type earth zoom demo...

Anyway, I've created a vtkCommand class to do this, with adjustments made
when the mouse is dragged. I set the spheres up (using
vtkTexturedSphereSource) and assign in the usual way to actors. I then do
a SetOpacity for the actors but the behaviour is erratic. Does anyone know
if this could be an issue with having the spheres that are very close
indeed at three levels? I've done checks on the variables updating the
opacity of the actors and they report to be working fine, but the new
opacity isn't updated in the rendered actors. I thought it might be a
depth buffering issue but I'm unsure as to how to remedy this. I'm on 
VTK-4.2.2 on Redhat 9 BTW.

Any ideas/clues would be most welcome.

Thanks,

Andy Usher

---------------------------------------------------
Email: a.c.j.usherATdamtp.cam.ac.uk



More information about the vtkusers mailing list