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 feature Default Blend Time from AnimationPlayer #5952

Closed
TokageItLab opened this issue Dec 18, 2022 · 2 comments
Closed

Remove blending feature Default Blend Time from AnimationPlayer #5952

TokageItLab opened this issue Dec 18, 2022 · 2 comments
Labels
archived breaks compat Proposal will inevitably break compatibility topic:animation
Milestone

Comments

@TokageItLab
Copy link
Member

TokageItLab commented Dec 18, 2022

Describe the project you are working on

Stabilization for Godot animation features

Describe the problem or limitation you are having in your project

See also

image

I have tried to apply the same blending algorithm as AnimationTree to AnimationPlayer, but have encountered some problems.

First, the new AnimationTree blending algorithm has a reference value as "rest" or "reset" in case the blend value does not exist. However, for example, if you set a BlendTime of 0.5s for the AnimationPlayer and play a new animation, the animation will start from the reference value. If this BlendTime is intended for something like a crossfade, it is necessary to make a special case for the first animation or make some other method.

Another problem is that this AnimationPlayer blending has the potential to blend animation with itself. Not only is it the same animation, but it is also the same animation "cache". This causes confusion about playback position and direction. Currently, this is manifesting as a problem with the animation playback button not working correctly when spamming it with BlendTime set.

1.mp4

Moreover, AnimationPlayer blending is causing code duplication with AnimationTree (currently, the old blending algorithm remains).

For the above reasons, I propose to remove blending feature from AnimationPlayer. By the way, Capture mode is not an issue here, so it can remain.

If this functionality 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.

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

It removes duplicated code and makes the behavior more stable.

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

To begin with, Godot 3 and 4 animations are already incompatible.

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

No

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

AnimationPlayer is in the core

@TokageItLab TokageItLab added topic:animation breaks compat Proposal will inevitably break compatibility labels Dec 18, 2022
@TokageItLab TokageItLab added this to the 4.0 milestone Dec 18, 2022
@TokageItLab TokageItLab changed the title Remove blending feature from AnimationPlayer Remove blending feature (Default Blend Time) from AnimationPlayer Dec 18, 2022
@TokageItLab TokageItLab changed the title Remove blending feature (Default Blend Time) from AnimationPlayer Remove blending feature of Default Blend Time from AnimationPlayer Dec 18, 2022
@TokageItLab TokageItLab changed the title Remove blending feature of Default Blend Time from AnimationPlayer Remove blending feature Default Blend Time from AnimationPlayer Dec 18, 2022
@jitspoe
Copy link

jitspoe commented Dec 20, 2022

Not sure if I agree with this. I and others I know use animations with blends almost exclusively because setting up a whole AnimationTree is very cumbersome and awkward to use. I would actually argue that more functionality for blending (such as being able to do blend trees and such) should be brought to the animation player and accessible via code and have the tree just be a visual thing.

Edit: I understand the desire to have one system for blending for consistency, but I don't think removing a basic core feature is the way to go. I feel like if we're going to make major changes that require the use of animation trees, then the whole animation system should be overhauled to be trivial to set up and use so it's just as easy to blend basic animations as it used to be, without a bunch of weird data setup and referencing things by string name and stuff.

@TokageItLab
Copy link
Member Author

Superseded by #5972

@TokageItLab TokageItLab reopened this Dec 21, 2022
@TokageItLab TokageItLab closed this as not planned Won't fix, can't repro, duplicate, stale Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
archived breaks compat Proposal will inevitably break compatibility topic:animation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants