GLTF file support in ParaView is incomplete
vtkGLTFReader
- Available in ParaView with File -> Open (*.gltf, *.glb)
- Loads each part of the mesh into a block of a composite dataset.
- Loads materials and textures, but cannot apply those on actor because this is a reader.
- The composite polydata mapper needs to be aware of the material and texture description found in the field data of reader output. vtk/vtk!5735 does this in a new vtkGLTFMapper.
vtkGLTFImporter
- Not available in ParaView.
- Loads each part of the mesh into a vtkPolyData connected to a vtkActor through a vtkPolyDataMapper.
- Loads materials and textures, applies them on actors.
- PBR information is directly applied on actors.
- Bringing this to ParaView would imply constructing fake proxies to represent each actor. Composite actors (NOT composite datasets) are non trivial in ParaView pipeline browser because each element can have atmost one representation. A solution to this problem would allow us to import external scenes in ParaView.
- If this is being brought into ParaView, it would be nice to have a UI dialog that can choose which actors will be imported.
vtkGLTFWriter
- Not available in ParaView.
- Saves material and textures. It looks for specific arrays on the field data of the input dataset. From looking around in unit tests, it expects developers to populate the field data with material and texture file names.
- Meant as a lower level approach to writing GLTF files.
- Not bringing this to ParaView.
vtkGLTFExporter
- Available in ParaView with File -> Export Scene...
- Saves simple material numbers like strength, metallic factor, roughness factor and base color texture only. Does not save any other texture like normal map, occlusion map, etc.
- Saves all actors from the render window's renderers.
- There is a UI dialog that's shown when using this exporter. It's very basic and has 3 checkboxes. Add more capabilities to allow selective export of actors or textures.