Error when loading glTF files exported with Needle in regular three.js

I’m getting this error pretty often when exporting avatars using Needle, using the GLTF loader. Do you think this is a bug with the Needle exporter or the Threejs GLTF loader? Can have a crack at fixing it if it’s the loader. Thanks :blush:

Original Post on Discord

by user 617973759852281873

can send a few models if it helps!

by user 617973759852281873

Hey there, can you send the full stacktrace of the error? Do you use the default avatar or another one?

Does it happen when developing locally?
Models would help :slightly_smiling_face:
You could send a small repo (e.g. when your scene is open just click “Help/Needle Engine/zip project” to create a minimal zip with just the assets used in your current scene)

If you have it uploaded somewhere the link would also help :slightly_smiling_face:

Have discovered it imports fine if i remove the animator component, before exporting

by user 617973759852281873

sent you an exported glb

by user 617973759852281873

Hey, I know that error

So the thing is that we export with KHR_animation_pointer by default, thus allowing all kinds of animations to be exported (not just transforms that move around)

We’ve added that to three.js and the PR is open, but hasn’t been merged yet, and what you’re seeing there is that error

aw cool you’re already onto it! thanks :blush:

by user 617973759852281873

Right thats possibly it - you can try using our fork for that "three": "github:needle-tools/three.js#needle-dev-5",

Its three v 144 (soon 145)

spotted it: GLTFLoader: add arbitrary property animation through KHR_animation_pointer support by hybridherbst · Pull Request #24108 · mrdoob/three.js · GitHub will have a go at adding it to the loader we’re using, thanks!

by user 617973759852281873

Currently you’ll have to merge at least these two into three core to use it:
unknown.png

Problem ist that the core is / was not flexible enough to do something as extensive as KHR_animation_pointer, we had to fix a few things there first and add the right callbacks

Changed the channel name: Error when loading glTF files exported with Needle in regular three.js

Summary for others finding this thread:

  • Needle Engine uses KHR_animation_pointer by default, which allows animating all properties of a glTF file
  • That extension is not yet supported on three.js main, but it is supported in Babylon, Gestaltor, and our fork of three.js

Here is our fork GitHub - needle-tools/three.js: JavaScript 3D Library.
Current branch: GitHub - needle-tools/three.js at needle-dev-6

Pinned a message.