How to load texture with GLTFReader

Hi I’m trying to load gltf model. But can I load animation and texture at the same time? I refer to GLTFReader + texture and VTK: vtkGLTFReader Class Reference. vtkGLTFReader can load animations but it can’t load texture. vtkGLTFImporter can load texture but it can’t load animations, morphing or skinning.

Thanks.

The vtkGLTFReader can read textures using vtkGLTFReader::GLTFTexture vtkGLTFReader::GetGLTFTexture(int index), but this functionality is not exposed to Python. The GLTFTexture contains a vtkImageData. It would be a small change to the C++-code to add a method for accessing the texture as a vtkImageData, which is known by Python. Perhaps, a change request should be made.

You may want to look into the F3D projet, it supports morphing and skinning on GPU with the vtkGLTFImporter: