[vtkusers] Scalar data interpreted as 4 component color does not interprete the alpha value correctly

Barth, Sebastian sebastian.barth at iosb.fraunhofer.de
Mon Jun 21 06:51:10 EDT 2010

Hello vtkusers,

I display a cluster of points stored in a vtkPolyData with one vtkActor. There is also scalar data for every point of the polydata. It's stored in a vtkUnsignedCharArray which contains 4 components (r, g, b and alpha color values) per point that are interpreted as color (mapper->SetColorModeToDefault()).

The problem is that the alpha value is intpreted only in respect to the background color. Any other object is ignored!
For example: You have a point cloud with only red points that have a alpha value of 128 (the scalar range is 255), represented by the components {255, 0, 0, 128}. The background color is black but between the background and the point cloud is a while plane which hides the background. Normally this wall and the alpha value 128 should color the points in front of the plane more in a brighter red. The opposite happens: The points are getting darker because of the black background behind the plane!

Is this a bug or did I forget anything?

Thanks a lot,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100621/f36e0296/attachment.htm>

More information about the vtkusers mailing list