Animation
Lecture 10 Slide 1 6837 Fall 2003
Conventional Animation
Draw each frame of the animation1048708bull great control1048708bull TediousReduce burden with cel animation1048708bull layer1048708bull keyframe1048708bull inbetween1048708bull celpanoramas (Disneyrsquos Pinocchio)bull
Lecture 10 Slide 2 6837 Fall 2003
Computer-Assisted Animation Keyframing 1048708
bull automate the inbetweening1048708bull good control1048708bull less tedious1048708bull creating a good animationstill requires considerable skilland talent
Procedural animation1048708bull describes the motion algorithmically1048708bull express animation as a function of small number of parameteres1048708
bull Example a clock with second minute and hour hands1048708bull hands should rotate together1048708bull express bull the clock motions in terms of a ldquosecondsrdquo variable1048708bull the clock is animated by varying the seconds parameterbull Example 2 A bouncing ball
Lecture 10 Slide 3 6837 Fall 2003
Computer-Assisted Animation
Physically Based Animation1048708bull Assign physical properties to objects (masses forces inertial properties) 1048708bull Simulate physics by solving equations Image removed due to copyright
considerationsbull Realistic but difficult to control
Motion Capture1048708bull Captures style subtle nuances and realism1048708bull You must observe someone do something
Lecture 10 Slide 4 6837 Fall 2003
Overview
HermiteSplinesKeyframingTraditional Principles
Articulated ModelsForward KinematicsInverse KinematicsOptimizationDifferential Constraints
Lecture 10 Slide 5 6837 Fall 2003
Keyframing
Describe motion of objects as a function of time from a set of key object positions In short compute the inbetween frames
Lecture 10 Slide 6 6837 Fall 2003
Interpolating Positions
Given positions
find curve
Lecture 10 Slide 7 6837 Fall 2003
Linear Interpolation
Simple problem linear interpolation between first two points
assumingThe x-coordinate for the complete curve in the figure
Lecture 10 Slide 8 6837 Fall 2003
Polynomial Interpolation
An n-degree polynomial can interpolate any n+1 points The Lagrange formula gives the n+1 coefficients of an n-degree polynomial that interpolates n+1 points The resulting interpolating polynomials are called Lagrange
polynomials On the previous slide we saw the Lagrange formula for n = 1
Lecture 10 Slide 9 6837 Fall 2003
Spline InterpolationLagrange polynomials of small degree are fine but high degree polynomials are too wiggly
How many n-degree polynomials interpolate n+1 points
Lecture 10 Slide 10 6837 Fall 2003
Spline Interpolation
bull Lagrange polynomials of small degree are fine but high degree polynomials are too wiggly
bull Spline(piecewise cubic polynomial) interpolation produces nicer interpolation
Lecture 10 Slide 11 6837 Fall 2003
Spline InterpolationA cubic polynomial between each pair of points
Four parameters (degrees of freedom) for each spline segmentNumber of parametersn+1 points rArrn cubic polynomials rArr4n degrees of freedomNumber of constraints1048708bull interpolation constraintsn+1 points rArr2 + 2 (n-1) = 2n interpolation constraintsldquoendpointsrdquo+ ldquoeach side of an internal pointrdquo1048708bull rest by requiring smooth velocity acceleration etc
Lecture 10 Slide 12 6837 Fall 2003
HermiteSplinesWe want to support general constraints not just smooth velocity and acceleration For example a bouncing
ball does not always have continuous velocity
Solution specify position AND velocity at each pointDerivation
Lecture 10 Slide 13 6837 Fall 2003
KeyframingGiven keyframes
What are parametersbull position orientation size visibility hellip
Interpolate each curve separately
Lecture 10 Slide 14 6837 Fall 2003
Interpolating Key FramesInterpolation is not fool proof The splines may undershoot
and cause interpenetration The animator must also keep an eye out for these types of side-effects
Lecture 10 Slide 15 6837 Fall 2003
Traditional Animation Principles
The in-betweening was once a job for apprentice animators We described the automatic interpolation techniques that accomplish these tasks automatically However the animator still has to draw the key frames This is an art form and precisely why the experienced animators were spared the in-betweeningwork even before automatic techniques
The classical paper on animation by John Lasseterfrom Pixarsurveys some the standard animation techniques
Principles of Traditional Animation Applied to 3D ComputerGraphicsldquo SIGGRAPH87 pp 35-44
Lecture 10 Slide 16 6837 Fall 2003
Squash and stretchbull Squash flatten an object or character by pressure or by its own powerbull Stretch used to increase the sense of speed and emphasize the squash by contrast
Lecture 10 Slide 17 6837 Fall 2003
TimingTiming affects weight1048708bull Light object move quickly1048708bull Heavier objects move slower
Timing completely changes the interpretation of the motion Because the timing is critical the animators used the draw a time scale next to the keyframe to indicate how to generate the in-between frames
Lecture 10 Slide 18 6837 Fall 2003
AnticipationAn action breaks down into1048708bull Anticipation1048708bull Action1048708bull Reaction
Anatomical motivation a muscle must extend before it can contract Prepares audience for action so they know what to expect Directs audiencersquos attention Amount of anticipation can affect perception of speed and weight
Lecture 10 Slide 19 6837 Fall 2003
Articulated ModelsArticulated models1048708bull rigid parts1048708bull connected by jointsThey can be animated by specifying the joint
angles as functions of time
Lecture 10 Slide 20 6837 Fall 2003
Forward KinematicsDescribes the positions of the body parts
as a function of the joint angles
Lecture 10 Slide 21 6837 Fall 2003
Skeleton Hierarchybull Each bone transformation described relative to the parent in the hierarchy
Derive world coordinates for an effecter with local coordinates
Lecture 10 Slide 22 6837 Fall 2003
Forward Kinematics
Transformation matrix for an effecter Vs is a
matrix composition of all joint transformation
between the effecter and the root of the hierarchy
Lecture 10 Slide 23 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Conventional Animation
Draw each frame of the animation1048708bull great control1048708bull TediousReduce burden with cel animation1048708bull layer1048708bull keyframe1048708bull inbetween1048708bull celpanoramas (Disneyrsquos Pinocchio)bull
Lecture 10 Slide 2 6837 Fall 2003
Computer-Assisted Animation Keyframing 1048708
bull automate the inbetweening1048708bull good control1048708bull less tedious1048708bull creating a good animationstill requires considerable skilland talent
Procedural animation1048708bull describes the motion algorithmically1048708bull express animation as a function of small number of parameteres1048708
bull Example a clock with second minute and hour hands1048708bull hands should rotate together1048708bull express bull the clock motions in terms of a ldquosecondsrdquo variable1048708bull the clock is animated by varying the seconds parameterbull Example 2 A bouncing ball
Lecture 10 Slide 3 6837 Fall 2003
Computer-Assisted Animation
Physically Based Animation1048708bull Assign physical properties to objects (masses forces inertial properties) 1048708bull Simulate physics by solving equations Image removed due to copyright
considerationsbull Realistic but difficult to control
Motion Capture1048708bull Captures style subtle nuances and realism1048708bull You must observe someone do something
Lecture 10 Slide 4 6837 Fall 2003
Overview
HermiteSplinesKeyframingTraditional Principles
Articulated ModelsForward KinematicsInverse KinematicsOptimizationDifferential Constraints
Lecture 10 Slide 5 6837 Fall 2003
Keyframing
Describe motion of objects as a function of time from a set of key object positions In short compute the inbetween frames
Lecture 10 Slide 6 6837 Fall 2003
Interpolating Positions
Given positions
find curve
Lecture 10 Slide 7 6837 Fall 2003
Linear Interpolation
Simple problem linear interpolation between first two points
assumingThe x-coordinate for the complete curve in the figure
Lecture 10 Slide 8 6837 Fall 2003
Polynomial Interpolation
An n-degree polynomial can interpolate any n+1 points The Lagrange formula gives the n+1 coefficients of an n-degree polynomial that interpolates n+1 points The resulting interpolating polynomials are called Lagrange
polynomials On the previous slide we saw the Lagrange formula for n = 1
Lecture 10 Slide 9 6837 Fall 2003
Spline InterpolationLagrange polynomials of small degree are fine but high degree polynomials are too wiggly
How many n-degree polynomials interpolate n+1 points
Lecture 10 Slide 10 6837 Fall 2003
Spline Interpolation
bull Lagrange polynomials of small degree are fine but high degree polynomials are too wiggly
bull Spline(piecewise cubic polynomial) interpolation produces nicer interpolation
Lecture 10 Slide 11 6837 Fall 2003
Spline InterpolationA cubic polynomial between each pair of points
Four parameters (degrees of freedom) for each spline segmentNumber of parametersn+1 points rArrn cubic polynomials rArr4n degrees of freedomNumber of constraints1048708bull interpolation constraintsn+1 points rArr2 + 2 (n-1) = 2n interpolation constraintsldquoendpointsrdquo+ ldquoeach side of an internal pointrdquo1048708bull rest by requiring smooth velocity acceleration etc
Lecture 10 Slide 12 6837 Fall 2003
HermiteSplinesWe want to support general constraints not just smooth velocity and acceleration For example a bouncing
ball does not always have continuous velocity
Solution specify position AND velocity at each pointDerivation
Lecture 10 Slide 13 6837 Fall 2003
KeyframingGiven keyframes
What are parametersbull position orientation size visibility hellip
Interpolate each curve separately
Lecture 10 Slide 14 6837 Fall 2003
Interpolating Key FramesInterpolation is not fool proof The splines may undershoot
and cause interpenetration The animator must also keep an eye out for these types of side-effects
Lecture 10 Slide 15 6837 Fall 2003
Traditional Animation Principles
The in-betweening was once a job for apprentice animators We described the automatic interpolation techniques that accomplish these tasks automatically However the animator still has to draw the key frames This is an art form and precisely why the experienced animators were spared the in-betweeningwork even before automatic techniques
The classical paper on animation by John Lasseterfrom Pixarsurveys some the standard animation techniques
Principles of Traditional Animation Applied to 3D ComputerGraphicsldquo SIGGRAPH87 pp 35-44
Lecture 10 Slide 16 6837 Fall 2003
Squash and stretchbull Squash flatten an object or character by pressure or by its own powerbull Stretch used to increase the sense of speed and emphasize the squash by contrast
Lecture 10 Slide 17 6837 Fall 2003
TimingTiming affects weight1048708bull Light object move quickly1048708bull Heavier objects move slower
Timing completely changes the interpretation of the motion Because the timing is critical the animators used the draw a time scale next to the keyframe to indicate how to generate the in-between frames
Lecture 10 Slide 18 6837 Fall 2003
AnticipationAn action breaks down into1048708bull Anticipation1048708bull Action1048708bull Reaction
Anatomical motivation a muscle must extend before it can contract Prepares audience for action so they know what to expect Directs audiencersquos attention Amount of anticipation can affect perception of speed and weight
Lecture 10 Slide 19 6837 Fall 2003
Articulated ModelsArticulated models1048708bull rigid parts1048708bull connected by jointsThey can be animated by specifying the joint
angles as functions of time
Lecture 10 Slide 20 6837 Fall 2003
Forward KinematicsDescribes the positions of the body parts
as a function of the joint angles
Lecture 10 Slide 21 6837 Fall 2003
Skeleton Hierarchybull Each bone transformation described relative to the parent in the hierarchy
Derive world coordinates for an effecter with local coordinates
Lecture 10 Slide 22 6837 Fall 2003
Forward Kinematics
Transformation matrix for an effecter Vs is a
matrix composition of all joint transformation
between the effecter and the root of the hierarchy
Lecture 10 Slide 23 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Computer-Assisted Animation Keyframing 1048708
bull automate the inbetweening1048708bull good control1048708bull less tedious1048708bull creating a good animationstill requires considerable skilland talent
Procedural animation1048708bull describes the motion algorithmically1048708bull express animation as a function of small number of parameteres1048708
bull Example a clock with second minute and hour hands1048708bull hands should rotate together1048708bull express bull the clock motions in terms of a ldquosecondsrdquo variable1048708bull the clock is animated by varying the seconds parameterbull Example 2 A bouncing ball
Lecture 10 Slide 3 6837 Fall 2003
Computer-Assisted Animation
Physically Based Animation1048708bull Assign physical properties to objects (masses forces inertial properties) 1048708bull Simulate physics by solving equations Image removed due to copyright
considerationsbull Realistic but difficult to control
Motion Capture1048708bull Captures style subtle nuances and realism1048708bull You must observe someone do something
Lecture 10 Slide 4 6837 Fall 2003
Overview
HermiteSplinesKeyframingTraditional Principles
Articulated ModelsForward KinematicsInverse KinematicsOptimizationDifferential Constraints
Lecture 10 Slide 5 6837 Fall 2003
Keyframing
Describe motion of objects as a function of time from a set of key object positions In short compute the inbetween frames
Lecture 10 Slide 6 6837 Fall 2003
Interpolating Positions
Given positions
find curve
Lecture 10 Slide 7 6837 Fall 2003
Linear Interpolation
Simple problem linear interpolation between first two points
assumingThe x-coordinate for the complete curve in the figure
Lecture 10 Slide 8 6837 Fall 2003
Polynomial Interpolation
An n-degree polynomial can interpolate any n+1 points The Lagrange formula gives the n+1 coefficients of an n-degree polynomial that interpolates n+1 points The resulting interpolating polynomials are called Lagrange
polynomials On the previous slide we saw the Lagrange formula for n = 1
Lecture 10 Slide 9 6837 Fall 2003
Spline InterpolationLagrange polynomials of small degree are fine but high degree polynomials are too wiggly
How many n-degree polynomials interpolate n+1 points
Lecture 10 Slide 10 6837 Fall 2003
Spline Interpolation
bull Lagrange polynomials of small degree are fine but high degree polynomials are too wiggly
bull Spline(piecewise cubic polynomial) interpolation produces nicer interpolation
Lecture 10 Slide 11 6837 Fall 2003
Spline InterpolationA cubic polynomial between each pair of points
Four parameters (degrees of freedom) for each spline segmentNumber of parametersn+1 points rArrn cubic polynomials rArr4n degrees of freedomNumber of constraints1048708bull interpolation constraintsn+1 points rArr2 + 2 (n-1) = 2n interpolation constraintsldquoendpointsrdquo+ ldquoeach side of an internal pointrdquo1048708bull rest by requiring smooth velocity acceleration etc
Lecture 10 Slide 12 6837 Fall 2003
HermiteSplinesWe want to support general constraints not just smooth velocity and acceleration For example a bouncing
ball does not always have continuous velocity
Solution specify position AND velocity at each pointDerivation
Lecture 10 Slide 13 6837 Fall 2003
KeyframingGiven keyframes
What are parametersbull position orientation size visibility hellip
Interpolate each curve separately
Lecture 10 Slide 14 6837 Fall 2003
Interpolating Key FramesInterpolation is not fool proof The splines may undershoot
and cause interpenetration The animator must also keep an eye out for these types of side-effects
Lecture 10 Slide 15 6837 Fall 2003
Traditional Animation Principles
The in-betweening was once a job for apprentice animators We described the automatic interpolation techniques that accomplish these tasks automatically However the animator still has to draw the key frames This is an art form and precisely why the experienced animators were spared the in-betweeningwork even before automatic techniques
The classical paper on animation by John Lasseterfrom Pixarsurveys some the standard animation techniques
Principles of Traditional Animation Applied to 3D ComputerGraphicsldquo SIGGRAPH87 pp 35-44
Lecture 10 Slide 16 6837 Fall 2003
Squash and stretchbull Squash flatten an object or character by pressure or by its own powerbull Stretch used to increase the sense of speed and emphasize the squash by contrast
Lecture 10 Slide 17 6837 Fall 2003
TimingTiming affects weight1048708bull Light object move quickly1048708bull Heavier objects move slower
Timing completely changes the interpretation of the motion Because the timing is critical the animators used the draw a time scale next to the keyframe to indicate how to generate the in-between frames
Lecture 10 Slide 18 6837 Fall 2003
AnticipationAn action breaks down into1048708bull Anticipation1048708bull Action1048708bull Reaction
Anatomical motivation a muscle must extend before it can contract Prepares audience for action so they know what to expect Directs audiencersquos attention Amount of anticipation can affect perception of speed and weight
Lecture 10 Slide 19 6837 Fall 2003
Articulated ModelsArticulated models1048708bull rigid parts1048708bull connected by jointsThey can be animated by specifying the joint
angles as functions of time
Lecture 10 Slide 20 6837 Fall 2003
Forward KinematicsDescribes the positions of the body parts
as a function of the joint angles
Lecture 10 Slide 21 6837 Fall 2003
Skeleton Hierarchybull Each bone transformation described relative to the parent in the hierarchy
Derive world coordinates for an effecter with local coordinates
Lecture 10 Slide 22 6837 Fall 2003
Forward Kinematics
Transformation matrix for an effecter Vs is a
matrix composition of all joint transformation
between the effecter and the root of the hierarchy
Lecture 10 Slide 23 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Computer-Assisted Animation
Physically Based Animation1048708bull Assign physical properties to objects (masses forces inertial properties) 1048708bull Simulate physics by solving equations Image removed due to copyright
considerationsbull Realistic but difficult to control
Motion Capture1048708bull Captures style subtle nuances and realism1048708bull You must observe someone do something
Lecture 10 Slide 4 6837 Fall 2003
Overview
HermiteSplinesKeyframingTraditional Principles
Articulated ModelsForward KinematicsInverse KinematicsOptimizationDifferential Constraints
Lecture 10 Slide 5 6837 Fall 2003
Keyframing
Describe motion of objects as a function of time from a set of key object positions In short compute the inbetween frames
Lecture 10 Slide 6 6837 Fall 2003
Interpolating Positions
Given positions
find curve
Lecture 10 Slide 7 6837 Fall 2003
Linear Interpolation
Simple problem linear interpolation between first two points
assumingThe x-coordinate for the complete curve in the figure
Lecture 10 Slide 8 6837 Fall 2003
Polynomial Interpolation
An n-degree polynomial can interpolate any n+1 points The Lagrange formula gives the n+1 coefficients of an n-degree polynomial that interpolates n+1 points The resulting interpolating polynomials are called Lagrange
polynomials On the previous slide we saw the Lagrange formula for n = 1
Lecture 10 Slide 9 6837 Fall 2003
Spline InterpolationLagrange polynomials of small degree are fine but high degree polynomials are too wiggly
How many n-degree polynomials interpolate n+1 points
Lecture 10 Slide 10 6837 Fall 2003
Spline Interpolation
bull Lagrange polynomials of small degree are fine but high degree polynomials are too wiggly
bull Spline(piecewise cubic polynomial) interpolation produces nicer interpolation
Lecture 10 Slide 11 6837 Fall 2003
Spline InterpolationA cubic polynomial between each pair of points
Four parameters (degrees of freedom) for each spline segmentNumber of parametersn+1 points rArrn cubic polynomials rArr4n degrees of freedomNumber of constraints1048708bull interpolation constraintsn+1 points rArr2 + 2 (n-1) = 2n interpolation constraintsldquoendpointsrdquo+ ldquoeach side of an internal pointrdquo1048708bull rest by requiring smooth velocity acceleration etc
Lecture 10 Slide 12 6837 Fall 2003
HermiteSplinesWe want to support general constraints not just smooth velocity and acceleration For example a bouncing
ball does not always have continuous velocity
Solution specify position AND velocity at each pointDerivation
Lecture 10 Slide 13 6837 Fall 2003
KeyframingGiven keyframes
What are parametersbull position orientation size visibility hellip
Interpolate each curve separately
Lecture 10 Slide 14 6837 Fall 2003
Interpolating Key FramesInterpolation is not fool proof The splines may undershoot
and cause interpenetration The animator must also keep an eye out for these types of side-effects
Lecture 10 Slide 15 6837 Fall 2003
Traditional Animation Principles
The in-betweening was once a job for apprentice animators We described the automatic interpolation techniques that accomplish these tasks automatically However the animator still has to draw the key frames This is an art form and precisely why the experienced animators were spared the in-betweeningwork even before automatic techniques
The classical paper on animation by John Lasseterfrom Pixarsurveys some the standard animation techniques
Principles of Traditional Animation Applied to 3D ComputerGraphicsldquo SIGGRAPH87 pp 35-44
Lecture 10 Slide 16 6837 Fall 2003
Squash and stretchbull Squash flatten an object or character by pressure or by its own powerbull Stretch used to increase the sense of speed and emphasize the squash by contrast
Lecture 10 Slide 17 6837 Fall 2003
TimingTiming affects weight1048708bull Light object move quickly1048708bull Heavier objects move slower
Timing completely changes the interpretation of the motion Because the timing is critical the animators used the draw a time scale next to the keyframe to indicate how to generate the in-between frames
Lecture 10 Slide 18 6837 Fall 2003
AnticipationAn action breaks down into1048708bull Anticipation1048708bull Action1048708bull Reaction
Anatomical motivation a muscle must extend before it can contract Prepares audience for action so they know what to expect Directs audiencersquos attention Amount of anticipation can affect perception of speed and weight
Lecture 10 Slide 19 6837 Fall 2003
Articulated ModelsArticulated models1048708bull rigid parts1048708bull connected by jointsThey can be animated by specifying the joint
angles as functions of time
Lecture 10 Slide 20 6837 Fall 2003
Forward KinematicsDescribes the positions of the body parts
as a function of the joint angles
Lecture 10 Slide 21 6837 Fall 2003
Skeleton Hierarchybull Each bone transformation described relative to the parent in the hierarchy
Derive world coordinates for an effecter with local coordinates
Lecture 10 Slide 22 6837 Fall 2003
Forward Kinematics
Transformation matrix for an effecter Vs is a
matrix composition of all joint transformation
between the effecter and the root of the hierarchy
Lecture 10 Slide 23 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Overview
HermiteSplinesKeyframingTraditional Principles
Articulated ModelsForward KinematicsInverse KinematicsOptimizationDifferential Constraints
Lecture 10 Slide 5 6837 Fall 2003
Keyframing
Describe motion of objects as a function of time from a set of key object positions In short compute the inbetween frames
Lecture 10 Slide 6 6837 Fall 2003
Interpolating Positions
Given positions
find curve
Lecture 10 Slide 7 6837 Fall 2003
Linear Interpolation
Simple problem linear interpolation between first two points
assumingThe x-coordinate for the complete curve in the figure
Lecture 10 Slide 8 6837 Fall 2003
Polynomial Interpolation
An n-degree polynomial can interpolate any n+1 points The Lagrange formula gives the n+1 coefficients of an n-degree polynomial that interpolates n+1 points The resulting interpolating polynomials are called Lagrange
polynomials On the previous slide we saw the Lagrange formula for n = 1
Lecture 10 Slide 9 6837 Fall 2003
Spline InterpolationLagrange polynomials of small degree are fine but high degree polynomials are too wiggly
How many n-degree polynomials interpolate n+1 points
Lecture 10 Slide 10 6837 Fall 2003
Spline Interpolation
bull Lagrange polynomials of small degree are fine but high degree polynomials are too wiggly
bull Spline(piecewise cubic polynomial) interpolation produces nicer interpolation
Lecture 10 Slide 11 6837 Fall 2003
Spline InterpolationA cubic polynomial between each pair of points
Four parameters (degrees of freedom) for each spline segmentNumber of parametersn+1 points rArrn cubic polynomials rArr4n degrees of freedomNumber of constraints1048708bull interpolation constraintsn+1 points rArr2 + 2 (n-1) = 2n interpolation constraintsldquoendpointsrdquo+ ldquoeach side of an internal pointrdquo1048708bull rest by requiring smooth velocity acceleration etc
Lecture 10 Slide 12 6837 Fall 2003
HermiteSplinesWe want to support general constraints not just smooth velocity and acceleration For example a bouncing
ball does not always have continuous velocity
Solution specify position AND velocity at each pointDerivation
Lecture 10 Slide 13 6837 Fall 2003
KeyframingGiven keyframes
What are parametersbull position orientation size visibility hellip
Interpolate each curve separately
Lecture 10 Slide 14 6837 Fall 2003
Interpolating Key FramesInterpolation is not fool proof The splines may undershoot
and cause interpenetration The animator must also keep an eye out for these types of side-effects
Lecture 10 Slide 15 6837 Fall 2003
Traditional Animation Principles
The in-betweening was once a job for apprentice animators We described the automatic interpolation techniques that accomplish these tasks automatically However the animator still has to draw the key frames This is an art form and precisely why the experienced animators were spared the in-betweeningwork even before automatic techniques
The classical paper on animation by John Lasseterfrom Pixarsurveys some the standard animation techniques
Principles of Traditional Animation Applied to 3D ComputerGraphicsldquo SIGGRAPH87 pp 35-44
Lecture 10 Slide 16 6837 Fall 2003
Squash and stretchbull Squash flatten an object or character by pressure or by its own powerbull Stretch used to increase the sense of speed and emphasize the squash by contrast
Lecture 10 Slide 17 6837 Fall 2003
TimingTiming affects weight1048708bull Light object move quickly1048708bull Heavier objects move slower
Timing completely changes the interpretation of the motion Because the timing is critical the animators used the draw a time scale next to the keyframe to indicate how to generate the in-between frames
Lecture 10 Slide 18 6837 Fall 2003
AnticipationAn action breaks down into1048708bull Anticipation1048708bull Action1048708bull Reaction
Anatomical motivation a muscle must extend before it can contract Prepares audience for action so they know what to expect Directs audiencersquos attention Amount of anticipation can affect perception of speed and weight
Lecture 10 Slide 19 6837 Fall 2003
Articulated ModelsArticulated models1048708bull rigid parts1048708bull connected by jointsThey can be animated by specifying the joint
angles as functions of time
Lecture 10 Slide 20 6837 Fall 2003
Forward KinematicsDescribes the positions of the body parts
as a function of the joint angles
Lecture 10 Slide 21 6837 Fall 2003
Skeleton Hierarchybull Each bone transformation described relative to the parent in the hierarchy
Derive world coordinates for an effecter with local coordinates
Lecture 10 Slide 22 6837 Fall 2003
Forward Kinematics
Transformation matrix for an effecter Vs is a
matrix composition of all joint transformation
between the effecter and the root of the hierarchy
Lecture 10 Slide 23 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Keyframing
Describe motion of objects as a function of time from a set of key object positions In short compute the inbetween frames
Lecture 10 Slide 6 6837 Fall 2003
Interpolating Positions
Given positions
find curve
Lecture 10 Slide 7 6837 Fall 2003
Linear Interpolation
Simple problem linear interpolation between first two points
assumingThe x-coordinate for the complete curve in the figure
Lecture 10 Slide 8 6837 Fall 2003
Polynomial Interpolation
An n-degree polynomial can interpolate any n+1 points The Lagrange formula gives the n+1 coefficients of an n-degree polynomial that interpolates n+1 points The resulting interpolating polynomials are called Lagrange
polynomials On the previous slide we saw the Lagrange formula for n = 1
Lecture 10 Slide 9 6837 Fall 2003
Spline InterpolationLagrange polynomials of small degree are fine but high degree polynomials are too wiggly
How many n-degree polynomials interpolate n+1 points
Lecture 10 Slide 10 6837 Fall 2003
Spline Interpolation
bull Lagrange polynomials of small degree are fine but high degree polynomials are too wiggly
bull Spline(piecewise cubic polynomial) interpolation produces nicer interpolation
Lecture 10 Slide 11 6837 Fall 2003
Spline InterpolationA cubic polynomial between each pair of points
Four parameters (degrees of freedom) for each spline segmentNumber of parametersn+1 points rArrn cubic polynomials rArr4n degrees of freedomNumber of constraints1048708bull interpolation constraintsn+1 points rArr2 + 2 (n-1) = 2n interpolation constraintsldquoendpointsrdquo+ ldquoeach side of an internal pointrdquo1048708bull rest by requiring smooth velocity acceleration etc
Lecture 10 Slide 12 6837 Fall 2003
HermiteSplinesWe want to support general constraints not just smooth velocity and acceleration For example a bouncing
ball does not always have continuous velocity
Solution specify position AND velocity at each pointDerivation
Lecture 10 Slide 13 6837 Fall 2003
KeyframingGiven keyframes
What are parametersbull position orientation size visibility hellip
Interpolate each curve separately
Lecture 10 Slide 14 6837 Fall 2003
Interpolating Key FramesInterpolation is not fool proof The splines may undershoot
and cause interpenetration The animator must also keep an eye out for these types of side-effects
Lecture 10 Slide 15 6837 Fall 2003
Traditional Animation Principles
The in-betweening was once a job for apprentice animators We described the automatic interpolation techniques that accomplish these tasks automatically However the animator still has to draw the key frames This is an art form and precisely why the experienced animators were spared the in-betweeningwork even before automatic techniques
The classical paper on animation by John Lasseterfrom Pixarsurveys some the standard animation techniques
Principles of Traditional Animation Applied to 3D ComputerGraphicsldquo SIGGRAPH87 pp 35-44
Lecture 10 Slide 16 6837 Fall 2003
Squash and stretchbull Squash flatten an object or character by pressure or by its own powerbull Stretch used to increase the sense of speed and emphasize the squash by contrast
Lecture 10 Slide 17 6837 Fall 2003
TimingTiming affects weight1048708bull Light object move quickly1048708bull Heavier objects move slower
Timing completely changes the interpretation of the motion Because the timing is critical the animators used the draw a time scale next to the keyframe to indicate how to generate the in-between frames
Lecture 10 Slide 18 6837 Fall 2003
AnticipationAn action breaks down into1048708bull Anticipation1048708bull Action1048708bull Reaction
Anatomical motivation a muscle must extend before it can contract Prepares audience for action so they know what to expect Directs audiencersquos attention Amount of anticipation can affect perception of speed and weight
Lecture 10 Slide 19 6837 Fall 2003
Articulated ModelsArticulated models1048708bull rigid parts1048708bull connected by jointsThey can be animated by specifying the joint
angles as functions of time
Lecture 10 Slide 20 6837 Fall 2003
Forward KinematicsDescribes the positions of the body parts
as a function of the joint angles
Lecture 10 Slide 21 6837 Fall 2003
Skeleton Hierarchybull Each bone transformation described relative to the parent in the hierarchy
Derive world coordinates for an effecter with local coordinates
Lecture 10 Slide 22 6837 Fall 2003
Forward Kinematics
Transformation matrix for an effecter Vs is a
matrix composition of all joint transformation
between the effecter and the root of the hierarchy
Lecture 10 Slide 23 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Interpolating Positions
Given positions
find curve
Lecture 10 Slide 7 6837 Fall 2003
Linear Interpolation
Simple problem linear interpolation between first two points
assumingThe x-coordinate for the complete curve in the figure
Lecture 10 Slide 8 6837 Fall 2003
Polynomial Interpolation
An n-degree polynomial can interpolate any n+1 points The Lagrange formula gives the n+1 coefficients of an n-degree polynomial that interpolates n+1 points The resulting interpolating polynomials are called Lagrange
polynomials On the previous slide we saw the Lagrange formula for n = 1
Lecture 10 Slide 9 6837 Fall 2003
Spline InterpolationLagrange polynomials of small degree are fine but high degree polynomials are too wiggly
How many n-degree polynomials interpolate n+1 points
Lecture 10 Slide 10 6837 Fall 2003
Spline Interpolation
bull Lagrange polynomials of small degree are fine but high degree polynomials are too wiggly
bull Spline(piecewise cubic polynomial) interpolation produces nicer interpolation
Lecture 10 Slide 11 6837 Fall 2003
Spline InterpolationA cubic polynomial between each pair of points
Four parameters (degrees of freedom) for each spline segmentNumber of parametersn+1 points rArrn cubic polynomials rArr4n degrees of freedomNumber of constraints1048708bull interpolation constraintsn+1 points rArr2 + 2 (n-1) = 2n interpolation constraintsldquoendpointsrdquo+ ldquoeach side of an internal pointrdquo1048708bull rest by requiring smooth velocity acceleration etc
Lecture 10 Slide 12 6837 Fall 2003
HermiteSplinesWe want to support general constraints not just smooth velocity and acceleration For example a bouncing
ball does not always have continuous velocity
Solution specify position AND velocity at each pointDerivation
Lecture 10 Slide 13 6837 Fall 2003
KeyframingGiven keyframes
What are parametersbull position orientation size visibility hellip
Interpolate each curve separately
Lecture 10 Slide 14 6837 Fall 2003
Interpolating Key FramesInterpolation is not fool proof The splines may undershoot
and cause interpenetration The animator must also keep an eye out for these types of side-effects
Lecture 10 Slide 15 6837 Fall 2003
Traditional Animation Principles
The in-betweening was once a job for apprentice animators We described the automatic interpolation techniques that accomplish these tasks automatically However the animator still has to draw the key frames This is an art form and precisely why the experienced animators were spared the in-betweeningwork even before automatic techniques
The classical paper on animation by John Lasseterfrom Pixarsurveys some the standard animation techniques
Principles of Traditional Animation Applied to 3D ComputerGraphicsldquo SIGGRAPH87 pp 35-44
Lecture 10 Slide 16 6837 Fall 2003
Squash and stretchbull Squash flatten an object or character by pressure or by its own powerbull Stretch used to increase the sense of speed and emphasize the squash by contrast
Lecture 10 Slide 17 6837 Fall 2003
TimingTiming affects weight1048708bull Light object move quickly1048708bull Heavier objects move slower
Timing completely changes the interpretation of the motion Because the timing is critical the animators used the draw a time scale next to the keyframe to indicate how to generate the in-between frames
Lecture 10 Slide 18 6837 Fall 2003
AnticipationAn action breaks down into1048708bull Anticipation1048708bull Action1048708bull Reaction
Anatomical motivation a muscle must extend before it can contract Prepares audience for action so they know what to expect Directs audiencersquos attention Amount of anticipation can affect perception of speed and weight
Lecture 10 Slide 19 6837 Fall 2003
Articulated ModelsArticulated models1048708bull rigid parts1048708bull connected by jointsThey can be animated by specifying the joint
angles as functions of time
Lecture 10 Slide 20 6837 Fall 2003
Forward KinematicsDescribes the positions of the body parts
as a function of the joint angles
Lecture 10 Slide 21 6837 Fall 2003
Skeleton Hierarchybull Each bone transformation described relative to the parent in the hierarchy
Derive world coordinates for an effecter with local coordinates
Lecture 10 Slide 22 6837 Fall 2003
Forward Kinematics
Transformation matrix for an effecter Vs is a
matrix composition of all joint transformation
between the effecter and the root of the hierarchy
Lecture 10 Slide 23 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Linear Interpolation
Simple problem linear interpolation between first two points
assumingThe x-coordinate for the complete curve in the figure
Lecture 10 Slide 8 6837 Fall 2003
Polynomial Interpolation
An n-degree polynomial can interpolate any n+1 points The Lagrange formula gives the n+1 coefficients of an n-degree polynomial that interpolates n+1 points The resulting interpolating polynomials are called Lagrange
polynomials On the previous slide we saw the Lagrange formula for n = 1
Lecture 10 Slide 9 6837 Fall 2003
Spline InterpolationLagrange polynomials of small degree are fine but high degree polynomials are too wiggly
How many n-degree polynomials interpolate n+1 points
Lecture 10 Slide 10 6837 Fall 2003
Spline Interpolation
bull Lagrange polynomials of small degree are fine but high degree polynomials are too wiggly
bull Spline(piecewise cubic polynomial) interpolation produces nicer interpolation
Lecture 10 Slide 11 6837 Fall 2003
Spline InterpolationA cubic polynomial between each pair of points
Four parameters (degrees of freedom) for each spline segmentNumber of parametersn+1 points rArrn cubic polynomials rArr4n degrees of freedomNumber of constraints1048708bull interpolation constraintsn+1 points rArr2 + 2 (n-1) = 2n interpolation constraintsldquoendpointsrdquo+ ldquoeach side of an internal pointrdquo1048708bull rest by requiring smooth velocity acceleration etc
Lecture 10 Slide 12 6837 Fall 2003
HermiteSplinesWe want to support general constraints not just smooth velocity and acceleration For example a bouncing
ball does not always have continuous velocity
Solution specify position AND velocity at each pointDerivation
Lecture 10 Slide 13 6837 Fall 2003
KeyframingGiven keyframes
What are parametersbull position orientation size visibility hellip
Interpolate each curve separately
Lecture 10 Slide 14 6837 Fall 2003
Interpolating Key FramesInterpolation is not fool proof The splines may undershoot
and cause interpenetration The animator must also keep an eye out for these types of side-effects
Lecture 10 Slide 15 6837 Fall 2003
Traditional Animation Principles
The in-betweening was once a job for apprentice animators We described the automatic interpolation techniques that accomplish these tasks automatically However the animator still has to draw the key frames This is an art form and precisely why the experienced animators were spared the in-betweeningwork even before automatic techniques
The classical paper on animation by John Lasseterfrom Pixarsurveys some the standard animation techniques
Principles of Traditional Animation Applied to 3D ComputerGraphicsldquo SIGGRAPH87 pp 35-44
Lecture 10 Slide 16 6837 Fall 2003
Squash and stretchbull Squash flatten an object or character by pressure or by its own powerbull Stretch used to increase the sense of speed and emphasize the squash by contrast
Lecture 10 Slide 17 6837 Fall 2003
TimingTiming affects weight1048708bull Light object move quickly1048708bull Heavier objects move slower
Timing completely changes the interpretation of the motion Because the timing is critical the animators used the draw a time scale next to the keyframe to indicate how to generate the in-between frames
Lecture 10 Slide 18 6837 Fall 2003
AnticipationAn action breaks down into1048708bull Anticipation1048708bull Action1048708bull Reaction
Anatomical motivation a muscle must extend before it can contract Prepares audience for action so they know what to expect Directs audiencersquos attention Amount of anticipation can affect perception of speed and weight
Lecture 10 Slide 19 6837 Fall 2003
Articulated ModelsArticulated models1048708bull rigid parts1048708bull connected by jointsThey can be animated by specifying the joint
angles as functions of time
Lecture 10 Slide 20 6837 Fall 2003
Forward KinematicsDescribes the positions of the body parts
as a function of the joint angles
Lecture 10 Slide 21 6837 Fall 2003
Skeleton Hierarchybull Each bone transformation described relative to the parent in the hierarchy
Derive world coordinates for an effecter with local coordinates
Lecture 10 Slide 22 6837 Fall 2003
Forward Kinematics
Transformation matrix for an effecter Vs is a
matrix composition of all joint transformation
between the effecter and the root of the hierarchy
Lecture 10 Slide 23 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Polynomial Interpolation
An n-degree polynomial can interpolate any n+1 points The Lagrange formula gives the n+1 coefficients of an n-degree polynomial that interpolates n+1 points The resulting interpolating polynomials are called Lagrange
polynomials On the previous slide we saw the Lagrange formula for n = 1
Lecture 10 Slide 9 6837 Fall 2003
Spline InterpolationLagrange polynomials of small degree are fine but high degree polynomials are too wiggly
How many n-degree polynomials interpolate n+1 points
Lecture 10 Slide 10 6837 Fall 2003
Spline Interpolation
bull Lagrange polynomials of small degree are fine but high degree polynomials are too wiggly
bull Spline(piecewise cubic polynomial) interpolation produces nicer interpolation
Lecture 10 Slide 11 6837 Fall 2003
Spline InterpolationA cubic polynomial between each pair of points
Four parameters (degrees of freedom) for each spline segmentNumber of parametersn+1 points rArrn cubic polynomials rArr4n degrees of freedomNumber of constraints1048708bull interpolation constraintsn+1 points rArr2 + 2 (n-1) = 2n interpolation constraintsldquoendpointsrdquo+ ldquoeach side of an internal pointrdquo1048708bull rest by requiring smooth velocity acceleration etc
Lecture 10 Slide 12 6837 Fall 2003
HermiteSplinesWe want to support general constraints not just smooth velocity and acceleration For example a bouncing
ball does not always have continuous velocity
Solution specify position AND velocity at each pointDerivation
Lecture 10 Slide 13 6837 Fall 2003
KeyframingGiven keyframes
What are parametersbull position orientation size visibility hellip
Interpolate each curve separately
Lecture 10 Slide 14 6837 Fall 2003
Interpolating Key FramesInterpolation is not fool proof The splines may undershoot
and cause interpenetration The animator must also keep an eye out for these types of side-effects
Lecture 10 Slide 15 6837 Fall 2003
Traditional Animation Principles
The in-betweening was once a job for apprentice animators We described the automatic interpolation techniques that accomplish these tasks automatically However the animator still has to draw the key frames This is an art form and precisely why the experienced animators were spared the in-betweeningwork even before automatic techniques
The classical paper on animation by John Lasseterfrom Pixarsurveys some the standard animation techniques
Principles of Traditional Animation Applied to 3D ComputerGraphicsldquo SIGGRAPH87 pp 35-44
Lecture 10 Slide 16 6837 Fall 2003
Squash and stretchbull Squash flatten an object or character by pressure or by its own powerbull Stretch used to increase the sense of speed and emphasize the squash by contrast
Lecture 10 Slide 17 6837 Fall 2003
TimingTiming affects weight1048708bull Light object move quickly1048708bull Heavier objects move slower
Timing completely changes the interpretation of the motion Because the timing is critical the animators used the draw a time scale next to the keyframe to indicate how to generate the in-between frames
Lecture 10 Slide 18 6837 Fall 2003
AnticipationAn action breaks down into1048708bull Anticipation1048708bull Action1048708bull Reaction
Anatomical motivation a muscle must extend before it can contract Prepares audience for action so they know what to expect Directs audiencersquos attention Amount of anticipation can affect perception of speed and weight
Lecture 10 Slide 19 6837 Fall 2003
Articulated ModelsArticulated models1048708bull rigid parts1048708bull connected by jointsThey can be animated by specifying the joint
angles as functions of time
Lecture 10 Slide 20 6837 Fall 2003
Forward KinematicsDescribes the positions of the body parts
as a function of the joint angles
Lecture 10 Slide 21 6837 Fall 2003
Skeleton Hierarchybull Each bone transformation described relative to the parent in the hierarchy
Derive world coordinates for an effecter with local coordinates
Lecture 10 Slide 22 6837 Fall 2003
Forward Kinematics
Transformation matrix for an effecter Vs is a
matrix composition of all joint transformation
between the effecter and the root of the hierarchy
Lecture 10 Slide 23 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Spline InterpolationLagrange polynomials of small degree are fine but high degree polynomials are too wiggly
How many n-degree polynomials interpolate n+1 points
Lecture 10 Slide 10 6837 Fall 2003
Spline Interpolation
bull Lagrange polynomials of small degree are fine but high degree polynomials are too wiggly
bull Spline(piecewise cubic polynomial) interpolation produces nicer interpolation
Lecture 10 Slide 11 6837 Fall 2003
Spline InterpolationA cubic polynomial between each pair of points
Four parameters (degrees of freedom) for each spline segmentNumber of parametersn+1 points rArrn cubic polynomials rArr4n degrees of freedomNumber of constraints1048708bull interpolation constraintsn+1 points rArr2 + 2 (n-1) = 2n interpolation constraintsldquoendpointsrdquo+ ldquoeach side of an internal pointrdquo1048708bull rest by requiring smooth velocity acceleration etc
Lecture 10 Slide 12 6837 Fall 2003
HermiteSplinesWe want to support general constraints not just smooth velocity and acceleration For example a bouncing
ball does not always have continuous velocity
Solution specify position AND velocity at each pointDerivation
Lecture 10 Slide 13 6837 Fall 2003
KeyframingGiven keyframes
What are parametersbull position orientation size visibility hellip
Interpolate each curve separately
Lecture 10 Slide 14 6837 Fall 2003
Interpolating Key FramesInterpolation is not fool proof The splines may undershoot
and cause interpenetration The animator must also keep an eye out for these types of side-effects
Lecture 10 Slide 15 6837 Fall 2003
Traditional Animation Principles
The in-betweening was once a job for apprentice animators We described the automatic interpolation techniques that accomplish these tasks automatically However the animator still has to draw the key frames This is an art form and precisely why the experienced animators were spared the in-betweeningwork even before automatic techniques
The classical paper on animation by John Lasseterfrom Pixarsurveys some the standard animation techniques
Principles of Traditional Animation Applied to 3D ComputerGraphicsldquo SIGGRAPH87 pp 35-44
Lecture 10 Slide 16 6837 Fall 2003
Squash and stretchbull Squash flatten an object or character by pressure or by its own powerbull Stretch used to increase the sense of speed and emphasize the squash by contrast
Lecture 10 Slide 17 6837 Fall 2003
TimingTiming affects weight1048708bull Light object move quickly1048708bull Heavier objects move slower
Timing completely changes the interpretation of the motion Because the timing is critical the animators used the draw a time scale next to the keyframe to indicate how to generate the in-between frames
Lecture 10 Slide 18 6837 Fall 2003
AnticipationAn action breaks down into1048708bull Anticipation1048708bull Action1048708bull Reaction
Anatomical motivation a muscle must extend before it can contract Prepares audience for action so they know what to expect Directs audiencersquos attention Amount of anticipation can affect perception of speed and weight
Lecture 10 Slide 19 6837 Fall 2003
Articulated ModelsArticulated models1048708bull rigid parts1048708bull connected by jointsThey can be animated by specifying the joint
angles as functions of time
Lecture 10 Slide 20 6837 Fall 2003
Forward KinematicsDescribes the positions of the body parts
as a function of the joint angles
Lecture 10 Slide 21 6837 Fall 2003
Skeleton Hierarchybull Each bone transformation described relative to the parent in the hierarchy
Derive world coordinates for an effecter with local coordinates
Lecture 10 Slide 22 6837 Fall 2003
Forward Kinematics
Transformation matrix for an effecter Vs is a
matrix composition of all joint transformation
between the effecter and the root of the hierarchy
Lecture 10 Slide 23 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Spline Interpolation
bull Lagrange polynomials of small degree are fine but high degree polynomials are too wiggly
bull Spline(piecewise cubic polynomial) interpolation produces nicer interpolation
Lecture 10 Slide 11 6837 Fall 2003
Spline InterpolationA cubic polynomial between each pair of points
Four parameters (degrees of freedom) for each spline segmentNumber of parametersn+1 points rArrn cubic polynomials rArr4n degrees of freedomNumber of constraints1048708bull interpolation constraintsn+1 points rArr2 + 2 (n-1) = 2n interpolation constraintsldquoendpointsrdquo+ ldquoeach side of an internal pointrdquo1048708bull rest by requiring smooth velocity acceleration etc
Lecture 10 Slide 12 6837 Fall 2003
HermiteSplinesWe want to support general constraints not just smooth velocity and acceleration For example a bouncing
ball does not always have continuous velocity
Solution specify position AND velocity at each pointDerivation
Lecture 10 Slide 13 6837 Fall 2003
KeyframingGiven keyframes
What are parametersbull position orientation size visibility hellip
Interpolate each curve separately
Lecture 10 Slide 14 6837 Fall 2003
Interpolating Key FramesInterpolation is not fool proof The splines may undershoot
and cause interpenetration The animator must also keep an eye out for these types of side-effects
Lecture 10 Slide 15 6837 Fall 2003
Traditional Animation Principles
The in-betweening was once a job for apprentice animators We described the automatic interpolation techniques that accomplish these tasks automatically However the animator still has to draw the key frames This is an art form and precisely why the experienced animators were spared the in-betweeningwork even before automatic techniques
The classical paper on animation by John Lasseterfrom Pixarsurveys some the standard animation techniques
Principles of Traditional Animation Applied to 3D ComputerGraphicsldquo SIGGRAPH87 pp 35-44
Lecture 10 Slide 16 6837 Fall 2003
Squash and stretchbull Squash flatten an object or character by pressure or by its own powerbull Stretch used to increase the sense of speed and emphasize the squash by contrast
Lecture 10 Slide 17 6837 Fall 2003
TimingTiming affects weight1048708bull Light object move quickly1048708bull Heavier objects move slower
Timing completely changes the interpretation of the motion Because the timing is critical the animators used the draw a time scale next to the keyframe to indicate how to generate the in-between frames
Lecture 10 Slide 18 6837 Fall 2003
AnticipationAn action breaks down into1048708bull Anticipation1048708bull Action1048708bull Reaction
Anatomical motivation a muscle must extend before it can contract Prepares audience for action so they know what to expect Directs audiencersquos attention Amount of anticipation can affect perception of speed and weight
Lecture 10 Slide 19 6837 Fall 2003
Articulated ModelsArticulated models1048708bull rigid parts1048708bull connected by jointsThey can be animated by specifying the joint
angles as functions of time
Lecture 10 Slide 20 6837 Fall 2003
Forward KinematicsDescribes the positions of the body parts
as a function of the joint angles
Lecture 10 Slide 21 6837 Fall 2003
Skeleton Hierarchybull Each bone transformation described relative to the parent in the hierarchy
Derive world coordinates for an effecter with local coordinates
Lecture 10 Slide 22 6837 Fall 2003
Forward Kinematics
Transformation matrix for an effecter Vs is a
matrix composition of all joint transformation
between the effecter and the root of the hierarchy
Lecture 10 Slide 23 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Spline InterpolationA cubic polynomial between each pair of points
Four parameters (degrees of freedom) for each spline segmentNumber of parametersn+1 points rArrn cubic polynomials rArr4n degrees of freedomNumber of constraints1048708bull interpolation constraintsn+1 points rArr2 + 2 (n-1) = 2n interpolation constraintsldquoendpointsrdquo+ ldquoeach side of an internal pointrdquo1048708bull rest by requiring smooth velocity acceleration etc
Lecture 10 Slide 12 6837 Fall 2003
HermiteSplinesWe want to support general constraints not just smooth velocity and acceleration For example a bouncing
ball does not always have continuous velocity
Solution specify position AND velocity at each pointDerivation
Lecture 10 Slide 13 6837 Fall 2003
KeyframingGiven keyframes
What are parametersbull position orientation size visibility hellip
Interpolate each curve separately
Lecture 10 Slide 14 6837 Fall 2003
Interpolating Key FramesInterpolation is not fool proof The splines may undershoot
and cause interpenetration The animator must also keep an eye out for these types of side-effects
Lecture 10 Slide 15 6837 Fall 2003
Traditional Animation Principles
The in-betweening was once a job for apprentice animators We described the automatic interpolation techniques that accomplish these tasks automatically However the animator still has to draw the key frames This is an art form and precisely why the experienced animators were spared the in-betweeningwork even before automatic techniques
The classical paper on animation by John Lasseterfrom Pixarsurveys some the standard animation techniques
Principles of Traditional Animation Applied to 3D ComputerGraphicsldquo SIGGRAPH87 pp 35-44
Lecture 10 Slide 16 6837 Fall 2003
Squash and stretchbull Squash flatten an object or character by pressure or by its own powerbull Stretch used to increase the sense of speed and emphasize the squash by contrast
Lecture 10 Slide 17 6837 Fall 2003
TimingTiming affects weight1048708bull Light object move quickly1048708bull Heavier objects move slower
Timing completely changes the interpretation of the motion Because the timing is critical the animators used the draw a time scale next to the keyframe to indicate how to generate the in-between frames
Lecture 10 Slide 18 6837 Fall 2003
AnticipationAn action breaks down into1048708bull Anticipation1048708bull Action1048708bull Reaction
Anatomical motivation a muscle must extend before it can contract Prepares audience for action so they know what to expect Directs audiencersquos attention Amount of anticipation can affect perception of speed and weight
Lecture 10 Slide 19 6837 Fall 2003
Articulated ModelsArticulated models1048708bull rigid parts1048708bull connected by jointsThey can be animated by specifying the joint
angles as functions of time
Lecture 10 Slide 20 6837 Fall 2003
Forward KinematicsDescribes the positions of the body parts
as a function of the joint angles
Lecture 10 Slide 21 6837 Fall 2003
Skeleton Hierarchybull Each bone transformation described relative to the parent in the hierarchy
Derive world coordinates for an effecter with local coordinates
Lecture 10 Slide 22 6837 Fall 2003
Forward Kinematics
Transformation matrix for an effecter Vs is a
matrix composition of all joint transformation
between the effecter and the root of the hierarchy
Lecture 10 Slide 23 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
HermiteSplinesWe want to support general constraints not just smooth velocity and acceleration For example a bouncing
ball does not always have continuous velocity
Solution specify position AND velocity at each pointDerivation
Lecture 10 Slide 13 6837 Fall 2003
KeyframingGiven keyframes
What are parametersbull position orientation size visibility hellip
Interpolate each curve separately
Lecture 10 Slide 14 6837 Fall 2003
Interpolating Key FramesInterpolation is not fool proof The splines may undershoot
and cause interpenetration The animator must also keep an eye out for these types of side-effects
Lecture 10 Slide 15 6837 Fall 2003
Traditional Animation Principles
The in-betweening was once a job for apprentice animators We described the automatic interpolation techniques that accomplish these tasks automatically However the animator still has to draw the key frames This is an art form and precisely why the experienced animators were spared the in-betweeningwork even before automatic techniques
The classical paper on animation by John Lasseterfrom Pixarsurveys some the standard animation techniques
Principles of Traditional Animation Applied to 3D ComputerGraphicsldquo SIGGRAPH87 pp 35-44
Lecture 10 Slide 16 6837 Fall 2003
Squash and stretchbull Squash flatten an object or character by pressure or by its own powerbull Stretch used to increase the sense of speed and emphasize the squash by contrast
Lecture 10 Slide 17 6837 Fall 2003
TimingTiming affects weight1048708bull Light object move quickly1048708bull Heavier objects move slower
Timing completely changes the interpretation of the motion Because the timing is critical the animators used the draw a time scale next to the keyframe to indicate how to generate the in-between frames
Lecture 10 Slide 18 6837 Fall 2003
AnticipationAn action breaks down into1048708bull Anticipation1048708bull Action1048708bull Reaction
Anatomical motivation a muscle must extend before it can contract Prepares audience for action so they know what to expect Directs audiencersquos attention Amount of anticipation can affect perception of speed and weight
Lecture 10 Slide 19 6837 Fall 2003
Articulated ModelsArticulated models1048708bull rigid parts1048708bull connected by jointsThey can be animated by specifying the joint
angles as functions of time
Lecture 10 Slide 20 6837 Fall 2003
Forward KinematicsDescribes the positions of the body parts
as a function of the joint angles
Lecture 10 Slide 21 6837 Fall 2003
Skeleton Hierarchybull Each bone transformation described relative to the parent in the hierarchy
Derive world coordinates for an effecter with local coordinates
Lecture 10 Slide 22 6837 Fall 2003
Forward Kinematics
Transformation matrix for an effecter Vs is a
matrix composition of all joint transformation
between the effecter and the root of the hierarchy
Lecture 10 Slide 23 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
KeyframingGiven keyframes
What are parametersbull position orientation size visibility hellip
Interpolate each curve separately
Lecture 10 Slide 14 6837 Fall 2003
Interpolating Key FramesInterpolation is not fool proof The splines may undershoot
and cause interpenetration The animator must also keep an eye out for these types of side-effects
Lecture 10 Slide 15 6837 Fall 2003
Traditional Animation Principles
The in-betweening was once a job for apprentice animators We described the automatic interpolation techniques that accomplish these tasks automatically However the animator still has to draw the key frames This is an art form and precisely why the experienced animators were spared the in-betweeningwork even before automatic techniques
The classical paper on animation by John Lasseterfrom Pixarsurveys some the standard animation techniques
Principles of Traditional Animation Applied to 3D ComputerGraphicsldquo SIGGRAPH87 pp 35-44
Lecture 10 Slide 16 6837 Fall 2003
Squash and stretchbull Squash flatten an object or character by pressure or by its own powerbull Stretch used to increase the sense of speed and emphasize the squash by contrast
Lecture 10 Slide 17 6837 Fall 2003
TimingTiming affects weight1048708bull Light object move quickly1048708bull Heavier objects move slower
Timing completely changes the interpretation of the motion Because the timing is critical the animators used the draw a time scale next to the keyframe to indicate how to generate the in-between frames
Lecture 10 Slide 18 6837 Fall 2003
AnticipationAn action breaks down into1048708bull Anticipation1048708bull Action1048708bull Reaction
Anatomical motivation a muscle must extend before it can contract Prepares audience for action so they know what to expect Directs audiencersquos attention Amount of anticipation can affect perception of speed and weight
Lecture 10 Slide 19 6837 Fall 2003
Articulated ModelsArticulated models1048708bull rigid parts1048708bull connected by jointsThey can be animated by specifying the joint
angles as functions of time
Lecture 10 Slide 20 6837 Fall 2003
Forward KinematicsDescribes the positions of the body parts
as a function of the joint angles
Lecture 10 Slide 21 6837 Fall 2003
Skeleton Hierarchybull Each bone transformation described relative to the parent in the hierarchy
Derive world coordinates for an effecter with local coordinates
Lecture 10 Slide 22 6837 Fall 2003
Forward Kinematics
Transformation matrix for an effecter Vs is a
matrix composition of all joint transformation
between the effecter and the root of the hierarchy
Lecture 10 Slide 23 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Interpolating Key FramesInterpolation is not fool proof The splines may undershoot
and cause interpenetration The animator must also keep an eye out for these types of side-effects
Lecture 10 Slide 15 6837 Fall 2003
Traditional Animation Principles
The in-betweening was once a job for apprentice animators We described the automatic interpolation techniques that accomplish these tasks automatically However the animator still has to draw the key frames This is an art form and precisely why the experienced animators were spared the in-betweeningwork even before automatic techniques
The classical paper on animation by John Lasseterfrom Pixarsurveys some the standard animation techniques
Principles of Traditional Animation Applied to 3D ComputerGraphicsldquo SIGGRAPH87 pp 35-44
Lecture 10 Slide 16 6837 Fall 2003
Squash and stretchbull Squash flatten an object or character by pressure or by its own powerbull Stretch used to increase the sense of speed and emphasize the squash by contrast
Lecture 10 Slide 17 6837 Fall 2003
TimingTiming affects weight1048708bull Light object move quickly1048708bull Heavier objects move slower
Timing completely changes the interpretation of the motion Because the timing is critical the animators used the draw a time scale next to the keyframe to indicate how to generate the in-between frames
Lecture 10 Slide 18 6837 Fall 2003
AnticipationAn action breaks down into1048708bull Anticipation1048708bull Action1048708bull Reaction
Anatomical motivation a muscle must extend before it can contract Prepares audience for action so they know what to expect Directs audiencersquos attention Amount of anticipation can affect perception of speed and weight
Lecture 10 Slide 19 6837 Fall 2003
Articulated ModelsArticulated models1048708bull rigid parts1048708bull connected by jointsThey can be animated by specifying the joint
angles as functions of time
Lecture 10 Slide 20 6837 Fall 2003
Forward KinematicsDescribes the positions of the body parts
as a function of the joint angles
Lecture 10 Slide 21 6837 Fall 2003
Skeleton Hierarchybull Each bone transformation described relative to the parent in the hierarchy
Derive world coordinates for an effecter with local coordinates
Lecture 10 Slide 22 6837 Fall 2003
Forward Kinematics
Transformation matrix for an effecter Vs is a
matrix composition of all joint transformation
between the effecter and the root of the hierarchy
Lecture 10 Slide 23 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Traditional Animation Principles
The in-betweening was once a job for apprentice animators We described the automatic interpolation techniques that accomplish these tasks automatically However the animator still has to draw the key frames This is an art form and precisely why the experienced animators were spared the in-betweeningwork even before automatic techniques
The classical paper on animation by John Lasseterfrom Pixarsurveys some the standard animation techniques
Principles of Traditional Animation Applied to 3D ComputerGraphicsldquo SIGGRAPH87 pp 35-44
Lecture 10 Slide 16 6837 Fall 2003
Squash and stretchbull Squash flatten an object or character by pressure or by its own powerbull Stretch used to increase the sense of speed and emphasize the squash by contrast
Lecture 10 Slide 17 6837 Fall 2003
TimingTiming affects weight1048708bull Light object move quickly1048708bull Heavier objects move slower
Timing completely changes the interpretation of the motion Because the timing is critical the animators used the draw a time scale next to the keyframe to indicate how to generate the in-between frames
Lecture 10 Slide 18 6837 Fall 2003
AnticipationAn action breaks down into1048708bull Anticipation1048708bull Action1048708bull Reaction
Anatomical motivation a muscle must extend before it can contract Prepares audience for action so they know what to expect Directs audiencersquos attention Amount of anticipation can affect perception of speed and weight
Lecture 10 Slide 19 6837 Fall 2003
Articulated ModelsArticulated models1048708bull rigid parts1048708bull connected by jointsThey can be animated by specifying the joint
angles as functions of time
Lecture 10 Slide 20 6837 Fall 2003
Forward KinematicsDescribes the positions of the body parts
as a function of the joint angles
Lecture 10 Slide 21 6837 Fall 2003
Skeleton Hierarchybull Each bone transformation described relative to the parent in the hierarchy
Derive world coordinates for an effecter with local coordinates
Lecture 10 Slide 22 6837 Fall 2003
Forward Kinematics
Transformation matrix for an effecter Vs is a
matrix composition of all joint transformation
between the effecter and the root of the hierarchy
Lecture 10 Slide 23 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Squash and stretchbull Squash flatten an object or character by pressure or by its own powerbull Stretch used to increase the sense of speed and emphasize the squash by contrast
Lecture 10 Slide 17 6837 Fall 2003
TimingTiming affects weight1048708bull Light object move quickly1048708bull Heavier objects move slower
Timing completely changes the interpretation of the motion Because the timing is critical the animators used the draw a time scale next to the keyframe to indicate how to generate the in-between frames
Lecture 10 Slide 18 6837 Fall 2003
AnticipationAn action breaks down into1048708bull Anticipation1048708bull Action1048708bull Reaction
Anatomical motivation a muscle must extend before it can contract Prepares audience for action so they know what to expect Directs audiencersquos attention Amount of anticipation can affect perception of speed and weight
Lecture 10 Slide 19 6837 Fall 2003
Articulated ModelsArticulated models1048708bull rigid parts1048708bull connected by jointsThey can be animated by specifying the joint
angles as functions of time
Lecture 10 Slide 20 6837 Fall 2003
Forward KinematicsDescribes the positions of the body parts
as a function of the joint angles
Lecture 10 Slide 21 6837 Fall 2003
Skeleton Hierarchybull Each bone transformation described relative to the parent in the hierarchy
Derive world coordinates for an effecter with local coordinates
Lecture 10 Slide 22 6837 Fall 2003
Forward Kinematics
Transformation matrix for an effecter Vs is a
matrix composition of all joint transformation
between the effecter and the root of the hierarchy
Lecture 10 Slide 23 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
TimingTiming affects weight1048708bull Light object move quickly1048708bull Heavier objects move slower
Timing completely changes the interpretation of the motion Because the timing is critical the animators used the draw a time scale next to the keyframe to indicate how to generate the in-between frames
Lecture 10 Slide 18 6837 Fall 2003
AnticipationAn action breaks down into1048708bull Anticipation1048708bull Action1048708bull Reaction
Anatomical motivation a muscle must extend before it can contract Prepares audience for action so they know what to expect Directs audiencersquos attention Amount of anticipation can affect perception of speed and weight
Lecture 10 Slide 19 6837 Fall 2003
Articulated ModelsArticulated models1048708bull rigid parts1048708bull connected by jointsThey can be animated by specifying the joint
angles as functions of time
Lecture 10 Slide 20 6837 Fall 2003
Forward KinematicsDescribes the positions of the body parts
as a function of the joint angles
Lecture 10 Slide 21 6837 Fall 2003
Skeleton Hierarchybull Each bone transformation described relative to the parent in the hierarchy
Derive world coordinates for an effecter with local coordinates
Lecture 10 Slide 22 6837 Fall 2003
Forward Kinematics
Transformation matrix for an effecter Vs is a
matrix composition of all joint transformation
between the effecter and the root of the hierarchy
Lecture 10 Slide 23 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
AnticipationAn action breaks down into1048708bull Anticipation1048708bull Action1048708bull Reaction
Anatomical motivation a muscle must extend before it can contract Prepares audience for action so they know what to expect Directs audiencersquos attention Amount of anticipation can affect perception of speed and weight
Lecture 10 Slide 19 6837 Fall 2003
Articulated ModelsArticulated models1048708bull rigid parts1048708bull connected by jointsThey can be animated by specifying the joint
angles as functions of time
Lecture 10 Slide 20 6837 Fall 2003
Forward KinematicsDescribes the positions of the body parts
as a function of the joint angles
Lecture 10 Slide 21 6837 Fall 2003
Skeleton Hierarchybull Each bone transformation described relative to the parent in the hierarchy
Derive world coordinates for an effecter with local coordinates
Lecture 10 Slide 22 6837 Fall 2003
Forward Kinematics
Transformation matrix for an effecter Vs is a
matrix composition of all joint transformation
between the effecter and the root of the hierarchy
Lecture 10 Slide 23 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Articulated ModelsArticulated models1048708bull rigid parts1048708bull connected by jointsThey can be animated by specifying the joint
angles as functions of time
Lecture 10 Slide 20 6837 Fall 2003
Forward KinematicsDescribes the positions of the body parts
as a function of the joint angles
Lecture 10 Slide 21 6837 Fall 2003
Skeleton Hierarchybull Each bone transformation described relative to the parent in the hierarchy
Derive world coordinates for an effecter with local coordinates
Lecture 10 Slide 22 6837 Fall 2003
Forward Kinematics
Transformation matrix for an effecter Vs is a
matrix composition of all joint transformation
between the effecter and the root of the hierarchy
Lecture 10 Slide 23 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Forward KinematicsDescribes the positions of the body parts
as a function of the joint angles
Lecture 10 Slide 21 6837 Fall 2003
Skeleton Hierarchybull Each bone transformation described relative to the parent in the hierarchy
Derive world coordinates for an effecter with local coordinates
Lecture 10 Slide 22 6837 Fall 2003
Forward Kinematics
Transformation matrix for an effecter Vs is a
matrix composition of all joint transformation
between the effecter and the root of the hierarchy
Lecture 10 Slide 23 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Skeleton Hierarchybull Each bone transformation described relative to the parent in the hierarchy
Derive world coordinates for an effecter with local coordinates
Lecture 10 Slide 22 6837 Fall 2003
Forward Kinematics
Transformation matrix for an effecter Vs is a
matrix composition of all joint transformation
between the effecter and the root of the hierarchy
Lecture 10 Slide 23 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Forward Kinematics
Transformation matrix for an effecter Vs is a
matrix composition of all joint transformation
between the effecter and the root of the hierarchy
Lecture 10 Slide 23 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Inverse KinematicsForward Kinematics1048708bull Given the skeleton parameters (position of the root and the joint angles) pand the position of the effecter in
local coordinates Vs what is the position of the sensor in the world coordinates Vwbull Not too hard we can solve it by evaluating
Inverse Kinematics1048708bull Given the position of the effecter in local coordinates Vs the desired position ṽ in world coordinates whatare the skeleton parameters p
bull Much harder requires solving the inverse
Lecture 10 Slide 24 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Real IK ProblemFind a ldquonaturalrdquo skeleton configuration for a given collection
of pose constraintsDefinitionA scalar objective function g(p) measures the
quality of a pose The objective g(p)reaches its minimum for the most natural skeleton configurations p
Definition A vector constraint function C(p) = 0 collects all pose constraints
Lecture 10 Slide 25 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Optimizationbull Compute the optimal parameters p that satisfy pose constraints and maximize the natural quality of skeleton
configuration
Example objective functions g(p)bull deviation from natural posebull joint stiffness1048708bull power consumption1048708bull hellip
Lecture 10 Slide 26 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Unconstrained OptimizationDefine an objective function f(p)that penalizes violation of pose
constraints
Necessary condition
Lecture 10 Slide 27 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Numerical SolutionGradient methods1048708
Lecture 10 Slide 28 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Gradient ComputationRequires computation of constraint derivatives1048708bull Compute derivatives of each transformation primitive1048708bull Apply chain rule
Example
Lecture 10 Slide 29 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Constrained OptimizationUnconstrained formulation has drawbacks1048708bull Sloppy constraints1048708bull The setting of penalty weights wimust balance the constraints and the natural quality of the pose
Necessary condition for equality constraintsbull Lagrange multiplier theorem
Interpretationsbull Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normalsto the constraints surface)1048708bull Cost gradient is orthogonal to subspace of feasible variations
Lecture 10 Slide 30 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Example
Lecture 10 Slide 31 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Nonlinear ProgrammingUse Lagrange multipliers and nonlinear programming techniques to solve the IK problem
In general slow for interactive use
Lecture 10 Slide 32 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Differential ConstraintsDifferential constraints linearizeoriginal pose constraints
Rewrite constraints by pulling the desired effecter locations to the right hand side
Construct linear approximation around the current parameter p Derive with Taylor series
Lecture 10 Slide 33 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
IK with Differential ConstraintsInteractive Inverse Kinematics1048708
bull User interface assembles desired effecter variations1048708bull Solve quadratic program with Lagrange multipliers
bull
bull Update current pose
Objective function is quadratic differential constraints are linearSome choices for matrix M1048708bull Identity minimizes parameter variations1048708bull Diagonal minimizes scaled parameter variations
Lecture 10 Slide 34 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Quadratic Program Elimination procedureApply Lagrange multiplier theorem and convert to vector notation
Rewrite to expose ∆pUse this expression to replace ∆p in the differential constraint
Solve for Lagrange multipliers andcompute ∆p
Lecture 10 Slide 35 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
Kinematics vs Dynamics
KinematicsDescribes the positions of body parts as a function of
skeleton parametersDynamicsDescribes the positions of body parts as a function of
applied forces
Lecture 10 Slide 36 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003
NextDynamics
Lecture 10 Slide 37 6837 Fall 2003