- Home /
Create strong animation curves: HOW?
,In any of the animation editors that influence properties, how do I create a curve of this sort:
UPDATE:::
It seems this is a significant limitation of Unity’s timelines and animation processes.
They haven’t considered how animators actually work with “bezier” to construct their desired motions. Instead, they’ve done what’s easiest in terms of mathematics, and user interface, then told the marketing department to brag about having handles in the timeline editors. Yes, technically they’re handles, but they’re much more limiting than their equivalents in all other forms of commonly used animation software. It is, to some extent, false advertising to call these handles and harken to the manner they’re expected to be used in all other software.
Here’s a similar question, suffering from the same problem/limitation:
https://answers.unity.com/questions/623318/how-to-convert-cubic-bezier-curve-into-animationcu.html
Answer by Bunny83 · Mar 18, 2018 at 02:51 AM
You can't get a 90° tangent in Unity's animation curve as it's based on the tangent angle. Even the interpolation is based on cubic bezier curves you can not specify the control points manually, just the tangent. The actual control points will be calculated from that angle based on a 1/3 interval between the keytrames. If you want to know how they are calculated see my answer over here.
As i said a completely vertical tangent isn't possible. It will result in an instant jump answer.
I you could specify the control points manually the curve wouldn't represent a mathematical function anymore as the curve could curve back in time which wouldn't make any sense. Why do you need such a steep increase? You most likely won't even notice that first part as animations are sampled in time intervals.
This is a common curve in animation editing. After Effects, 3ds $$anonymous$$ax, $$anonymous$$aya, etc all provide the ability to edit control points and their handles in this manner, as it creates a very desirable style of animation.
$$anonymous$$athematically, these are possible, as curves. And also quite common in frameworks like Core Animation and many other places where curves based on simple equations are made.
Here's an example of an online tool that generates exactly this type of curve and what's needed to use it in Core Animation: http://cubic-bezier.com/#0,.7,.05,1
Ok, maybe you did not read my answer carefully. $$anonymous$$y first sentence was:
You can't get a 90° tangent in Unity's animation curve as it's based on the tangent angle.
No matter how much you complain about that, it won't change this fact.
Yes mathematically you can create a curve like that and it would still be a vaild function if you restrict the control points in the x axis (so the x of control point one can never be lower than the starting point and the x of control point two can never be larger than the end point). However as I said Unity does not store the position of the control points but just the tangent of the angle.
This seems to be a typical case of "A, B and C do it this way so D should do it the same way". Just think about file formats. Some do not support animations at all and nobody complains. Some do not support any kind of tangents at all and just provide keyframes with are supposed to be interpolated linearly. With sufficient keyframes you can approximate any curve to any desired resolution. The same holds true for Unity's animation curves. Live with it or find a third party solution. $$anonymous$$aybe Unity provide a different way in the future. However this is very unlikely since the AnimationCurve is used in many different components and modules in Unity.
Unity are focusing on this. It's a feature point of the 2018.1 beta, that I'm using. Hence the reason I'm asking... how do I do this in Unity? It's there, somewhere, I simply can't find how to use it. Unity calls this weighted tangents. From this page: https://unity3d.com/unity/beta/unity2018.1.0b7 Animation: Added weighted tangent support to AnimationCurve. You can see it in this video: https://youtu.be/fRH$$anonymous$$B4$$anonymous$$WSFA just after the 2 $$anonymous$$ute mark.
Your answer
Follow this Question
Related Questions
Mecanim ik curve 0 Answers
The unexpected noise of animationCurve when making it with a script? 0 Answers
Animation Events and Mecanim 2 Answers