[vtkusers] Opacity adjustment of actors

John Biddiscombe jbiddiscombe at skippingmouse.co.uk
Fri Mar 12 05:43:04 EST 2004


Oh yes. You may have bad textures because you may need to do this...
sphere1->
sphere2->AppendPolyData->DepthSortPolyData->Mapper->TexturesMunged
sphere3->

----- Original Message ----- 
From: "John Biddiscombe" <jbiddiscombe at skippingmouse.co.uk>
To: "Andrew Usher" <A.C.J.Usher at damtp.cam.ac.uk>; <vtkusers at vtk.org>
Sent: Friday, March 12, 2004 1:53 AM
Subject: Re: [vtkusers] Opacity adjustment of actors


> Try adding a vtkDepthSortPolyData in the pipeline and see if it makes
things
> look better. It'll slow everything down to a crawl, but if it makes it
> better, then your problem is that multiple transparent objects have to be
> rendered back to front for correct opengl display.
>
> JB
>
> ----- Original Message ----- 
> From: "Andrew Usher" <A.C.J.Usher at damtp.cam.ac.uk>
> To: <vtkusers at vtk.org>
> Sent: Thursday, March 11, 2004 11:20 PM
> Subject: [vtkusers] Opacity adjustment of actors
>
>
> > 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
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
> <http://public.kitware.com/cgi-bin/vtkfaq>
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
> >
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list