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

Add an option to TransformTrack to select between local and global transformations #2831

Closed
TokageItLab opened this issue Jun 5, 2021 · 3 comments

Comments

@TokageItLab
Copy link
Member

TokageItLab commented Jun 5, 2021

Describe the project you are working on

3D avater game

Describe the problem or limitation you are having in your project

The current Godot does not have a retargeting system. There is a #2619 about this.

As mentioned in the above issue, a difference in rest rotation can break the animation.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

The general solution to this is to use retargeting, but if you change the rest rotation of a model, all systems that reference the rest rotation will also have to consider retargeting.

One way to solve the rest rotation difference is to describe the bone deformation in the animation as a global deformation. This is the method used by the MMD software.

This makes it possible to share animations between models that look similar but have different rest rotations without changing the rest rotation of the model. In other words, you can't share animations between T and A poses have different rest rotations, but you can share animations between T poses or between A poses have different rest rotations.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

There is small demo video
https://www.youtube.com/watch?v=TVv_D0XSxrc

If this enhancement will not be used often, can it be worked around with a few lines of script?

It is not possible to share animations between models with different rest rotations while maintaining the rest rotation of the model. It is possible to deal with this by converting animation resources every time the model is loaded, but this is not a good idea in terms of performance and maintainability.

Is there a reason why this should be core and not an add-on in the asset library?

It is necessary to change the AnimationPlayer and AnimationTree.

@Calinou
Copy link
Member

Calinou commented Jun 5, 2021

See also #1191.

@TokageItLab
Copy link
Member Author

TokageItLab commented Jun 6, 2021

@Calinou I understand what they want to do in #1191, but I think the behavior will be quite different when applied to Node3D and when applied to bones.

In #1191, what they want is similar behavior to root motion, but what I'm proposing in this issue is to deform bones without rest rotation. They can coexist, but it can be confusing.

In the first place, the current TransformTrack is not a good design, as it treats transformation of bones as a special case, causing the process to diverge, which is not a good design. And I think it's a good idea to implement SkeletonTrack separate from TransformTrack. Implementation of SkeletonTrack is preferred by @fire too.

@TokageItLab
Copy link
Member Author

It will be superseded by #3379.

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

No branches or pull requests

2 participants