How to save/export color data while exporting 3d geometry file. (obj)

For example, when I apply a tube filter on my stream tracer it shows something like this.


And now when I export it to obj (because Unity supports it) The color data is lost and I just see grayscale obj. So can we export its texture and .mtl as well? along with.obj file. If there is some other way to achieve my desired output (exporting it as is in Unity) that would be really helpful.

What you want to do is export the scene. However, the OBJ exporter available in VTK is not exposed in ParaView - not sure why, but it probably should be. I have opened an issue: https://gitlab.kitware.com/paraview/paraview/issues/19683

Does ParaView python has this functionality? If yes then which command to use!

Yes.

ExportView('example.x3d')
1 Like

Hello,

I am having the same issue here. When I export as x3d the color data is lost. I tried in webGL format and the colored scale is displayed but the figure also has no color. Is the color export supported in any 3d exporting format?

Thanks

Mathilde

I do not know about .x3d, but .gltf and other formats supports it.

Hello,

It also removes any color when I export to .gltf.
I tried to export to .gltf with the example of this thread Volume Viz with Multi Component Color/Opacity Mapping in Paraview 5.6.0-RC2, and it worked.
I think my problem might be that I want to export colored volume and not colored surface (like in the example). Is that even possible with .gltf or any other format?
I’m putting below an image of the volume I want to export, and another image showing a .gltf export of this figure but using a surface representation (the colors are there but it is not what I want since there is no 3D)

I’m afraid scene export of volume rendering is not supported.
I would generate isosurfaces in your situation.

Hello everyone,
I would like to export an isosurface from paraview to unity with colors (in my case a grayscale).
I have tried with any format, but in unity I cannot see the colors.
Can anyone help me?
I attach the photo of what I want to export.
Thanks

Use the “Export Scene” option and choose the format “glTF”. It will have color data. But you need glTF library inside unity for loading it then.

One could export the PLY format (with color at the nodes) from ParaView, import to Blender and convert to an FBX file, then load the FBX into Unity.

Less direct but should certainly work. Although using Blender can be quite overwhelming/intimidating, even for simple tasks.