Me thinking loudly:
I’ve been reading again the TCB definition [1] and [2] and how the curved is described. I’ve compared it to the general Hermite curve [3] and the Bezier curves too [4].
In Synfig there are two types of curves used: TCB for waypoints and Beziers for bezier lines (base of the regions and alike layers)
TCB was used initially to avoid the need to handle a tangent to define the shape of the curve on a certain point.
Aditionally to that, there is one reason to use that TCB splines instead of any other type. An animated parameter should have only one value for each frame and only one. If it is possible to define any kind of curve from one time position to other time position it maybe possible to have two values at the same time position which is not good.
TCB uses the surrounding points to calculate the tangents of the spline at the calculation point. Controlling the T, C and B parameters ensures that the achieved tangent doesn’t produce a multivalue curve for a certain intermediate time point.
The main problem we are suffering is that we are using a value of T, C and B equal to 0 which is not good for many of the situations. So my idea is (well it is yours in fact):
Create a new type (or modify the behavior for the new created ones) of waypoint that can be called “TCB smart”. The values of TCB are not always zero but have some predefined values depending on the relative situation of the surrounding time points and its amounts.
The problem is to define the rules to calculate the TCB values based on the surrounding points.
Moreover, should the computer decide what’s the smart TCB combination by itself? Why don’t just offer to the user a subset of TCB combinations that “works fine”?
Imagine a simple animation like a ball bounce. No damping. The computer would see just a list of alternating values and wouldn’t have any reason to treat differntly the time points where the ball touch the ground than when the ball is in the higher position. (0,0) , (1,10), (2,0), (3,10), (4,0), (5,10), … Then the computer would produce similar TCB value for all the points because the relative position of the surrounding points are always the same: 10
What want the user want? NOT NEED TO CONTROL ANY TCB VALUE. Values are odd and strange. The user might want to have types of behavior:
-TCB Mountain (valley) point: Tangent on the time point must be horizontal regardless of the surrounding points.
-TCB Peak point: Tangent over the curve must be vertical regardless of the surrounding points.
-TCB Smooth landing/passing: Current behavior.
Aditionally I would leave some control for those new interpolations types offering a single value which would modify the intensity of the behavior (more or less smooth mountain, more or less quick peak, more or less smooth passing, etc.) So if the user wants a fine control can be obtained but with a easy value between 0 and 1.
-G
[1] cubic.org/docs/hermite.htm
[2] en.wikipedia.org/wiki/Kochanek%E … els_spline
[3] en.wikipedia.org/wiki/Cubic_Hermite_spline
[4] en.wikipedia.org/wiki/Bezier_curves