[vtkusers] How is the color of cell interpolated given different colors to each cell point?

David E DeMarle dave.demarle at kitware.com
Tue May 2 10:40:17 EDT 2017


If vtkMapper::InterpolateScalarsBeforeMapping is Off, we send the RGBs at
each vertex and GL interpolates the RGB values over the polygon. This can
produce incorrect results (colors outside of the lookup table) so I don't
recommend it.

If On, we send the color lookup table for the object over and the values at
each vertex instead of the colors at each vertex. GL interpolates the
values over the polygon and looks up the color at each pixel from the
lookup table.

Note that you can also color by cell aligned values. See
vtkMapper::SetScalarModeToUseCellData(). Here the color of all pixels
within a polygon will be the same and determined by looking up the cell's
value in the lookuptable.


On May 2, 2017 3:19 AM, "Tharun" <tharun160190 at gmail.com> wrote:

> In all the workflows I see, we assign a scalar value to each point and
> color
> of cell(colors inside cell) is interpolated(calculated) automatically by
> VTK
> using the color of cell points.
>
> May I know how is the interpolation done?
>
> Thanks in advance.
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.c
> om/How-is-the-color-of-cell-interpolated-given-different-col
> ors-to-each-cell-point-tp5743035.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensou
> rce/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170502/81ef31b9/attachment.html>


More information about the vtkusers mailing list