[vtkusers] Transparency in VTK
David Feng
dfeng at cs.unc.edu
Thu Sep 24 14:51:24 EDT 2009
You can do what you want with:
(your vtkActor)->GetProperty()->SetOpacity(.5)
Be careful, though. You need to depth-sort your polygons in order for
transparency to work as expected. Otherwise, blending will happen in
the wrong order. You can do the sorting one of two ways:
1) enable depth peeling: http://www.itk.org/Wiki/VTK/Depth_Peeling
2) plug your vtkPolyData into a vtkDepthSorter
The former is generally faster, depending on graphics hardware.
David
Arsham Mesbah wrote:
> Is there any way in VTK that we can change or set the transparency
> factor?! Let say we have an object that is is visualized (a surface)
> and we want to change the transparency factor to 50% or change it so
> it will become see through (Not wire frame or anything! ) just see
> through!
>
> --
> Sincerely Yours,
> Arsham Mesbah
> University of Georgia
> Department of Computer Science
> 415 Graduate Studies Research Center
> Athens, GA 30602
> Web: cs.uga.edu/~ars <http://cs.uga.edu/%7Ears>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list