Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to gltf_viewer to play all animations #2099

Closed
wants to merge 1 commit into from

Conversation

bejado
Copy link
Member

@bejado bejado commented Feb 5, 2020

glTF files exported from Blender export multiple animations, separated per object. This adds a new "Play All" option to simultaneously play all the animations present in the glTF file:

Screen Shot 2020-02-05 at 1 06 06 PM

@bejado bejado requested a review from prideout February 5, 2020 21:09
@prideout
Copy link
Contributor

prideout commented Feb 5, 2020

I actually think we shouldn't merge this. In fact I originally used checkboxes but this turned out to be wrong. According to the spec, best practice is:

...each animation is self contained as an action. For example, "Walk" and "Run" animations might each contain multiple channels targeting a model's various bones. The client implementation may choose when to play any of the available animations.

The Blender exporter might be doing something wrong. It often does.

(For further details see KhronosGroup/glTF#1730)

@bejado
Copy link
Member Author

bejado commented Feb 5, 2020

@prideout Interesting point. Yeah, I'm not sure why Blender chooses to do it this way. Perhaps the issue is better addressed there.

@bejado bejado closed this Feb 5, 2020
@donmccurdy
Copy link

Blender's animations (Actions, or NLA Tracks) are associated with a single object. Frustratingly, there is no mechanism in Blender to specify:

  1. [Run, Walk, Idle] animations are meant for Character X, not Y.
  2. [A, B, and C] animations are meant to be played on objects X, Y, and Z simultaneously.

As you can imagine, that creates challenges both exporting and importing. See KhronosGroup/glTF-Blender-IO#671.

We've gone through a few iterations in the Blender exporter, and landed on the behavior documented here as a solution for users who need multiple distinct animations.

The exporter would benefit from another option, to export all active actions as a single (global) glTF animation, but that has been lower priority, to date. Feel free to file an issue if that sounds like what you need!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants