THREE.ColladaLoader: Undefined sampler

Description of the problem

Sorry for ticketing so many issues lately 😅

Some meshes started showing this error after upgrading to the new Collada, e.g. this mesh.

So after some debugging, in the loader at this line it is trying to find texture0 in the samplers, while the correct sampler is texture0-sampler .

This workaround solves it for me.

var sampler = effect.profile.samplers[ ] || effect.profile.samplers[ + '-sampler' ];
Three.js version
  • Dev
  • r87
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, …)

Author: Fantashit

2 thoughts on “THREE.ColladaLoader: Undefined sampler

  1. In your files, it looks like the blender exporter is properly giving the sampler’s id to the channel’s texture, whereas meshlab’s present kind of the same problem as Maya 2017’s here, giving the image id instead of the sampler id to the channel’s texture. Feels like a collada exportation plugin problem..

Comments are closed.