I’m trying to hook VTK up to a different rendering engine. I’ve made it so far as to setup and execute my pipeline and
using the vtkPolyData, create the geometry in the rendering engine.
My issue now is that I want add per vertex color and normal information to it.
If I use VTK to render, ie vtkActor, everything works as expected. However I don’t see how to extract the
“color” array from the mapper or the polydata. Is this possible?
In a very old version of vtk, there was a way to get the colors assigned to vertex data as an array from the mapper.
vtkActor actor =…;
vtkPolyDataMapper mapper = …;
double opacity = actor.GetProperty().GetOpacity();
colorArray = mapper.MapScalars(opacity);
There was also a vtkMapper::GetColors() method but that is gone as well.