-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Make cubic_interpolate()
consider key time in animation
#63602
Conversation
ca89e1f
to
f3de719
Compare
b788a81
to
a0a6cf6
Compare
272e897
to
81b79b3
Compare
0765919
to
9bccc0e
Compare
9bccc0e
to
c40f7c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous problems with non default arguments have been resolved. Approved.
We are not solving overshooting here.
c40f7c0
to
465ff3f
Compare
465ff3f
to
c962531
Compare
I would not replace the existing function to be honest, since you don't always need to use it in time and this is more costly and complex. |
Ok, I'll modify this PR later. |
74ebbfd
to
4d3e129
Compare
@reduz Changed this PR implementation to add |
4d3e129
to
75ba88d
Compare
75ba88d
to
dded7c7
Compare
Thanks! |
Fixes #60154.
In the previous implementation,
cubic_interpolate()
did not consider time, resulting in clunky transitions when the key interval was not constant. The following images show animations with the same keyframes, but the left one is the previouscubic_interpolate()
without time(velocity) consideration and the right one is this PR with time(velocity) consideration.By providing time as an argument, it allows for smoother movements. Also, based on previous implementations, the default values of the argument are -1.0, 0.0, 1.0, 2.0. The result of this argument will be the same as the previous implementation, but if there are performance concerns in Curve or Gradient classes, it may want to separate the functions.
1_5_1.mp4
1_6_1.mp4
If anyone don't want overshoot, simply adding more plots will solve the problem, but if the demand is too much, we can consider implementing makima interpolate (#57952) or adding a function to AnimationTrack that switches between the previous implementation and the new one.