[vtkusers] Scalar data interpreted as 4 component color does not interprete the alpha value correctly
David Gobbi
david.gobbi at gmail.com
Mon Jun 21 07:36:18 EDT 2010
Hi Sebastian,
Could it be a sorting issue? Translucent actors must be sorted
back-to-front for alpha compositing to work properly. Opaque actors
do not have to be sorted, they are always rendered before any
translucent actors are rendered.
VTK will assume that any object with 4 color components is a
translucent object, and it will assume that any object with an Opacity
less than 1.0 is translucent. Likewise, objects with 3 color
components and with an Opacity of 1.0 are assumed to be opaque.
David
On Mon, Jun 21, 2010 at 4:51 AM, Barth, Sebastian
<sebastian.barth at iosb.fraunhofer.de> wrote:
> 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,
>
>
>
> Sebastian
>
> _______________________________________________
> 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