[vtkusers] vtkLODActor->GetProperty()->SetColor() does not maintain the input color?
David E DeMarle
dave.demarle at kitware.com
Fri Mar 2 09:37:49 EST 2012
Can you post an image along with a description of the RGB values you
are setting?
Also, please verify for us that none of the lights in your scene are
colored themselves. If that isn't the case the only variation of
colors for the objects should be the intensity variation due to the
diffuse color term of the lighting equation. I.e. they get darker the
more they turn away from the camera.
David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909
On Fri, Mar 2, 2012 at 9:28 AM, Hong Yi <hongyi at renci.org> wrote:
> I already set ScalarVisibilityOff() on the corresponding mappers, and not
> use scalar for color mapping at all, since the entire polydata will be
> colored in the same color as set to the corresponding actor. The problem is
> some of the uniform colors being displayed are not exactly the color being
> set to the actor, for example, the orange color (displayed on the legend)
> gets mapped to yellow for the actor in the view. Some color like green gets
> mapped correctly, but not some other colors. I have set lighting on, but did
> not expect the color could be off so much in many cases. Any
> insight/comment/suggestion is very much appreciated.
>
>
>
> Thanks,
>
>
>
> Hong
>
>
>
> From: Jothybasu Selvaraj [mailto:jothybasu at gmail.com]
> Sent: Friday, March 02, 2012 4:16 AM
> To: Hong Yi
> Cc: VTK Users
> Subject: Re: [vtkusers] vtkLODActor->GetProperty()->SetColor() does not
> maintain the input color?
>
>
>
> Could you try with mapper->ScalarVisibilityOff()
>
> Jothy
>
> On Thu, Mar 1, 2012 at 9:36 PM, Hong Yi <hongyi at renci.org> wrote:
>
> I am using distinct colors to represent each different molecular structure
> for multiple structure visual comparison. Each structure is represented by a
> different actor, and a predefined color is passed into the actor property to
> set its color. I found some colors get altered significantly. For example,
> the orange color becomes yellow. I want to show a legend to show
> correspondence between colors and structures, but some colors look so
> different between the legend and the displayed color for the corresponding
> structure actor. Is this expected behavior or I did not set up something
> correctly? Any suggestions and comments are very much appreciated.
>
>
>
> Thanks,
>
>
>
> Hong
>
>
>
>
> _______________________________________________
> 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
>
>
>
>
> --
>
> Jothy
>
>
>
>
> _______________________________________________
> 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