glTF exporter only associating first element of animation per Armature #70096

Closed
opened 2019-09-20 07:43:43 +02:00 by Rei Kagetsuki · 5 comments

System Information
Operating system: Linux [other users tested on both Windows and MacOS]
Graphics card: Nvidia GeForce GTX 980 Ti

  • We have confirmed the issue is not system specific

Blender Version
Broken: 2.80 stable and 2.81 (built today)

Short description of error
A single Armature can only seem to animate a single element when exporting to glTF

Exact steps for others to reproduce the error
Please refer to attached model (and note it will be a big buggy when exporting from 2.80, less buggy with current builds of 2.81).
glTF multiple element single armature.blend
glTF multiple element single armature.glb < Export with fresh build of 2.81

We're trying to export an animation to glTF but only one [the first] element/bone gets included in the animation when exporting to glTF. The length of the exported animation is the same so we have a feeling the current implementation is only including the first element associated with the Armature rather than collecting each element being manipulated in the animation track. We have found examples with single animation tracks having multiple animated elements in the Khronos group glTF sample models so we suspect this is specifically an issue with the Blender glTF exporter.

Note: We were assuming it was a problem with how we had things set up, but we tried as many rigging variations as we could think of and none of them worked (other than baking animations, which we want to avoid). We also tried exporting to FBX and the animation played fine - so seeing as to how the glTF exporter seems to be aiming for at least parity with the FBX exporter we're guessing this is perhaps an impartial implementation issue rather than a bug.

**System Information** Operating system: Linux [other users tested on both Windows and MacOS] Graphics card: Nvidia GeForce GTX 980 Ti * We have confirmed the issue is not system specific **Blender Version** Broken: 2.80 stable and 2.81 (built today) **Short description of error** A single Armature can only seem to animate a single element when exporting to glTF **Exact steps for others to reproduce the error** Please refer to attached model (and note it will be a big buggy when exporting from 2.80, less buggy with current builds of 2.81). [glTF multiple element single armature.blend](https://archive.blender.org/developer/F7760145/glTF_multiple_element_single_armature.blend) [glTF multiple element single armature.glb](https://archive.blender.org/developer/F7760141/glTF_multiple_element_single_armature.glb) < Export with fresh build of 2.81 We're trying to export an animation to glTF but only one [the first] element/bone gets included in the animation when exporting to glTF. The length of the exported animation is the same so we have a feeling the current implementation is only including the first element associated with the Armature rather than collecting each element being manipulated in the animation track. We have found examples with single animation tracks having multiple animated elements in the Khronos group glTF sample models so we suspect this is specifically an issue with the Blender glTF exporter. Note: We were assuming it was a problem with how we had things set up, but we tried as many rigging variations as we could think of and none of them worked (other than baking animations, which we want to avoid). We also tried exporting to FBX and the animation played fine - so seeing as to how the glTF exporter seems to be aiming for at least parity with the FBX exporter we're guessing this is perhaps an impartial implementation issue rather than a bug.
Author

Added subscriber: @Kagetsuki

Added subscriber: @Kagetsuki
Julien Duroure self-assigned this 2019-09-20 11:37:14 +02:00
Member

Confirmed.

A workaround for now can be to use "always sampled animation". But this has another bug already known about not assigned vertices to bones (this is allowed in blender, but not in glTF). You can workaround it by creating a root bone, and assigned all non assigned vertices to this bone. See https://github.com/KhronosGroup/glTF-Blender-IO/issues/308

Anyway, the original bug is confirmed, and maybe linked to https://github.com/KhronosGroup/glTF-Blender-IO/issues/399

Confirmed. A workaround for now can be to use "always sampled animation". But this has another bug already known about not assigned vertices to bones (this is allowed in blender, but not in glTF). You can workaround it by creating a root bone, and assigned all non assigned vertices to this bone. See https://github.com/KhronosGroup/glTF-Blender-IO/issues/308 Anyway, the original bug is confirmed, and maybe linked to https://github.com/KhronosGroup/glTF-Blender-IO/issues/399
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Member

glTF stores rotation using Quaternion

You are doing the following animation:
Rotation from:
Euler(0, 0, 0) --> Quaternion (1, 0, 0, 0)
To:
Euler(3600, 0, 0) --> Quaternion (1, 0, 0, 0)

So animation can't be visible

No bug here, we have to animate rotation not only with multiple of 360°

glTF stores rotation using Quaternion You are doing the following animation: Rotation from: Euler(0, 0, 0) --> Quaternion (1, 0, 0, 0) To: Euler(3600, 0, 0) --> Quaternion (1, 0, 0, 0) So animation can't be visible No bug here, we have to animate rotation not only with multiple of 360°
Author

Thanks again @JulienDuroure .

Just curious: Is https://github.com/KhronosGroup/glTF-Blender-IO/issues/308 not resolved in 2.81? It seems to be for us in this case but I may be mistaken.

As for storing in Quaternion, had you not informed us of this in this issue I don't know how we would have figured this out. I have a feeling someone else may run into this in the future and we may get multiple issue posts in confusion. Some sort of warning or detection could probably help, but I don't have any suggestion as to how to implement something like that.

Keep up the fantastic work Julian - we really really appreciate it!

Thanks again @JulienDuroure . Just curious: Is https://github.com/KhronosGroup/glTF-Blender-IO/issues/308 not resolved in 2.81? It seems to be for us in this case but I may be mistaken. As for storing in Quaternion, had you not informed us of this in this issue I don't know how we would have figured this out. I have a feeling someone else may run into this in the future and we may get multiple issue posts in confusion. Some sort of warning or detection could probably help, but I don't have any suggestion as to how to implement something like that. Keep up the fantastic work Julian - we really really appreciate it!
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#70096
No description provided.