I’m creating a model which is built from a variety of components. This model is then exported as a Collada file, and then loaded into threejs, using the threejs ColladaLoader. All works well, except for a small issue involving the component textures.
Within my model, the same components are used several times in different positions, resulting in multiple instances of identical components. I’m able to make each instance of each component “unique”, and I’m able to successfully reference each unique instance component within the threejs visualisation. All is good, except for the textures.
These instances are identical apart from their Name and Definition Names, and as a result their textures are all the same. Looking inside the .dae file exported by Sketchup, it appears that it does create a unique geometry for each unique component, but it doesn’t create a unique texture, instead, the textures for each unique component are pulled from the pool in library_materials. Each otherwise unique component is therefore using the same references to the textures.
When this is loaded into threejs, it replicates all this, and creates unique components, but the textures are common. So if you try to reference the texture of a unique component, all the instances of that texture are referenced… across every instance of the unique components
Any way around this? Or am I doing something wrong? TIA, James