[vtkusers] Lightweight object that I can change the transparency

Hal Canary hal at cs.unc.edu
Mon Jun 10 07:42:02 EDT 2013


On 06/10/2013 07:25 AM, Doug Hoppes wrote:
> Is there a fairly lightweight and fast vtk object  that I can set the
> transparency.  Ideally, a sphere?  I have a situation where I may need
> to display about 10,000 of them fast.  The vtkglyph3D works great, but,
> you can’t set the opacity on it.

Do you want to set the opacity of each sphere separately?  You can 
manually create a RGBA (color+alpha) unsigned char array and turn off 
scalar mapping in the vtkMapper (vtkMapper::SetColorModeToDefault()). 
Choose the RGBA array with vtkMapper::SelectColorArray().  Then you can 
change the alpha value (and color) of each point via whatever algorithm 
you choose.




More information about the vtkusers mailing list