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

Capture mode interpolation is not affected by interpolation type #94828

Open
MysteriousDeve opened this issue Jul 27, 2024 · 6 comments
Open

Comments

@MysteriousDeve
Copy link

Tested versions

Reproducible in v4.3.rc1.mono.official [e343dbb]

System information

Godot v4.3.rc1.mono - Windows 10.0.16299 - Vulkan (Forward+) - dedicated NVIDIA GeForce GT 1030 (NVIDIA; 30.0.14.7196) - Intel(R) Core(TM) i3-10105F CPU @ 3.70GHz (8 Threads)

Issue description

Some of the easing options for Capture track ("Auto Capture Transition Type" in the editor for AnimationPlayer) is not working correctly. For example, "Cubic" option make the animation blend elastically instead of gradually. Some other easing type have issue as well, but "Linear" seems to not be affected.

2024-07-27.16-53-32.mp4

Steps to reproduce

  • Create a project
  • Create a 3D scene
  • Add a MeshInstance3D
  • Add a BoxMesh to MeshInstance3D (or anything that makes the object visible in runtime)
  • Add a Camera and move them back 2 unit so that it faces the MeshInstance3D
  • Add an AnimationPlayer node and create an Animation
  • Set "Auto Capture Transition Type" to Cubic
  • Set Animation duration to 1 seconds
  • Add an Property track, select MeshInstance3D --> Node3D/position
  • Set property Update Mode to "Capture"
  • Move/Set MeshInstance3D position to (2, 0, 0)
  • Add a keyframe of MeshInstance3D at 1 seconds
  • Move/Set MeshInstance3D position back to (0, 0, 0)
  • Create a script for the root node to run the animation in AnimationPlayer in ready()
  • Run current scene (F6)
  • If success, the cube will more to the right with elastic movement (instead of gradual movement)

Minimal reproduction project (MRP)

auto-capture-reproduce-copy.zip

@akien-mga
Copy link
Member

Does it work in 4.2.2.stable? Mainly trying to assess whether this a regression report or "just" a bug.

@MysteriousDeve
Copy link
Author

MysteriousDeve commented Jul 28, 2024

4.2.2.stable doesn't have such feature. I think this is a new implementation, since the old code for this has been removed when implementing AnimationMixer, as mentioned in #83166.
image

@TokageItLab
Copy link
Member

I was asked the same question by @Calinou earlier, but CaptureMode is no longer affected by InterpolationType, so you need to use a tween instead.

@TokageItLab TokageItLab changed the title "Auto Capture Transition Type" enum in AnimationPlayer-Playback Option not working correctly Capture mode interpolation is not affected by interpolation type Jul 28, 2024
@MysteriousDeve
Copy link
Author

I was asked the same question by @Calinou earlier, but CaptureMode is no longer affected by InterpolationType, so you need to use a tween instead.

Could you clarify it further? Seem that the CaptureMode is affected by TransitionType, but the curves are just wrongly labelled.
Another thing I've just found is that the bug I mentioned seems to only affect the Auto Capture properties of the AnimationPlayer, and if the Capture is used manually (via play_with_capture()), then the problem no longer exists.

@MysteriousDeve
Copy link
Author

By the way, not only the transition type, but ease type is also messed up: Ease Out actually makes the animation ease in, and vice versa.
This was present in both Auto Capture and manual calling, should I make a seperate issue for this?

@TokageItLab
Copy link
Member

TokageItLab commented Jul 28, 2024

Since it interpolates from the Captured frame to the Animation, EaseOut indicates EaseIn to the Animation (In other words, it means that the captured frame is EaseOut), so there should be no problem. Also, I don't know what is wrong with the curves, as they are working correctly.

The two breaking compatibility changes for capture mode I remember from 4.1 are that it is no longer possible to interpolate at different times for each track; Auto Capture will interpolate between the first non-zero key and the first key when the duration is -1. If there are multiple Capture tracks, the shortest interval is used. And the rest is InterpolationType is no longer affected as I mentioned above.

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

4 participants