[vtk-developers] Bug in colors rendering?

Artem Babayan artem.paraview at googlemail.com
Mon Aug 22 09:58:55 EDT 2011


Hi,

I draw a 3D 'landscape' graphics of the function defined over XY plane
using vtkWarpScalar.
I have vtkLookupTable defining 24 colors to color the graphics
according to elevation --
the result should always be a picture with more-or-less parallel
strips of different colors --
all points within a certain z-range should be of the same color.
However, I found that if
maximum of the 'landscape' exceeds the value set in
mapper->SetScalarRange() the
results are different. I have attached 3 pictures of simple paraboloid:

((x - cx)^2 / a^2  + (y - cy)^2 / b^2) - shift_z) * coeff

where cx = 7500, cy = 7500, a = 0.2, b = 0.8, shift_z = 9e7, coeff=-1e-4

this is a "squeezed" inverted paraboloid (as a != b) with maximum
z=9000 over x = y = 7500.
The grid is 30x30 with cell size 500.

When I use mapper->SetScalarRange(0.0, 9000)  the results are perfect
(para_9000.png)

When I use mapper->SetScalarRange(0.0, 900) I would expect the narrow
strips of different colors
upto the height 900 and then the maximum color upwards. However, what
I get (para_900.png)
is that 'lower level' colors stretch to the mark ~2300.

Is there a bug in how colors are assigned to the points on the surface?

Best wishes
Artem
-------------- next part --------------
A non-text attachment was scrubbed...
Name: para_900.png
Type: image/png
Size: 29914 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20110822/2e2040c1/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: para_4500.png
Type: image/png
Size: 25765 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20110822/2e2040c1/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: para_9000.png
Type: image/png
Size: 22155 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20110822/2e2040c1/attachment-0005.png>


More information about the vtk-developers mailing list