Three.js: GLTFLoader: Only one animation created by Blender exporter

Created on 23 Apr 2018  Â·  6Comments  Â·  Source: mrdoob/three.js

I have a 3D glb model generated using blender and it has multiple animations.
When I render the file through threejs I get only one animation object i.e animation_0, because of this I am unable to control the individual animations.

  1. Is it possible for me to have control over these animations through threejs?
  2. Do these animations need some changes before exporting from blender?
  3. Why is the name always 'animation_0'? Can it be changed? (I have given proper names to every animation in blender)

@donmccurdy I have tried this solution but din't work for me.

Is there any WIP regarding this?

Three.js version
  • [ ] Dev
  • [x ] r92
  • [ ] ...
Browser
  • [x] All of them
  • [ ] Chrome
  • [ ] Firefox
  • [ ] Internet Explorer
OS
  • [x] All of them
  • [ ] Windows
  • [ ] macOS
  • [ ] Linux
  • [ ] Android
  • [ ] iOS

Most helpful comment

glTF supports multiple animations, but issues 1–3 result from the Blender exporter only being able to export a single animation. As you found, https://github.com/KhronosGroup/glTF-Blender-Exporter/pull/166 is the WIP for fixing this. If you've installed that version of the exporter but are still only getting a single animation, then I'll need more information.

When you say the Blender file has multiple animations, do you mean multiple Actions? Or NLA tracks? Posting the .blend file (you can attach ZIP files to GitHub comments) would be the most helpful way to clarify this.

All 6 comments

glTF supports multiple animations, but issues 1–3 result from the Blender exporter only being able to export a single animation. As you found, https://github.com/KhronosGroup/glTF-Blender-Exporter/pull/166 is the WIP for fixing this. If you've installed that version of the exporter but are still only getting a single animation, then I'll need more information.

When you say the Blender file has multiple animations, do you mean multiple Actions? Or NLA tracks? Posting the .blend file (you can attach ZIP files to GitHub comments) would be the most helpful way to clarify this.

@donmccurdy Sorry my bad I wasn't using the right exporter. I am able to export multiple actions now.
Thanks for the quick response really appreciate it

@donmccurdy Strange, I'm unable to export multiple actions. And if I push down, mesh is all messed up , plus one 'idle' animation is missing during export. Here is the model, copyright Jun Wang. https://drive.google.com/open?id=10aZzi6RfDbDCYD-UloraL3SNOriVX9qT

@tiancaipipi110 could you open a bug on https://github.com/KhronosGroup/glTF-Blender-IO? I'd suggest testing on the latest version of Blender 2.8 (beta) if you haven't yet.

@donmccurdy The gltfBlenderIO on 2.8 Beta isn't able to export at all, that's why I was using the archived gltfBlenderExporter. But sure I'll open a different bug in their repo.

There will be no future updates to glTF-Blender-Exporter, just the new IO repository, so if there's a bug that's where it will be fixed.

Was this page helpful?
0 / 5 - 0 ratings