Describe the project you are working on
Godot
Describe the problem or limitation you are having in your project
Importing and reusing animations has always been hit or miss in Godot. Currently, animations are only imported when they come bundled in a 3D scene. It is not possible to import animations as a stand-alone mode to reuse between models.
Some improvements happened in 4.0 to improve animation compatibility, and more remain (such as re-targeting implementation), but if animations can't be imported as stand-alone, none of this really matters.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
3D scene container formats such as FBX, GLTF2 and DAE not only contain animations, but they can contain multiple animations. They are the most common and standard way to share animations nowadays and export them from 3D DCCs such as Blender, Maya, etc.
As such, I believe if we are aiming for animation reuse, we are making a mistake assuming that a 3D scene should import single animations to AnimationPlayer (and AnimationTree). Instead, animations should first be imported to an AnimationLibrary, and then this library set into the respective players.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
This proposal mainly covers some changes to how animation importing and playback happens in Godot:
- A new resource AnimationLibrary will be added. It contains Animation resources.
- AnimationPlayer should still allow for registering separate animations for simplicity (specially 2D usage), but it should also allow for adding multiple AnimationLibrary resources to source them.
- AnimationTree should still allow for pointing to an AnimationPlayer, since it needs it as root node from where animations are played, but it should also allow loading animations from an AnimationLibrary directly. The mode of operation should be something users can choose.
- The Scene importer (what imports DAE,GLTF,FBX) should be modified to also allow importing scenes as an AnimationLibrary. This final bit will allow full animaiton reuse, because AnimationLibrary resources can be added to either AnimationPlayer or AnimationTree.
On a side note, we should also consider implementing this proposal. This would allow better animation reuse, by allowing nodepaths to animations to refer skeletons directly by having a @skeleton path.
If this enhancement will not be used often, can it be worked around with a few lines of script?
N/A
Is there a reason why this should be core and not an add-on in the asset library?
N/A
Describe the project you are working on
Godot
Describe the problem or limitation you are having in your project
Importing and reusing animations has always been hit or miss in Godot. Currently, animations are only imported when they come bundled in a 3D scene. It is not possible to import animations as a stand-alone mode to reuse between models.
Some improvements happened in 4.0 to improve animation compatibility, and more remain (such as re-targeting implementation), but if animations can't be imported as stand-alone, none of this really matters.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
3D scene container formats such as FBX, GLTF2 and DAE not only contain animations, but they can contain multiple animations. They are the most common and standard way to share animations nowadays and export them from 3D DCCs such as Blender, Maya, etc.
As such, I believe if we are aiming for animation reuse, we are making a mistake assuming that a 3D scene should import single animations to AnimationPlayer (and AnimationTree). Instead, animations should first be imported to an AnimationLibrary, and then this library set into the respective players.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
This proposal mainly covers some changes to how animation importing and playback happens in Godot:
On a side note, we should also consider implementing this proposal. This would allow better animation reuse, by allowing nodepaths to animations to refer skeletons directly by having a @skeleton path.
If this enhancement will not be used often, can it be worked around with a few lines of script?
N/A
Is there a reason why this should be core and not an add-on in the asset library?
N/A