setting color and textures in vtkGLTFExporter

Hello,

I have a triangle mesh with 2 scalar fields for each triangle. I would like to export the mesh to a gltf file. I was thinking in put the 2 scalar fields in the color or texture coordinates and then export with vtkGLTFExporter.

My mesh is already set and the vtkGLTFExporter is already working but I don’t know how to set the colors and textures for each triangle.

Thank you,

Rafael Scatena

PS: This is when I open the saved gltf file in another program:

image

The GLTF exporter does not automatically export scalar coloring. Can you share a sample dataset? It maybe possible to achieve the desired output.