animation following “advanced animation and rendering techniques” (chapter 15+16) by agata...

39
Animation Following “Advanced Animation and Rendering Techniques” (chapter 15+16) By Agata Przybyszewska

Upload: hollie-richards

Post on 17-Dec-2015

228 views

Category:

Documents


0 download

TRANSCRIPT

AnimationFollowing

“Advanced Animation and Rendering Techniques”

(chapter 15+16)By

Agata Przybyszewska

Overview

• Keyframing– Parametrizing by

arclength– General kinematics– Rotations– Quaternion

interpolation

• Kinematics/inverse kinematics

Keyframing in 2D

• Skilled animator draws frames

• Less skilled draws inbetweens

Keyframing in 3D

• Skilled animator draws important keyframes• Computer generates in-betweens using

interpolation• Rigid body motion not enough…

Keyframing

• We can move points in 3D translation, rotation

• We can set keyframes (= parameter to interpolate):– position, – orientation,– deformation,– lights, – camera, – opacity?

Speed control

• We want a constant velocity interpolation from A to B

• Then we can control our own velocities• Interpolation methods

linear, cubic, polynomial

Keyframing?

• Arc length parametrization ->Speed curves -> control of movement

• Problem:uniform steps in parameter don’t correspond to uniform path distances

• Solution:parametrization by arclength

Overview

• Keyframing– Parametrizing by

arclength– Rotations– Quaternion

interpolation

• Kinematics/inverse kinematics

Transformations

• Every 3D transformation is a composition of– Rotation– Scaling– Translation

• We can compose transformations

• P – point of the modelP’ – point after transformation

Homogenous coordinates

• Use homogenous coordinates in graphics

• Use 4 by 4 matrix to represent: scaling, translation, rotation

Gimbal lock

• Gimbal = device used for holding a gyroscope

• Illustrates problem with interpolating Euler angles

• Gimbal lock is a basic problem with representing 3D rotations using Euler angles

Axis Angle

• Eulers rotation theorem

Any orientation can be represented by a 4-tuple

angle, vector(x,y,z)

where

angle – amount to rotate

vector – axis of rotation

We can interpolate angle and axis seperately

Overview

• Keyframing– Parametrizing by

arclength– General kinematics– Rotations– Quaternion

interpolation

• Kinematics/inverse kinematics

Overview

• Keyframing– Parametrizing by

arclength– General kinematics– Rotations– Quaternion

interpolation

• Kinematics– Articulated figures– Forward kinematics– Inverted kinematics

Kinematics

• Study of movement without regards to the forces that cause it

Kinematics

• Inbetweening– Inverse kinematics or dynamics

• Articulated figure– Structure of rigid liks connected

at joints

• Degrees of freedom (D0F)– number of independent

position variables

• End effector– End of chain of links

Overview

• Keyframing– Parametrizing by

arclength– General kinematics– Rotations– Quaternion

interpolation

• Kinematics– Articulated figures– Forward kinematics– Inverted kinematics

Articulated figures

• Suitable for humanoid figures• Want the structure of the body to

be maintained• Horrible approximation

Articulated figures

• Inbetweening– Compute joint angles between computer frames

DH notation

• Represents state of articulated structure

• Attach coordinate frame to each link

• Transformation matrix between consecutive coordinate frames

Overview

• Keyframing– Parametrizing by

arclength– General kinematics– Rotations– Quaternion

interpolation

• Kinematics– Articulated figures– Forward kinematics– Inverted kinematics

Forward kinematics

• Joint motion can be specified by spline curves

Forward kinematics

Example

• Walk cycle• Hip joint orientation

Example

• Walk cycle• Ankle joint orientation

Overview

• Keyframing– Parametrizing by

arclength– General kinematics– Rotations– Quaternion

interpolation

• Kinematics– Articulated figures– Forward kinematics– Inverse kinematics

Inverse kinematics

• What if animation knows position at the end?• Pick up object from plate, put object in place

Inverse kinematics

• End effector positions can be specified by spline curves

Inverse kinematics

• Solution for more complex structures– Find best solution (ie. Minimize energy in motion)– Non linear optimization

What makes IK hard?

• Ill conditioned near singularities– High state velocities

for low cartesian velocities

• Redundancies – Add constraints to

reduce redundancies

• Find “closest” solution:– Minimize time– Minimize energy– Natural looking motion

IK and the Jacobian•Use inverse Jacobian•Jacobian maps velocities in state space to velocities in cartesian space•Iteratively step all the joint angles toward the goal

Computing IK

• Computational problems– Singularities – change rank– Jacobian only valid for given configuration

• Non linear optimization – Nummerical programming:

Method for finding (local) minimum of function

Summary of kinematics

• Forward kinematics– Specify conditions (joint angles)– Compute positions and end-effectors

• Reverse kinematics– “Goal directed” motion– Specify goal positions of end effectors– Compute conditions required to achieve

goals

• For many tasks inverse kinematics provides easier specification, but is more computationally difficult