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

Load motions as resources and use AnimationPlayer for control #127

Open
erodozer opened this issue Feb 9, 2025 · 1 comment
Open

Load motions as resources and use AnimationPlayer for control #127

erodozer opened this issue Feb 9, 2025 · 1 comment
Labels

Comments

@erodozer
Copy link
Contributor

erodozer commented Feb 9, 2025

Proposed Enhancement:

Similar to Unity, Godot has its own Animation system and timeline support that users should be leveraging for reproducible playback of motions. Native Cubism SDK comes with its own implementation, but it has a few shortcomings. To make Live2D resources feel more natural within Godot's workflow, motion playback should be controlled using Godot's own tooling and process cycles.

By converting motion files to Godot animations through a resource importer, it is also possible to take advantage of Godot's AnimationPlayer features that aren't reproduced in the Live2D SDK.

By being able to load motions as resources, we get the benefit of

  • being able to load motions from anywhere by being in control of the loading, instead of at the mercy of the SDK's rules
  • we can reuse motions between models that share common base rigging patterns
  • enhanced control of motion playback by control through Godot's Animation APIs
  • visual examination of the animation timeline within the Godot editor
  • resource caching and improved load speeds

Once motions are managed by Godot, we should remove exposing the motion API of the SDK.

Use Case:

The Cubism SDK when loading motions can only load ones defined in the model file. I have many Live2D models that do not have their motions bound in the model definition file. These are mostly models made with the intent of use with Vtube Studio. I need these models to be usable in Godot with no modification to them. As such, I need a way to load the motions without it being tied directly to the SDK.

Another thing I've noticed is some models end up having animations in a subfolder, others just dumped directly beside the model file. A trick I've looked into is walking the model's directory for detecting additional motions. I don't know if it would be recommended to have this kind of behavior out of the box in gd_cubism, bit it's been useful for my case in creating a comprehensive AnimationLibrary.

@JekSun97
Copy link

Maybe it's worth creating a separate class for more advanced users, and leaving the old loading functions

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

No branches or pull requests

3 participants