Can vtk file or vtp file save texture image, or can we write mtl file to reference texture image like obj file?

When we write a vtk file or vtp file, we can only save the texture coordinates in the file, and the texture image needs to be added to the role at rendering time via SetTexture. w I want to introduce a link to the texture image directly by writing to the vtk file or vtp file or write it directly to the vtk file so that I don’t need to load it manually when visualizing it in ParaView. Texture images

Hi @Ericsson-paul

You want to use a format that support image texture, you also want to use an exporter.

vtkOBJExporter or vtkGLTFExporter comes to mind.

Best,

Thanks for your reply. According to your reply, is it possible to determine that the vtk file or vtp file cannot save texture images or texture image reference paths, but only texture coordinates, and ParaView can only load texture images manually to display the textures in the vtk file

Yes, this is correct.

You can automatize this using state files or python state files in ParaView though.

Thank you for your reply, but I’m sorry I don’t understand it very well, can you be more specific about how to achieve it, or is there a reference link I can learn from?

How to achieve what ? You questions is not super clear.

I’m very sorry for my lack of clarity, I don’t know much about this, I’m asking how to automatize this using state files or python state files in ParaView though.

You are on VTK discourse though. Please ask ParaView questions on: https://discourse.paraview.org

Thank you very much for your reply!