[vtkusers] Incorrect coloring landscape by elevation ?

Artem Babayan artem.paraview at googlemail.com
Fri Aug 19 11:48:47 EDT 2011


Hi David,

Yes, I have seen these examples. I need to color surface, which in
this context means to color triangles -- that is that color of each
triangle's point (not only vertices, but inside triangle as well)
would correspond to its z-coordinate mapped through the lookup table.
Otherwise the result does not look like elevation-based colors.

Examples you mention show how to assign color to each point of the
grid isn't it? But this is already done correctly, at least I think
so.

Best wishes
Artem

On 19 August 2011 16:34, David Doria <daviddoria at gmail.com> wrote:
> On Fri, Aug 19, 2011 at 11:30 AM, Artem Babayan
> <artem.paraview at googlemail.com> wrote:
>> Hello,
>>
>> I and drawing the 3D 'landscape' graph using the data defined on 2D
>> structured grid and I would like to color the resulting graphics
>> according to elevation. The pipeline looks like this:
>>
>> vtkImageData->vtkImageDataGeometryFilter->vtkWarpScalar->vtkDataSetMapper
>>
>> The mapper has a color lookup table. The result (picture attached)
>> does not shows the color based on elevation, that is points with the
>> same z-coordinates have different colors. Why? It looks like points in
>> TRIANGLES which form the surface were colored correctly, by within
>> each triangle the color is just interpolated. Is it a correct
>> behaviour or am I doing something wrong?
>>
>> Best wishes
>> Artem
>
> Are you trying to color the triangles? or the points? If you color the
> points, the colors inside the triangles will indeed be interpolated.
>
> Have you seen these examples?
>
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/ElevationFilter
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/Color_a_mesh_by_height
>
> David
>



More information about the vtkusers mailing list