-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
Importing as Animation Library still uses deprecated NodePaths in animations #60854
Comments
I looked into this and there are a couple of things at play here. First some clarifications: The FBX import pipeline was changed (#59653) in March and now looks like this: The FBX file is converted by the FBX2glTF tool and the resulting GLTF file is what actually gets imported. From Godot's perspective this is a GLTF issue, not an FBX one. I didn't check for Collada files. Also, the FBX2glTF tool is not bundled with Godot, so users need to provide their own. This means different users might use different versions of the tool. The issue with the path names does not actually seem to be related to #59980. When Godot's GLTF importer detects a skeleton in the GLTF file, a nodepath is created for every animation track. It stores the path to the skeleton as its main path and the name of the bone as its subpath. This leads to the correct "path/to/skeleton:bone" path name. If no skeleton is found in the file, it doesn't store anything in the subpath. It has been like that for 18 months at least, as far as I checked. Here is where it gets tricky: How does Godot determine if a skeleton exists in the GLTF file? There is no such thing as a "skeleton" node in the GLTF schema. Without going into too much detail (read this for a discussion: KhronosGroup/glTF-Blender-IO#822), it does so by checking whether the file contains information about skinned joints. If the "skins" array exists, Godot can build a skeleton hierarchy. If not, then it simply has no information about how to do that. How does the information about skinned joints end up in the GLTF file? The exporters / converters put it there. Which brings us to the next complication. Different exporters may create files with different content that may or may not be missing crucial information. Using Blender and the bundled GLTF exporter, this is what will happen:
So you see, whether or not files can be imported as animation libraries depends on the specific exporter / converter used to create the file, sometimes down to the release version. The FBX2glTF tool simply doesn't create a suitable GLTF file if there is no skinned mesh in the FBX file. This is an issue that should be filed there. My suggestions on how to make all this easier:
All in all, to me it seems that the specific problem reported in this issue is not something that can be fixed on Godot's end. |
This is not possible for legal reasons. fbx2gltf depends on a proprietary library (the Autodesk SDK). Since Godot is under the umbrella of the Software Freedom Conservancy, we can't bundle Godot with proprietary software. We can add a page on the website that points to the correct version of fbx2gltf to use, but that's all we can do. (That said, nothing prevents someone from creating a script or add-on that installs fbx2gltf for you, or even create a Scoop manifest that installs fbx2gltf.)
We can modify the V-Sekai fbx2gltf fork (the only one that works with the Godot integration) to report a different version number, and add version detection to the Godot editor by running a Vanilla fbx2gltf isn't maintained anymore, and it's not supported by Godot's integration since it lacks critical features and fixes. |
My bad, I didn't know they used the official Autodesk SDK. The GitHub page says that FBX2glTF was released under BSD. That's out of the question then, of course.
The version reporting would probably do the trick. I don't even know how many devs depend on FBX for their Godot pipeline. |
fbx2gltf itself is open source, but it depends on the proprietary Autodesk SDK. Therefore, fbx2gltf is "tainted" open source software so to speak. |
Filed an issue on V-Sekai/FBX2glTF here: https://github.com/V-Sekai/FBX2glTF/issues/19 |
I don't see this occurring in Alpha14. Deleted animation player, added again, loaded Dorian_V7_A9.glb as an AnimationLibrary and the animation tracks look as they should: Here's the path on a text converted animation library:
I also did a search and replace and stripped out |
This appears to work properly in rc1. I ended up clearing the bonemap and recreating it and it's currently saving the library properly and I can load it onto new models. |
@lyghtkruz GeneralSkeleton now uses "Access as Unique Name" (% icon in the Scene panel) to permit access from animation libraries as "%GeneralSkeleton". It should not be necessary to rename tracks with GeneralSkeleton. Happy to see this issue was resolved.
Given this, I will close this issue. If you have another issue related to animation library import (that isn't related to the above open FBX2glTF issue), please start a new issue so it doesn't get mixed up with previous resolved issues. (Side note: It's good to always use the latest Blender when working with .gltf or .blend import in Godot. Blender 3.4 also contains critical glTF bugfixes, and there are more major improvements to glTF scheduled for far as Blender 3.6, so keep Blender up-to-date.) |
See also: #70538 for the godot side of that FBX2glTF issue with armature-only fbx animations. |
Godot version
5636903
System information
Windows 10
Issue description
In animation tracks, as of #59980 NodePaths are now not hierarchical - for example,
NodePath("RootNode/root/pelvis")
is now justNodePath(".:pelvis")
orNodePath("RootNode/Skeleton3D:pelvis")
.When importing an external file as Animation Library, such as DAE, FBX, or GLTF, the animation data contained within them still uses the old NodePath
NodePath("bone1/bone2")
, so importing and loading animation libraries does not work.How imported animations look:

How they SHOULD look:

This affects mostly skeletal animations - regular animated nodes can still be animated with the node path, however individual bones can't be animated.
The solution should be to always use the .: syntax when dealing with animations, as its more modular and significantly easier to work with.
Steps to reproduce
Import an FBX as an Animation Library. Re-save the animation library as a .tres. Open the tres in notepad or any ASCII viewer. You will see node paths that follow the old convention of specifying exactly where in the node tree is being animated. On the other hand, animations made within godot by using the key icon use a different syntax.
Minimal reproduction project
I don't have any rigged characters that aren't copyrighted. Sorry.
The text was updated successfully, but these errors were encountered: