Keyframe Interpolation and Speed Control

1 / 16

# Keyframe Interpolation and Speed Control - PowerPoint PPT Presentation

Keyframe Interpolation and Speed Control. Jehee Lee Seoul National University. Controlling the Motion Along a Curve. A parametric function P(t) = (x(t), y(t), z(t)) defines a motion The parameter t is time The position at time t is given by x(t), y(t), and z(t)

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

## PowerPoint Slideshow about 'Keyframe Interpolation and Speed Control' - halil

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

### Keyframe Interpolation and Speed Control

Jehee Lee

Seoul National University

Controlling the Motion Along a Curve
• A parametric function P(t) = (x(t), y(t), z(t)) defines a motion
• The parameter t is time
• The position at time t is given by x(t), y(t), and z(t)
• This function defines both
• Spatial trajectory, and
• Speed of movement along the trajectory
• It is often very difficult for animators to design a curve that gives desired trajectory and speed simultaneously
Reparameterization
• A parametric function P(u) = (x(u), y(u), z(u)) defines a motion
• The parameter u is not actually time
• A parameter u(t) is a function of time t
• Typical process of keyframing
• First, P(u) is designed to specify the trajectory
• Reparameterization function u(t) is designed later to reflect proper speed and timing
• demo2_jingle_bells.avi
Reparameterization
• How do we determine u(t) ?
• Arc length parameterization u(s)
• Speed control s(t)
• Distance-time function
• Ease-In/Ease-Out

The length along the space curve p(u) from the point p(u1) to the point p(u2)

Arc Length Parameterization
• The length of the curve
• A cubic polynomial p(u) cannot, in general, be parameterized by arc length in a closed form
Chord Length Approximation
• Approximation by chord length
• Sample the curve at a multitude of parametric values
• Ex) u1, u2, …, un
• Estimate the arc length by computing the linear distance through the sequence of samples

u(s) is monotonically increasing with respect to s

Chord Length Approximation
• Add a new sample at the midpoint between two adjacent points p(ui) and p(ui+1) if the total length changes above given tolerance
• Repeat until there is no more point to add
Computing Arc Length Numerically
• Numerical integration
• Evenly spaced sample intervals
• Trapezoidal rule (piecewise linear)
• Unevenly spaced sample intervals
• Gaussian quadrature is commonly used
• Adaptive sampling is also possible
Computing Arc Length Numerically
• Finding u given s
• Can be formulated as a root finding problem
• Newton-Raphson iteration is commonly used
• Solution is unique if dp(u)/du is not identically zero over some interval
Speed Control
• Speed control function relates an equally spaced parametric value (e.q., time) to arc length
• Input: time t
• Output: arc length s(t)
• it is a distance-time function
• Normalized arc length
• Arc length divided by the total length
• Varies from 0 to 1
• Sometimes, the normalized arc length parameter will still be referred to simply as the arc length
Ease-In / Ease-Out
• Sine interpolation
Ease-In / Ease-Out
• Using sinusoidal pieces for acceleration and deceleration
Ease-In / Ease-Out
• Constant Acceleration
Ease-In / Ease-Out
• Constant Acceleration
• Parabolic ease-in/ease-out
General Distance-Time Functions
• The user may work directly with the distance-time curve
• Eg). Bezier, B-splines, cubic interpolating splines
Summary
• Decouple trajectory and parameterization
• Arc length parameterization
• Speed control
• Commercial animation systems provides UI for designing space curves and speed control curves separately
• Timing actually affects trajectory
• Timing is often specified by performance
• demo.wmv