From the interpolation I can see that they are bezier curves of some sort, but there seem to be 3 values from input, output, in_tangent and out_tangent. What does input, ouput, in_tangent and out_tangent even mean and how do they correspond to a bezier curve?
From another thread, I’m guessing that I’m getting 2 points and 2 tangents. Are the 3 values for input P1? and the 3 values for output P2? Are in_tangent and out_tangent tangent vectors, that I can use to make p3 and p4? Do these values go into a cubic bezier curve equation?
I’m assuming i get three values for this animation, but how does that relate to the angle used in the y-axis rotation for the l_hip like the channel says?
since this is a BEZIER (cubic) interpolation, you need to find the 4 control points.
You have 3 keys, which gives you 2 segments
Regardless of the interpolation (STEP, LINEAR, BEZIER …), the first and last points for the segment i are given by:
for BEZIER you need P1 and P2, which are given by IN_TANGENT (P1) and OUT_TANGENT (P2)
Since the tangents are 1D (if they were 2D you would have 2 <param> in the <source>) the key value is not provided in the document, but are assumed to be equidistant from the first and last point.
So in theory we should have:
Note that IN_TANGENT and OUT_TANGENT[n-1] are never used
That’s for the theory, but those values do not make a lot of sense. This is an area of the specification that we have left too open, so it seems the implementations are doing their own thing… definitely something we need to fix ASAP !
In the mean time it would be nice to know what those IN and OUT values are in that file.
There’s so much confusion about how animation curves are supposed to work now. The description given by Remi above matches the curve style of the DCC packages (tangents have time values) but seems contrary to what’s described in the Collada book, and it doesn’t mention that time is no longer the independent parameter and you need to solve a cubic equation to find the new independent parameter value that satisfies a given t, and then evaluate the curve using that value to get the final output.
I understand the desire for the curves that match what the DCC tools are doing, so there should be several options available. The description of the DCC-style curves should fully explain that the inputs are no longer the independent parameters of the parametric curve, and the necessity to solve a cubic equation at each step in order to interpolate properly with a given input value.
Another thing that would be nice is if the Bezier curves stored four control points instead of two control points and two tangents, since it’s conventional to describe Bezier curves that way. Hermite curves should still be two points and two tangents.
A key point I’d like to make is that the animation curves that the DCC tools use, which dsrbecky and I discussed in this thread, are fundamentally different from traditional piecewise cubic Bezier/Hermite curves and need to be interpolated differently. It’s really not as simple as specifying time values for tangents and being done with it.
For the original poster, in the thread I linked to above you can find a pretty clear description of the interpolation math in the second and third posts of the thread. I believe you can use that math to get the correct results from the <animation> element you gave above.