Upload
blaise-oliver
View
227
Download
0
Embed Size (px)
DESCRIPTION
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.avidemo2_jingle_bells.avi
Citation preview
Keyframe Interpolation and Speed Control
Jehee LeeSeoul 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 r
eflect 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
))(),(( 1212 susuLENGTHsss
The length along the space curve p(u) from the point p(u1) to the point p(u2)
)))((()( tsuPtP
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
udududz
ududy
ududx
udududp
uuLENGTHs
u
u
u
u
~~)~(
~)~(
~)~(
~~)~(
),(
0
0
222
0
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
3u
2u
1u
)(su
s0d 10 dd 210 ddd
)( 0up
)( 1up
)( 2up
)()( 010 upupd
1d
)( 3up
2d
u(s) is monotonically increasing with respect to s
Chord Length Approximation
• Adaptive sampling– 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
)( 0up
)( 1up
)( 2up
)()( 010 upupd
1d
)( 3up
2d
Computing Arc Length Numerically
• Numerical integration
– Evenly spaced sample intervals• Trapezoidal rule (piecewise linear)• Simson’s rule (piecewise quadratic)
– Unevenly spaced sample intervals• Gaussian quadrature is commonly used• Adaptive sampling is also possible
udududz
ududy
ududx
uuLENGTHsu
u
~~)~(
~)~(
~)~(
),(
0
222
0
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
0),()( 0 uuLENGTHsuf
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 s
till be referred to simply as the arc length
Ease-In / Ease-Out
• Sine interpolation
21)2/sin()()(
tteasets
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, cubi
c 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