Kinematical Animation. lionel.reveret@inria.fr 2013-14



Similar documents
Computer Animation. Lecture 2. Basics of Character Animation

Metrics on SO(3) and Inverse Kinematics

Introduction to Computer Graphics Marie-Paule Cani & Estelle Duveau

Interactive Computer Graphics

3D Tranformations. CS 4620 Lecture 6. Cornell CS4620 Fall 2013 Lecture Steve Marschner (with previous instructors James/Bala)

Essential Mathematics for Computer Graphics fast

CIS 536/636 Introduction to Computer Graphics. Kansas State University. CIS 536/636 Introduction to Computer Graphics

Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. M.Sc. in Advanced Computer Science. Friday 18 th January 2008.

animation animation shape specification as a function of time

CS 4620 Practicum Programming Assignment 6 Animation

Animation (-4, -2, 0 ) + (( 2, 6, -4 ) - (-4, -2, 0 ))*.75 = (-4, -2, 0 ) + ( 6, 8, -4)*.75 = (.5, 4, -3 ).

Fundamentals of Computer Animation

animation shape specification as a function of time

CS 4204 Computer Graphics

We can display an object on a monitor screen in three different computer-model forms: Wireframe model Surface Model Solid model

Simulation of Trajectories and Comparison of Joint Variables for Robotic Manipulator Using Multibody Dynamics (MBD)

the points are called control points approximating curve

INSTRUCTOR WORKBOOK Quanser Robotics Package for Education for MATLAB /Simulink Users

Goldsmiths, University of London. Computer Animation. Goldsmiths, University of London

Motion Capture Technologies. Jessica Hodgins

3. Interpolation. Closing the Gaps of Discretization... Beyond Polynomials

Computers in Film Making

ME 115(b): Solution to Homework #1

B4 Computational Geometry

Understanding Rotations

This week. CENG 732 Computer Animation. Challenges in Human Modeling. Basic Arm Model

Graphics. Computer Animation 고려대학교 컴퓨터 그래픽스 연구실. kucg.korea.ac.kr 1

ACTUATOR DESIGN FOR ARC WELDING ROBOT

The 3D rendering pipeline (our version for this class)

Kinematics & Dynamics

Chapter. 4 Mechanism Design and Analysis

C O M P U C O M P T U T E R G R A E R G R P A H I C P S Computer Animation Guoying Zhao 1 / 66 /

Modeling Curves and Surfaces

Computer Graphics. Geometric Modeling. Page 1. Copyright Gotsman, Elber, Barequet, Karni, Sheffer Computer Science - Technion. An Example.

IMD4003 3D Computer Animation

How To Draw A 3D Virtual World In 3D Space (Computer Graphics)

CG T17 Animation L:CC, MI:ERSI. Miguel Tavares Coimbra (course designed by Verónica Orvalho, slides adapted from Steve Marschner)

CATIA V5 Tutorials. Mechanism Design & Animation. Release 18. Nader G. Zamani. University of Windsor. Jonathan M. Weaver. University of Detroit Mercy

Dynamics. Basilio Bona. DAUIN-Politecnico di Torino. Basilio Bona (DAUIN-Politecnico di Torino) Dynamics / 30

Chapter 1. Introduction. 1.1 The Challenge of Computer Generated Postures

Geometric Constraints

Today. Keyframing. Procedural Animation. Physically-Based Animation. Articulated Models. Computer Animation & Particle Systems

Dynamics of Multibody Systems: Conventional and Graph-Theoretic Approaches

On-line trajectory planning of robot manipulator s end effector in Cartesian Space using quaternions

Numerical Analysis An Introduction

CMSC 425: Lecture 13 Animation for Games: Basics Tuesday, Mar 26, 2013

Maya 2014 Basic Animation & The Graph Editor

CHAPTER 6 TEXTURE ANIMATION

Animation. Persistence of vision: Visual closure:

Lecture 7. Matthew T. Mason. Mechanics of Manipulation. Lecture 7. Representing Rotation. Kinematic representation: goals, overview

Mean value theorem, Taylors Theorem, Maxima and Minima.

Design-Simulation-Optimization Package for a Generic 6-DOF Manipulator with a Spherical Wrist

Curves and Surfaces. Goals. How do we draw surfaces? How do we specify a surface? How do we approximate a surface?

Discrete mechanics, optimal control and formation flying spacecraft

G.A. Pavliotis. Department of Mathematics. Imperial College London

Computer Animation in Future Technologies

SO(3) Camillo J. Taylor and David J. Kriegman. Yale University. Technical Report No. 9405

Content. Chapter 4 Functions Basic concepts on real functions 62. Credits 11

AN INTRODUCTION TO NUMERICAL METHODS AND ANALYSIS

Time Domain and Frequency Domain Techniques For Multi Shaker Time Waveform Replication

Dhiren Bhatia Carnegie Mellon University

Computer Animation. Computer Animation. Principles of Traditional Animation. Outline. Principles of Traditional Animation

Kinematics and Dynamics of Mechatronic Systems. Wojciech Lisowski. 1 An Introduction

Kinematics of Robots. Alba Perez Gracia

Fundamentals of Computer Animation

November 16, Interpolation, Extrapolation & Polynomial Approximation

Finite Element Formulation for Plates - Handout 3 -

Intelligent Submersible Manipulator-Robot, Design, Modeling, Simulation and Motion Optimization for Maritime Robotic Research

Least-Squares Intersection of Lines

Constraint satisfaction and global optimization in robotics

Computer Games. CSCI-GA Spring Hubertus Franke. ( frankeh@cims.nyu.edu )

Prentice Hall Mathematics: Algebra Correlated to: Utah Core Curriculum for Math, Intermediate Algebra (Secondary)

Linear Threshold Units

Blender 3D Animation

GAME ENGINE DESIGN. A Practical Approach to Real-Time Computer Graphics. ahhb. DAVID H. EBERLY Geometrie Tools, Inc.

Rigid body dynamics using Euler s equations, Runge-Kutta and quaternions.

Physics 235 Chapter 1. Chapter 1 Matrices, Vectors, and Vector Calculus

Quaternion Algebra and Calculus

Finite Element Method (ENGC 6321) Syllabus. Second Semester

Constrained curve and surface fitting

Power Electronics. Prof. K. Gopakumar. Centre for Electronics Design and Technology. Indian Institute of Science, Bangalore.

Algebra 1 Course Title

(Refer Slide Time: 1:42)

INTRODUCTION. Robotics is a relatively young field of modern technology that crosses traditional

Computing Euler angles from a rotation matrix

Using Autodesk HumanIK Middleware to Enhance Character Animation for Games

Geometric algebra rotors for skinned character animation blending

Finite Element Formulation for Beams - Handout 2 -

Scooter, 3 wheeled cobot North Western University. PERCRO Exoskeleton

Logistic Regression (1/24/13)

Path Tracking for a Miniature Robot

Computer Animation. CS 445/645 Fall 2001

Precalculus REVERSE CORRELATION. Content Expectations for. Precalculus. Michigan CONTENT EXPECTATIONS FOR PRECALCULUS CHAPTER/LESSON TITLES

BookTOC.txt. 1. Functions, Graphs, and Models. Algebra Toolbox. Sets. The Real Numbers. Inequalities and Intervals on the Real Number Line

Advanced Computer Graphics (2IV40) ~ 3D Transformations. Types (geometric) Types (algebraic) 3D Transformations. y + c 1. x = a 1.

Transcription:

Kinematical Animation 2013-14

3D animation in CG Goal : capture visual attention Motion of characters Believable Expressive Realism? Controllability Limits of purely physical simulation : - little interactivity - high complexity for expressive characters

animation in 3D CG Two heritages Cartoons How to represent motion on a 2D visualization Robotics Mathematics foundation of 3D motion

Heritage from cartoon Sampled motion, film framework (24 images per second) Animation workflow from photographs (Muybridge, Marey)

Early Mathematics of motion Etienne-Jules Marey (1830-1904) physiologist inventor of chronophotography (1882) cinematography invented in 1895 (L. Lumière) The graphical method : one motion can be represented by a curve

Heritage from robotics Chain of rigid articulations + Forward kinematics + Inverse-Kinematics algorithm + Motion planning Animation skeleton : appropriate degrees of freedom for expressivity

3D animation : interpolation+skeleton Keyframes and tangents

Interpolation Interpolation of a 1D-scalar value One function p(u) with unknown parameters, Typically cubic polynomial: p(u)=σ n=0..3 a n u n known constrains on points { u i, (d n p/du)(u i )= b i } 4 are enough for exact cubic polynomial Direct solving for a n p(u) is thus known for every u

Interpolation Practical case : Hermit polynomial (spline) C 1 continuity between sets of 2 points 2 positions and tangents at these positions p(u) = [ a 0 a 1 a 2 a 3 ] [ 1 u u 2 u 3 ] t = A t Q(u) p(0) = A t Q(0) = b 0 p (0) = A t Q (0) = b 1 p(1) = A t Q(1) = b 2 p (1) = A t Q (1) = b 3 A t [ Q(0) Q (0) Q(1) Q (1) ] = [ b 0 b 1 b 2 b 3 ] t A t Q 4x4 = B t => A t = B t Q -1 p(u) = B t Q -1 Q(u) p( u=(t-t0)/(t-t1) )

Interpolation Interpolating 3D rotation Canonic representation : SO(3) matrix but M 0,M 1 SO(3) > (1-α)M 0 +αm 1 SO(3) Represent SO(3) matrix with Euler angles any rotation in R 3 can be represented by 3 angles M = R x,ψ R y,θ R z,ф = Multiplication order matters! Local transformation Rzyx : yaw, pitch and roll can be R z,ψ R y,θ R z,φ => Animation by interpolating angles

Interpolating 3D rotation Limitations of Euler angles Non-uniqueness of position and path [θ x,θ y,θ z ]=[0,0,0] [θ x,θ y,θ z ]=[0,0,0] [θ x,θ y,θ z ]=[π,0,0] 1 0 0 M = 0-1 0 0 0-1 [θ x,θ y,θ z ]=[0,π,π] 1 0 0 M = 0-1 0 0 0-1

Interpolating 3D rotation Limitations of Euler angles Gimbal lock θx, [θ x,θ y,θ z ]=[0,0,0] [θ x,θ y,θ z ]=[0,π/4,0] [θ x,θ y,θ z ]=[0,π/2,0] 1 degree of freedom is lost : change in θ x change in θ z

3D rotation Axis-angle any rotation in R 3 is a planar rotation around an axis strong link with quaternion n v = R θ,n v = cosθ v + sinθ n v + (1- cosθ)(v n) n R θ,n = cosθ I + sinθ [n] + (1- cosθ)nn t v o θ v [n] = 0 -n z n y n z 0 -n x -n y n x 0 Rodrigues formula R θ,n = exp( [θn] x ) = I + Σ k=1 [θn] x k /k!

Quaternion H: Extension of standard complex q = [ s, x, y, z ] = s +ix + jy + kz = [ s, n ] with i 2 =j 2 =k 2 =ijk=-1 q.q = [ ss n.n, s n + s n + n x n ] q* = [s, -x, -y, -z ] q 2 = q. q* = s 2 + x 2 + y 2 + z 2 q -1 = q*/ q 2 q =1 q = [ cosθ, (sinθ)n ] H 1 with n R 3 and n =1 Any rotation in R 3 can be represented in H 1 x R 3, x = R θ,n x [0,x ] = q[0,x]q -1 with q = [ cos(θ/2), sin(θ/2)n ]

Interpolating 3D rotation Quaternion Linear interpolation in H does not work well q(t) = (1-t).q 0 + t.q 1 Angular velocity is not constant q 0 q 1 Spherical linear interpolation is fine (SLERP) q 0 q 1

Interpolating 3D rotation Log and exp in H 1 q = [ cosθ, (sinθ)n ] = exp([0,θn]) log(q) = [0,θn] q t = exp(t.log(q)) dq t /dt = logq q t dq t /dt = logq = [0,θn] = θ Application to SLERP (q i : unit quaternion, p i : geometrical point on sphere) SLERP(q0,q1,t) = (q 1 q 0-1 ) t q 0 SLERP(p0,p1,t) = (sin[(1-t)ω]p 0 + sin[ωt]p 1 )/sinω with cosω = p 0 p 1

Two fundamental cases Unconstrained motion waving arms, nodding head, etc => Forward Kinematics (FK) Constrained motion grasping an object, walking on the ground, etc => Inverse Kinematics (IK)

Forward Kinematics Direct application of 3D framework

Inverse Kinematics Articulated object Translational and rotational links Goal to reach M

Inverse Kinematics input : goal to reach (M) model parameter : Θ = ( θ 1, θ 2,, t 1, t 2, ), model parameters f(θ) position of kinematic chain end Find Θ /M=f(Θ ) 2 or 3 rotations: direct computation in R 2 or R 3 N articulations :?

Difficulties Two solutions : Range of solutions : No solutions :

f : direct kinematics Concatenation of matrix transforms f (Θ)= R 1 (θ 1 )T 1 (t 1 )R 2 (θ 2 ) T 2 (t 2 ) M 0 M 0 : position in rest pose (no rotations) Non linearity because of rotations

Zero of non-linear function Find Θ / f(θ)-m = 0 Linearization : given a current Θ and error E = f(θ)-m find h / E = f(θ+h) - f(θ) = f (Θ)h => h = f (Θ) -1 E => Θ := Θ + h iterate

Linearization Taylor series : Multivariate case : J Jacobian of f, linear form in h H Hessian of f, quadratic form in h

Jacobian Matrix of derivatives of several functions with severable variables : J:3xN matrix => not squared Use Pseudo-inverse for inversion : J + = J t (JJ t ) -1 if N>3 or J + = (J t J) -1 J t if N<3

Algorithm inversekinematics() { start with current Θ; E := target - computeendpoint(); for(k=0; k<k max && E > eps; k++){ J := computejacobian(); solve J h = E; Θ := Θ + h; E := target - computeendpoint(); } }

Joint limits Joint may have limits of variation For example realistic elbow is limited To enforce limits : test for limitation violation cancel parameter if violation in practice, remove column in J compute new J and J + compute new h

Adding constrains 1. if KerJ 0, degrees of freedom left to enforce a new constrains Ω JΩ = 0 2. if Θ solves JΘ = E, thus Θ+Ω is also solution J(Θ+Ω) = JΘ +JΩ = E + 0 = E 3. if general constrain C, need to project on KerJ: C p = (J + J I ) C check: J C p = J ( J + J I ) C = ( J J ) C = 0

Example: preferred angle Value : Θ pref Constraint C : C i = Θ i -Θ pref Modified algorithm : use h = J + E + (J + J-I)C => preserve convergence

Inverse Kinematics Other methods use J t instead of J + theory of infinitesimal works h = J t E use several 1D optimization Cyclic Coordinate Descent => faster but less accurate

Inverse Kinematics A good source: http://billbaxter.com/courses/290/html/