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

Remove blending features from AnimationPlayer #70241

Conversation

TokageItLab
Copy link
Member

@TokageItLab TokageItLab commented Dec 18, 2022

See also

AnimationPlayer has a blending feature, but it is difficult to make it consistent with AnimationTree's new blending algorithm. Also, there is a lot of code duplication between AnimationPlayer and AnimationTree, which reduces maintainability and stability.

By removing them, AnimationPlayer will have a simple and straightforward implementation, and advanced use cases such as blending can be handled by AnimationTree and AnimationStateMachine, which make us to be able to separate use cases clearly. And we should focus on stabilizing behevior and improving the usability of StateMachine.

I guess the code could be simplified further than this PR, but for now I will keep the changes to a minimum. We will be able to refactor it later if necessary.

If this feature is removed, it should not be a problem because there are already features that cover it as AnimationTree and AnimationStateMachine. And that is what should generally be used.

By the way, Capture Mode is not a problem here, so it will remain. No worries.

Closes #70207
Closes godotengine/godot-proposals#5952

@TokageItLab TokageItLab added this to the 4.0 milestone Dec 18, 2022
@TokageItLab TokageItLab requested review from a team as code owners December 18, 2022 03:51
@TokageItLab TokageItLab changed the title Remove blending feature from AnimationPlayer Remove blending features from AnimationPlayer Dec 18, 2022
@fire
Copy link
Member

fire commented Dec 18, 2022

I support removing the duplicated blending code. There are two sets of blending and the animation tree is the main one. So it makes sense to remove the animation player duplicate.

@reduz
Copy link
Member

reduz commented Dec 18, 2022

There is no chance on this happening, way too many users use this workflow. Once something major is there, you cause a lot of pain to users if you want to remove it. Either some code deduplication is done to reuse it between nodes or this has to be left as is.

@TokageItLab
Copy link
Member Author

TokageItLab commented Dec 18, 2022

I assume that some few users are using this, but obviously it is a territory invasion to have this feature in AnimationPlayer.

The Transform3D tracks do not blend well and the AudioTrack blending is inconsistent with AnimationTree. I tried to make the blending consistent between AnimationPlayer and AnimationTree with the duplication, but the accumulator was not working properly (perhaps this is because the blend weights exceed 1.0 and current AnimationPlayer blending rely on the same behavior as the old broken AddBlend #37661) so I gave up. Also, it requires many hacks in many places to avoid blending with ownself or with void, so I am not very inclined to keep this up.

If you are thinking of compatibility with Godot3, it is completely missing the point. Godot3 and Godot4 animations have already lost a lot of compatibility, so it is very difficult to port Godot3 animations into Godot4 even if there is a converter.

It may be possible to keep this feature as is, but no one can maintain it and it is a deprecated feature in my opinion.

@fire
Copy link
Member

fire commented Dec 18, 2022

@reduz if you wish, it can be marked deprecated for godot 4, but I am not sure we are able to restore the animation player blending workflow to 100% working. @TokageItLab's opinion is written in this discussion.

@smix8
Copy link
Contributor

smix8 commented Dec 20, 2022

I personally use the AnimationPlayer blending all the time in plenty of projects for simple stuff that does not justify using a complex AnimationTree or would add so much unnecessary complexity that comes with working with scripts and AnimationTree that it becomes a nuisance. I am fine with using an AnimationTree for more complex stuff but I would prefer if at least simple blending would stay as an option in AnimationPlayer.

@TokageItLab
Copy link
Member Author

Will be superseded by godotengine/godot-proposals#5972

@TokageItLab TokageItLab deleted the bye-bye-blending-from-animation-player branch February 14, 2024 05:26
@AThousandShips AThousandShips removed this from the 4.0 milestone Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants