How to trim excess duration time after an animation is finished? – Questions


Hi I’m new to ThreeJS and I’m working on displaying a model and playing its animation on loop. I was able to get it to work but I ran into a problem which I think is from the model itself.

The animation I want to play is “Action_Crawl”. It has 86 frames but the total duration is 22s!!? The real crawling action only takes about 2s and after that the model just freezes for the rest of the duration before doing another loop.

How can I trim off the excess 20s?

Im not sure what the times in green arrow mean.

Here’s what I’ve tried so far:

  • Set the action duration to 2s but it just speeds up everything

  • Opened the Action_Crawl.FBX in blender to confirm the animation only lasts 86 frames (I don’t know Blender I just installed it yesterday out of curiousity)

This model has a lot of animations and all of them have the same problem with excessive time. Is this something I can change in js or does it requires modification inside the model? It comes with glb, gltf, and all of the fbx files for every animation.

Thank you for reading.

Do it in Blender, or if you do it in JS, then you can use THREE.AnimationUtils.subclip

See line 60 in example below



1 Like



Source link

Leave a Comment