[vtk-developers] vertex colors in poly data

Amy Henderson amy.henderson at kitware.com
Fri Feb 8 15:13:05 EST 2002


Hi VTK developers,

I would like to propose a small change to 
vtkOpenGLPolyDataMapper.  Currently, if poly data has vertex colors, then 
the color controls either the diffuse or ambient property, depending on 
whether the ambient component or the diffuse component is 
greater.  Instead, I would like to change this so that vertex colors 
control both the diffuse and ambient properties.

I ran into this problem because I wanted to use a lookup table to control 
the color and opacity of the points in my data set, but I also wanted to 
turn shading off (ambient = 1, diffuse = specular = 0).  When I did this, 
my poly data became completely opaque, even though I had specifically set 
opacities in my lookup table to be less than 1.  Changing the poly data 
mapper to control both diffuse and ambient by the vertex colors fixed this 
problem.

Any opinions?  Any reasons not to make this change?

- Amy




More information about the vtk-developers mailing list