3
$\begingroup$

I'm fairly new to gltf and am gradually learning about it's abilities/limitations. I am currently trying to test a file that would have multiple objects animate in a scene. However, whenever I export, only one of the objects animates (but if I export them individually, they animate fine on their own).

I read in the documentation that "glTF allows multiple animations per file, with animations targeted to particular objects at time of export. To ensure that an animation is included, either (a) make it the active Action on the object, (b) create a single-strip NLA track, or (c) stash the action." but it's hard to tell if that means one object can animate multiple times, or if you can have multiple objects animate in the one export. As I tested this with no success, but maybe I'm not creating the NLA track properly.

Any help or clarification with this would be extremely appreciated!

Thanks :)

$\endgroup$
2
$\begingroup$

A newer manual says:

"An NLA Strip animation consists of multiple actions on multiple objects that should play together. To create an NLA strip animation with the name “My Animation”, push the action that should play each object onto an NLA track for that object with the name “My Animation”.

NLA Strip animations will be exported if the Animation ‣ NLA Strips option is selected (on by default). All glTF animations are imported as NLA Strip animations."

Or see here: https://github.com/KhronosGroup/glTF-Blender-IO/issues/219#issuecomment-453621051

The second part of that post: "If you have two NLA tracks with the same names on different objects, you should get a single merged animation out that affects both."

So you have to create NLA tracks and give them the same name. It worked with my animation. good luck with yours!

| improve this answer | |
$\endgroup$
  • $\begingroup$ Amen to this! I was wasting time trying to combine all my animations into a single NLA action, thinking that was the solution. In fact, it doesn't matter how many tracks or strips you have - just make sure that every track you want involved in a single GLTF animation has the same name. $\endgroup$ – Luke Oct 9 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.