8 Sept 2022
Keyframe
Often in computer animation, an artist creates keyframes which is the state (position, rotation, scale, etc.) at a discrete time step.
Then, an algorithm takes these keyframes and interpolates between them to accomplish a (typically) smooth transition between the keyframes .
Almost anything can be keyframed.
Keyframing: Position and Orientation over Time
An artist may provide positions at timesteps and and we generate a curve between them to get the position at any time between and
Keyframing: Joint Angles
We can model an arm and its movement using joint angles and
Then, we can define to describe how the angles change with respect to time.
This then leaves us with the question of how we would interpolate between keyframes?
There are a few ways to express a curve:
| Type | Form | Example for Circle |
|---|---|---|
| Explicit | ||
| Implicit | ||
| Parametric |
Cubic Bézier Curve
Specify 4 "control" points, then the cubic Bézier can be given in parametric form by
Alternatively in vector notation:
And in matrix form:
There different classes of curve continuity
They can be visualised with the following illustration
and are families of curves where the th derivative matches, but for animation or is good enough in most cases.
Catmull-Rom Spline
The Catmull-Rom spline is a curve, but it is not . Specifically, not at its control points
The basis for the Catmull-Rom spline can be given by
Connecting Sequence of Control Points
Connecting a sequence of 3D/2D points can be done using a Catmull-Rom spline.
Then, the curve can be computed using
where is the number of control points.