Jake
Jake

Reputation: 2907

Keyframe interpolation catmull rom

I understand there are many methods to do this. I am specifically interested in the catmull romfor animation purposes. I am having trouble understanding it however. All the sites I have visited have identified key poses as points. However key poses can also contain joint angles. Are these treated the same as points when interpolating? And are there any good sites for learning catmull rom?

Upvotes: 2

Views: 2784

Answers (1)

Ted
Ted

Reputation: 3260

The Catmull-Rom spline calculation is a mathematical tool used to make a smooth curve from a set of points. It is routinely used to plan the path of the camera so that the camera will smoothly transition, and won't sharply change view angles, while still allowing for the anchor points to be fairly sparse. It could definitely also be used to map the transitions of animation skeletons, or the poses, including joints and other values. The spline can be applied to any scalar value. So you could apply the spline to the positions of the joint locations in an animation sequence. You would calculate the X, Y and Z values separately. But you could also apply it to joint angles, or other scalar values that change over time. The spline will just interpolate a value along a smooth curve.

The best Catmull-Rom implementation I have found is Centripetal Implementation, where I give a detailed solution with full implementation here.

Catmull-rom curve with no cusps and no self-intersections

The principle article that helped me the most is here: http://www.cemyuksel.com/research/catmullrom_param/catmullrom.pdf

The main thing you need to understand is that this is a spline tool that takes a set of points and uses them as "anchor" points for curves that try to create a smooth path that goes through the points. The path will always go through all of your points. You have to add on two control points to either end. If you are creating a closed curve where the first and last point are the same, the points you add to the beginning is the next to last point, and the point you add to the end is the second point. If the line is open, you can repeat the first and end points, or in fact, I recommend extending the first and last segments in the same direction so that your line starts out with momentum moving in the direction of your lines. Here are some of the artifacts from the various parameterizations. Remember that the results from the "Uniform" version are the same as the unparameterized version.

Uniform Chordal Centripetal

Upvotes: 4

Related Questions