Animations aren't playing well, am I even doing this right?

I’ve read the documentation i’ve done everything but this is just not working.

So I have this fbx/gltf whatever file and the animations are wonderful inside of 3dsmax, maya, c4d whatever, but when I import them into threejs and loop through and play the animations they’re just not behaving properly.

Here’s my fbx with the animation:

and my gltf file:

I am absolutely lost any and all help would be absolutely heavenly.

Thanks in advance <3

ps here’s how I’m doing it with code:

const loader = new GLTFLoader();
loader.load(logo, obj => {
  // GLBLoader
  obj.scene.scale.set(0.001, 0.001, 0.001);
  obj.scene.position.set(0, 0, 0);
  this.object = obj.scene;
  this.mixer = new THREE.AnimationMixer(this.object);
  obj.animations.forEach((animation, i) => {

What was the glTF version created with? I’m not sure it’s written correctly, and you definitely shouldn’t need to play a separate animation clip for each fragment in the model… taking the FBX version and converting it with Facebook’s FBX2GLTF, I think I’m getting the right result:

(testing in

1 Like

Exported it with the Cinema4D GLTF exporter. Is there a better way of doing it? I’ve done some three js in the past but it’s my first time working with this kind of stuff. Should I be considering adding a physics engine and doing this all in code?

Also can you please provide me with that file because every time I’m trying to do this I’m literally getting just absolute botched models it’s so frustrating :confounded:I’m so sorry for the trouble

Oh ok – the C4D exporter is very new and still in “Maxon Labs” (which I guess is experimental stuff?). I didn’t know they had animation support yet actually. Anyway this conversion with FBX2GLTF works:

explosion.glb (1.4 MB)

Maybe worth filing a couple bugs on the C4D exporter if there’s a way:

  • file should include an asset.generator string so devs can identify how it was created
  • animations should be bundled into a single glTF animation entry if they’re meant to be played together, not separate small animations for each piece of the model
  • something is buggy in the TRS animation export, maybe quaternion rotations need to be resampled.
1 Like