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

Animation Capture tracks don't work anymore #83166

Closed
Tracked by #83401
KoBeWi opened this issue Oct 11, 2023 · 13 comments · Fixed by #86715
Closed
Tracked by #83401

Animation Capture tracks don't work anymore #83166

KoBeWi opened this issue Oct 11, 2023 · 13 comments · Fixed by #86715

Comments

@KoBeWi
Copy link
Member

KoBeWi commented Oct 11, 2023

Godot version

4.2 dev6

System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 30.0.15.1403) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

Issue description

Capture tracks no longer blend the properties. The final value is reached immediately.

godot.windows.editor.dev.x86_64_9OwmmTafYp.mp4

Steps to reproduce

  1. Add AnimationPlayer
  2. Add Animation1
  3. Add Animation2 with capture track
  4. Play Animation1 then Animation2

Minimal reproduction project

bgu.tscn.txt
works correctly in dev5, but not 6

@TokageItLab
Copy link
Member

TokageItLab commented Oct 12, 2023

This issue is just come to the surface of a latent bug same as #82949. It has been limbo for a long time and requires very fundamental implementation, so I guess it will probably need a bit long time to solve it.

Related:

@Calinou
Copy link
Member

Calinou commented Nov 24, 2023

I can confirm this on 4.2.beta da0b1eb (Linux). This can be reproduced in https://github.com/godotengine/tps-demo by aiming with the right-mouse button (the camera smoothing transition is broken and snaps instantly to the final position).

This broke between 4.2.dev5 and 4.2.dev6. I bisected the regression to 1b95827.

@Calinou Calinou modified the milestones: 4.3, 4.2 Nov 24, 2023
@YuriSizov
Copy link
Contributor

YuriSizov commented Nov 24, 2023

So from what I can see, #80813 removed every bit of the implementation for the capture update mode. For the most part it used to work like continuous mode, and this is still true because many checks in code are NOT UPDATE_DISCRETE. However, AnimationPlayer used to have a dedicated branch for the capture mode in _animation_process_animation. AnimationTree had no special code.

Now there is no special code in the AnimationMixer either, so the mode basically doesn't exist.

@TokageItLab
Copy link
Member

TokageItLab commented Nov 24, 2023

As was reported a long time ago in #55110, it would be quite difficult to support it correctly at this stage, since AnimationTree cannot recognize that playback has resumed in the middle of a playback. Also I don't have any idea yet if it is possible to include such information about the start of playback in the godotengine/godot-proposals#8083 refactor.

Also, although AnimationPlayer has a playback function, I don't think there is any guarantee that it will be able to control correctly when queuing or with a fade.

So, I personally think it would be easier to control by implementing alternative functions like:

  • AnimationPlayer::play_with_capture(String p_animation, StringArray p_tracks, float p_fading_time)
  • AnimationStateMachine::play_with_capture(String p_state, StringArray p_tracks, float p_fading_time)

(it may be fine to use UPDATE_MODE_CAPTURE as a marking instead of StringArray p_tracks)

What do you think? I will write a proposal later.

@akien-mga akien-mga changed the title Capture tracks don't work anymore Animation Capture tracks don't work anymore Nov 24, 2023
@TokageItLab
Copy link
Member

I sent a proposal godotengine/godot-proposals#8513.

@golddotasksquestions
Copy link

I just want to say: Ever since I learned about Capture Mode in the AnimationPlayer, years ago, I use it a lot.
I planned on using 4.2 for a new project and not having Capture Mode, or a dynamic animation mode for the AnimationPlayer would probably make me reconsider.

@AThousandShips

This comment was marked as off-topic.

@golddotasksquestions

This comment was marked as off-topic.

@AThousandShips

This comment was marked as off-topic.

@golddotasksquestions

This comment was marked as off-topic.

@YuriSizov
Copy link
Contributor

YuriSizov commented Nov 26, 2023

I've unhidden your original comment to stop this pointless debate, but I would say that @AThousandShips is correct here. We've already identified the issue, we've established its importance and the animation team is looking for a solution (as demonstrated by the previous discussion and the linked proposal). Stating that you personally need this resolved doesn't actually help in any way at this point.

Upvoting, however, does. As it's a quick and easy way for us to notice what affects most users rather than specific users.

In any case, I don't think there is more to be said about this, so let's leave the comments to the discussion about possible solutions.

@Kalto-Mate
Copy link

Glad to know the issue is tracked. In the meantime if anyone is trying to use this system to interpolate extremely simple "animations" with very few values, like a moving or rotating platform: look into tweens. Uglier, but you should get the job done with them.

@hunterloftis
Copy link
Contributor

Given that this has been broken for several months at this point, and has probably caused many cumulative hours of frustration with Godot, it would be a good idea to:

  1. Document the current breakage so future users don't also have to wind up here after time wasted debugging, then googling. Perhaps something like Add note re: "capture" in the animation tutorial godot-docs#8764
  2. Remove "capture" from the drop-down of animation mode options

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