-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Missing tracks in imported .glb (glTF) animations #59150
Comments
I noticed there's no mesh. Please review KhronosGroup/glTF-Blender-IO#1582 for exporting pure animations. Edited: |
I store meshes and animations in separate files and reuse them. Had no problems so far until now, when I started working with hand attachements and noticed that something is not right. |
Godot and Blender require an armature structure which is guessed from the gltf file. The 1582 pr forces the Blender Armature / Godot Skeleton3D through adding the gltf nodes to a skin object. See the issue in the pr for more details. |
Checked PR and and tried re-exporting with skeleton info. It imports structure as skeleton now, but it still doesn't solve the issue and tracks are missing. The problem is that some tracks are actually missing although they exist in file. While exporimentiing with this updated glTF blender addon I've noticed one thing that could be a clue:
Here I attach one of the animations re-exported to .gltf text file (with regular hierachy, no skeleton), so you can manually analyze it that rotation animation track actually exists (e.g. node id 38) but is not imported by Godot. |
This comment was marked as outdated.
This comment was marked as outdated.
I believe we're supposed to blend animation with also the RESET pose. It was discussed at some point that we didn't want to generate placeholder tracks that reset the animation when the RESET track feature exists. Another feature that interacts is because a transform is split into three in the spec the tracks aren't physically there. Can you describe more about how you use this feature? I'll be back with a data inspection diagram. |
I think there's probably an off by one by where constant values different from the RESET pose for one frame are lost. |
I store character mesh in a separate .glb file with skeleton in T-Pose as rest pose (those T-Pose transforms i use in RESET track, so they are default if no track is defined for a bone in animation). Importing mesh to Godot with Skeleton in T-Pose works flawlessy. The problem is when some track value doesn't change over time (so bone pose is set once in first frame and thats all) - then this track is not imported by Godot and animator uses value from RESET, so T-Pose pose instead of pose defined by first frame of animation clip. I've just noticed another thing: I can workaround problem by updating my PostImport script to add missing tracks using those transforms, but still, this is not a valid solution. |
I see in source that glTF importer has hardcoded skipping animation tracks whose all keys are equal to node rest value. It's definitely going to be even more problematic when resuing more animation clips on more different, but compatible character - rest pose on character node will be usually different than rest pose in animation file, so I think it's better not to have enforced such optimization. No other scene importer I see in Godot does that - tested exporting to different formats and this problem doesn't occur, everything is fine. Will make a PR later. |
This is no more the case since Blender 3.2. Now, by default, rest pose (ie when armature is in edit mode) is used as rest pose at export. |
The usability of glTF animation export has improved greatly in Blender 3.2 and every subsequent version. As for the original issue, there is an issue that animation tracks with only one keyframe will be removed when identical to the rest pose. The real issue here is the rest pose is identical to the animation keyframe, which means retargeting won't work as expected. Since this issue was reported, we did add a checkbox in Godot 4.0 (see PR #72342 ) to the import settings to workaround this exact issue: If you encounter this issue and do not intend to use retargeting, you can disable the "Remove Immutable Tracks" option under the Animation section of the Scene, and then optionally change the "Import Tracks" dropdowns in the AnimationPlayer node of the advanced import settings to remove unwanted Scale tracks. Otherwise, going through newer versions of Blender should be an option and will work better on the latest version of Blender. Given that there has been no new comments or reports on this issue for most of a year, I think it is reasonable to close this issue at this point. Edit: adding screenshot showing both settings (Remove Immutable Tracks) that I recommend changing for the originally reported glb files: |
This seems to still be the case. I turned off the optimiser, and only moving my bones slightly out of rest position helped. If it is then this would explain my problem I switch between equip animations depending on equipped item. Some items don't require me to update the hand position. Because Godot drops the tracks that match bone rest those bones stay in their last position. So if my player equips a chocolate bar (pinch movement) and then holds a crate (flat hand, rest pose), the hand is still in a pinched position while holding the crate. If this is still the case, and it seems to be, this really needs to be an importer option. @Calinou or someone similar, can we reopen this issue, or shall I make a new one? |
I ran into this as well. I disabled the optimizer in Blender export settings, and everything worked fine. However, after making some changes to the mesh and re-exporting, my animation tracks were once again missing. I had to RE-ENABLE the optimizer to get the tracks to come back... Definitely something a lil sus going on with Godot's GLTF importer in regards to animations. I'm on 4.2 by the way. |
Are you familiar with the Remove Immutable tracks feature?
|
Godot version
4.0 alpha 4
System information
Windows 11
Issue description
I use animation from Mixamo. One animation clip per .glb file. Each file has same problem: left-hand fingers nodes have both, rotation and position tracks but right-hand fingers nodes have only position tracks, without rotation.
Importing animations to blender or different engines has no such issue.
Changing import options like "Optimizer", "Compression" or "Import Tracks" has no effect.
Re-exporting animations to .gltf format instead .glb has no effect too.
Steps to reproduce
Minimal reproduction project
anim.zip
The text was updated successfully, but these errors were encountered: