0
$\begingroup$

I'm using blender 2.93 and I'm trying to export a cat with animation to treejs.
basically, it's a low poly cat with an armature, and a short animation on its tail.
I have tried to export the cat to glb and gltf but the animations are always blank.

I tried different things but nothing works...
I think the armature is ok.
I changed the name of the action in the NLA tracks.
I also tried to bake it and play with the exporting setting.

I'm new to blender and would appreciate any response that might give me an idea of what I am missing.

I have uploaded the file here- https://pasteall.org/blend/965a1f1763a34e49a51452d727a330e8

$\endgroup$

1 Answer 1

2
$\begingroup$

In the export window, tick "Always Sample Animation", seems to solve this.

enter image description here

Also note you didn't apply modifiers, you will only get half a cat wiggling half a tail.

$\endgroup$
5
  • $\begingroup$ I already tried that option, it must have been off because I played with the settings.. anyway I applied the modifiers and tried again (with that option) - still no luck $\endgroup$
    – Shaked
    Commented Sep 27, 2021 at 12:49
  • 1
    $\begingroup$ did you make sure to select both your armature and object? because you have "Only Selected" ticked as well. edit: the animation IS exported as seen in Windows 3D viewer. the problem is probably in your integration with ThreeJS. $\endgroup$
    – high_byte
    Commented Sep 27, 2021 at 12:51
  • $\begingroup$ I didn't know you could use Windows 3D viewer like that and I can see the animation now- thank you! I spent days blaming blender but apparently, the problem was actually treejs... though I have no idea why. $\endgroup$
    – Shaked
    Commented Sep 27, 2021 at 13:08
  • $\begingroup$ I have experimented with threejs. feel free to ask a new question ;) $\endgroup$
    – high_byte
    Commented Sep 27, 2021 at 13:10
  • $\begingroup$ You need to use the animation mixer in 3js. Something like this mixer = new THREE.AnimationMixer( gltf.scene ); gltf.animations.forEach((clip) => {mixer.clipAction(clip).play(); }); $\endgroup$
    – Doug
    Commented Jan 27, 2022 at 14:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .