I need to import some 3D textured models made with Blender and duplicate them several times. I use the GLTF format. The vtkGLTFImporter works fine with one object (I can duplicate the imported actor) but I encounter strange behaviour as soon as I import 2 different objetcs. The textures are applied randomly (the 2 original imported actors are correct, but the duplicated ones get all the same texture, and this may change if the original actor get out of the cam view… - All geometry is correct).
To duplicate an actor I use :
NewActor = vtkActor::New();
I’ve made a test doing the same with 2 cubes textured manually with 2 different textures. All works fine with the duplicated ones.
One difference i noticed is that “ImportedActor->GetTexture()” returns a NULL, but returns a valid pointer with the cube test.
What is the difference between the GLTF importer texturing method and a simple manual texturing?
What is the proper way to duplicate a GLTF imported actor with his texture ?