[vtkusers] Re: vertex colors

Goodwin Lawlor goodwin.lawlor at ucd.ie
Tue Jan 9 15:14:31 EST 2007


Dean Inglis wrote:
> I have a triangluar surface mesh with 
> rgba color data associated with each
> vertex (point) of the polydata mesh:
> 
<snip>
> How do I get the polydata mapper to use these
> scalars to color the mesh?  Is it...
> 
> mapper->SetInput(surf);
> mapper->SetScalarVisibilityOn();
> 
> ? I'm not getting what I expect.
> 
> thanks,
> Dean

Hi Dean,

Have a look at the code here 
http://vtkbioeng.cvs.sourceforge.net/vtkbioeng/vtkbioeng/vtkCollisionDetectionFilter.cxx?view=markup
from line 531

You need to use an vtkUnsignedCharArray with values 0 - 255 ... these 
values will be rendered directly, bypassing any LUT.

hth,

Goodwin




More information about the vtkusers mailing list