Articulated Characters

Similar documents
This week. CENG 732 Computer Animation. Warping an Object. Warping an Object. 2D Grid Deformation. Warping an Object.

Kinematics. CS 448D: Character Animation Prof. Vladlen Koltun Stanford University

Animations. Hakan Bilen University of Edinburgh. Computer Graphics Fall Some slides are courtesy of Steve Marschner and Kavita Bala

SM2231 :: 3D Animation I :: Basic. Rigging

CS 775: Advanced Computer Graphics. Lecture 3 : Kinematics

CS-184: Computer Graphics. Today. Forward kinematics Inverse kinematics. Wednesday, November 12, Pin joints Ball joints Prismatic joints

Inverse Kinematics (part 1) CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2018

Rigging / Skinning. based on Taku Komura, Jehee Lee and Charles B.Own's slides

Kinematics and Orientations

animation projects in digital art animation 2009 fabio pellacini 1

Computer Animation Fundamentals. Animation Methods Keyframing Interpolation Kinematics Inverse Kinematics

Inverse Kinematics Programming Assignment

Inverse Kinematics. Given a desired position (p) & orientation (R) of the end-effector

Transformation. Jane Li Assistant Professor Mechanical Engineering & Robotics Engineering

KINEMATICS FOR ANIMATION. Rémi Ronfard, Animation, M2R MOSIG

02/22/02. Assignment 1 on the web page: Announcements. Test login procedure NOW!

Robotics kinematics and Dynamics

4 Kinematic Linkages. Chapter 4. Kinematic Linkages. Department of Computer Science and Engineering 4-1

CS 231. Inverse Kinematics Intro to Motion Capture. 3D characters. Representation. 1) Skeleton Origin (root) Joint centers/ bones lengths

Motion Capture. Motion Capture in Movies. Motion Capture in Games

Homework 2 Questions? Animation, Motion Capture, & Inverse Kinematics. Velocity Interpolation. Handing Free Surface with MAC

Animation. CS 4620 Lecture 32. Cornell CS4620 Fall Kavita Bala

Animation. CS 465 Lecture 22

2D/3D Geometric Transformations and Scene Graphs

Jane Li. Assistant Professor Mechanical Engineering Department, Robotic Engineering Program Worcester Polytechnic Institute

Animation. CS 4620 Lecture 33. Cornell CS4620 Fall Kavita Bala

CALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES

3D Transformations. CS 4620 Lecture 10. Cornell CS4620 Fall 2014 Lecture Steve Marschner (with previous instructors James/Bala)

EE Kinematics & Inverse Kinematics

TIEA311 Tietokonegrafiikan perusteet kevät 2018

Interactive Computer Graphics

CS 231. Inverse Kinematics Intro to Motion Capture

12.1 Quaternions and Rotations

Last Time? Inverse Kinematics. Today. Keyframing. Physically-Based Animation. Procedural Animation

animation computer graphics animation 2009 fabio pellacini 1 animation shape specification as a function of time

Motion Capture & Simulation

Quaternions and Rotations

animation computer graphics animation 2009 fabio pellacini 1

Animation Lecture 10 Slide Fall 2003

Lecture VI: Constraints and Controllers. Parts Based on Erin Catto s Box2D Tutorial

Announcements: Quiz. Animation, Motion Capture, & Inverse Kinematics. Last Time? Today: How do we Animate? Keyframing. Procedural Animation

Quaternions and Rotations

Lecture VI: Constraints and Controllers

Computer Animation. Rick Parent

Last Time? Animation, Motion Capture, & Inverse Kinematics. Today. Keyframing. Physically-Based Animation. Procedural Animation

Last Time? Animation, Motion Capture, & Inverse Kinematics. Today. Keyframing. Physically-Based Animation. Procedural Animation

Jane Li. Assistant Professor Mechanical Engineering Department, Robotic Engineering Program Worcester Polytechnic Institute

ME5286 Robotics Spring 2014 Quiz 1 Solution. Total Points: 30

3D Transformations. CS 4620 Lecture Kavita Bala w/ prior instructor Steve Marschner. Cornell CS4620 Fall 2015 Lecture 11

Robotics (Kinematics) Winter 1393 Bonab University

Animation, Motion Capture, & Inverse Kinematics. Announcements: Quiz

COMPUTER ANIMATION 3 KEYFRAME ANIMATION, RIGGING, SKINNING AND CHARACTER ANIMATION. Rémi Ronfard, Animation, M2R MOSIG

Chapter 3 : Computer Animation

Data-driven Approaches to Simulation (Motion Capture)

6.837 Computer Graphics Hierarchical Modeling Wojciech Matusik, MIT EECS Some slides from BarbCutler & Jaakko Lehtinen

Human body animation. Computer Animation. Human Body Animation. Skeletal Animation

CS354 Computer Graphics Rotations and Quaternions

autorob.github.io Inverse Kinematics UM EECS 398/598 - autorob.github.io

Forward kinematics and Denavit Hartenburg convention

A simple example. Assume we want to find the change in the rotation angles to get the end effector to G. Effect of changing s

MCE/EEC 647/747: Robot Dynamics and Control. Lecture 3: Forward and Inverse Kinematics

CMSC 425: Lecture 10 Skeletal Animation and Skinning

Robot Inverse Kinematics Asanga Ratnaweera Department of Mechanical Engieering

Advanced Graphics and Animation

MTRX4700 Experimental Robotics

Game Programming. Bing-Yu Chen National Taiwan University

Motion Control Methods for Skeleton Daniel Thalmann

Introduction to Robotics

3. Manipulator Kinematics. Division of Electronic Engineering Prof. Jaebyung Park

Kinematical Animation.

Rotations (and other transformations) Rotation as rotation matrix. Storage. Apply to vector matrix vector multiply (15 flops)

Kinematics. Kinematics analyzes the geometry of a manipulator, robot or machine motion. The essential concept is a position.

Geometric Transformations

Jane Li. Assistant Professor Mechanical Engineering Department, Robotic Engineering Program Worcester Polytechnic Institute

Industrial Robots : Manipulators, Kinematics, Dynamics

Chapter 5.2 Character Animation

EEE 187: Robotics Summary 2

Animation. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 4/23/07 1

Dynamic Geometry Processing

Session #5 2D Mechanisms: Mobility, Kinematic Analysis & Synthesis

7 Modelling and Animating Human Figures. Chapter 7. Modelling and Animating Human Figures. Department of Computer Science and Engineering 7-1

Animation. Keyframe animation. CS4620/5620: Lecture 30. Rigid motion: the simplest deformation. Controlling shape for animation

Kinematic Model of Robot Manipulators

Kinematics: Intro. Kinematics is study of motion

Why animate humans? Why is this hard? Aspects of the Problem. These lectures. Animation Apreciation 101

A Detailed Look into Forward and Inverse Kinematics

Applications. Human and animal motion Robotics control Hair Plants Molecular motion

SCAPE: Shape Completion and Animation of People

Lecture 18 Kinematic Chains

Kinematics & Motion Capture

CS354 Computer Graphics Character Animation and Skinning

COMP30019 Graphics and Interaction Three-dimensional transformation geometry and perspective

Maya Lesson 8 Notes - Animated Adjustable Desk Lamp

A 12-DOF Analytic Inverse Kinematics Solver for Human Motion Control

Animation by Adaptation Tutorial 1: Animation Basics

Jacobian: Velocities and Static Forces 1/4

Planar Robot Kinematics

Inverse Kinematics Analysis for Manipulator Robot With Wrist Offset Based On the Closed-Form Algorithm

Quaternions and Rotations

Robots are built to accomplish complex and difficult tasks that require highly non-linear motions.

Transcription:

Articulated Characters

Skeleton A skeleton is a framework of rigid body bones connected by articulated joints Used as an (invisible?) armature to position and orient geometry (usually surface triangles)

Joints Joints connect rigid bodies together, while allowing for relative motion between them Different types: hinge, ball-and-socket, saddle joint, sliding A Joint has 0-6 degrees of freedom (DoF) A 0-DoF joint rigidly connects two bodies into a single rigid body A full 6-DoF joint doesn t do anything, and each of the bodies are free to move entirely independently Typical joints are somewhere in-between (i.e. from 1-5 DoF)

Joints Rotational Joints 1-DoF: a rotation matrix Rot 4x4 (n,θ) defined by axis n and angle θ 2-DoF: multiplication of two sequential rotation matrices about different axes 3-DoF: multiplication of 3 sequential rotation matrices about 3 different axes Like Euler Angles, has the same problem of Gimbal lock Better to specify a 3D rotation about an arbitrary axis (quaternion-style) Translational Joint Can be specified to translate along any axis: (1-DoF, 2-DoF, 3-DoF) Translation matrix T 4x4 (v) is defined by the translation vector v Compound Joint Combines rotational and translational joints together

Examples rotation along one axis DoF=1 back and forth & up and down motion no rotation DoF=2 Hinge Saddle rotation along all 3 axes DoF=3 sliding in a plane DoF=2 Ball-and-socket Sliding Image from http://www.shockfamily.net/skeleton/joints.html

Joint Parameters Offset A fixed translational displacement in the space of the parent body/joint, which acts as a pivot point for the joint s movement Orientation Orientation of a joint s local coordinate system defined in the space of its parent body/joint (a matrix or quaternion) If using homogeneous coordinates, offset and orientation can be defined together in one 4x4 matrix Joint Limits The minimum and maximum limits for each DOF that can be enabled or disabled independently E.g. the human elbow can bend to about +150 degrees and hyperextend back as much as 10 degrees

Joint Parameters J1 Offset: (0,6) Orientation: Rot(-45) Limit: None J2 Offset: (5,0) Orientation: Rot(50) Limit: [0,90] J3 Offset: (4,0) Orientation: Rot(30) Limit: [-90,90]

Joint Hierarchies

Joints in Character Animation Joints are organized in a hierarchy The root is the position of the base of the skeleton typically the backbone or pelvis the root has all 6 DoF so it can be placed anywhere with any orientation Typically, other joints have only rotational DoFs but in reality they have prismatic (translational) components as well 3 translational and 48 rotational DoFs 1 DoF: Knee 2 DoFs: Wrist 3 DoFs: Shoulder Image from http://www.cc.gatech.edu/classes/ay2012/cs4496_spring/

State Vector Root Joint Image from http://www.cc.gatech.edu/classes/ay2012/cs4496_spring/

Hierarchical Representation The articulated skeleton can be described by a tree Nodes: joints Edges: bones The transformation of a joint is defined relative to its parent joint/body in the hierarchy

Forward Kinematics

Forward Kinematics Specify the base position/joint along with the other joint angles to prescribe motion To compute the final position and orientation of a joint in the world coordinate system, the transformations of all parent joints are combined together Changing a parent joint affects *all* of its child bodies/joints Changing a child joint does not affect any of its parent bodies/joints x x+δx α β+ Δ β α+δ α β

Forward Kinematics Goal: Compute the position of a local point P in the world space J1 Offset: (0,6) Orientation: Rot(-45) J2 Offset: (5,0) Orientation: Rot(50) P: In C.S. {X 3,Y 3 }: (2,0) J3 Offset: (4,0) Orientation: Rot(30) In C.S. {x world,y world } In C.S. {x 1,y 1 } In C.S. {x 2,y 2 } In C.S. {x 3,y 3 } P world =T(0,6)R(-45)T(5,0)R(50)T(4,0)R(30)P local

Recall: Transformations in World & Object Space World Space: Read right to left Object Space: Read left to right T(1,1) R(45) R(45) T(1,1) R(45) T(1,1)

In the View of World Space P world =T(0,6)R(-45)T(5,0)R(50)T(4,0)R(30)P local

In the View of World Space P world =T(0,6)R(-45)T(5,0)R(50)T(4,0)R(30)P local

In the View of World Space P world =T(0,6)R(-45)T(5,0)R(50)T(4,0)R(30)P local

In the View of World Space P world =T(0,6)R(-45)T(5,0)R(50)T(4,0)R(30)P local

In the View of World Space P world =T(0,6)R(-45)T(5,0)R(50)T(4,0)R(30)P local

In the View of World Space P world =T(0,6)R(-45)T(5,0)R(50)T(4,0)R(30)P local

In the View of World Space P world =T(0,6)R(-45)T(5,0)R(50)T(4,0)R(30)P local

In the View of Object Space P world =T(0,6)R(-45)T(5,0)R(50)T(4,0)R(30)P local

In the View of Object Space P world =T(0,6)R(-45)T(5,0)R(50)T(4,0)R(30)P local

In the View of Object Space P world =T(0,6)R(-45)T(5,0)R(50)T(4,0)R(30)P local

In the View of Object Space P world =T(0,6)R(-45)T(5,0)R(50)T(4,0)R(30)P local

In the View of Object Space P world =T(0,6)R(-45)T(5,0)R(50)T(4,0)R(30)P local

In the View of Object Space P world =T(0,6)R(-45)T(5,0)R(50)T(4,0)R(30)P local

In the View of Object Space P world =T(0,6)R(-45)T(5,0)R(50)T(4,0)R(30)P local

Pros and Cons The hierarchy is simple and efficient: Specify the motion of the root node first Then specify the poses of children one layer at a time Especially suitable for modeling motions in open space (without constraints) E.g. flying birds, swimming fish Has difficulties with interactions with the environment Making a foot stay on the ground, fingers stay in contact with a cup, etc.

Forward Kinematics Equations Given values for the joint DoF θ=[θ 1, θ 2,, θ n ] T Compute the end effectors in world space e=[e 1, e 2,, e m ] T Forward Kinematics defines and uses the function e=f(θ) Given θ=[θ 1, θ 2, θ 3 ] T Find e=[e 1, e 2 ] T e 1 θ 1 θ 3 e 2 (e 1,e 2 ) = F (θ 1, θ 2, θ 3 ) θ 2

Inverse Kinematics

Inverse Kinematics Equations Given the values for the end effectors in world space e=[e 1, e 2,, e m ] T Compute the joint angles θ=[θ 1, θ 2,, θ n ] T Inverse Kinematics defines: θ =G(e) e 1 θ 3 e 2 Given e=[e 1, e 2 ] T θ 1 Find θ=[θ 1, θ 2, θ 3 ] T (θ 1, θ 2, θ 3 ) = G(e 1,e 2 ) θ 2

Inverse Kinematics Finding a solution for IK can be hard one unique solution infinite solutions (underconstrained) no solution (overconstrained) Cannot be solved analytically in most cases Usually requires numerical methods Jacobian iterative method Optimization based methods θ e θ 2 1 e 2 e 1 1 e 2 θ 1 θ 3 θ 3 θ 2 Two solutions [θ 1, θ 2, θ 3 ] T for constrained [e 1, e 2 ] T

Linearization Use the secant approximation on e=f(θ): e-e 0 = df/dθ (θ-θ 0 ) Here J=dF/dθ is the Jacobian matrix of partial derivatives J defines the instantaneous changes in the end effectors e relative to infinitesimal changes in the angles θ since e=f(θ) is nonlinear, J is only valid as an approximation near the current configuration θ 0 Algorithm: replace e with e target and solve for θ

Jacobian Matrix For e=[e 1, e 2,, e m ] T and θ=[θ 1, θ 2,, θ n ] T, J F1 1 F2 1... Fm 1 F1 2 F2 2... Fm 2............ F1 n F2 n... F m n The column for the jth joint can be computed numerically as: jth F( θ b j θj) F( θ) T J where j b j [0,0,..., 1,...,0,0] θ j If the jth joint is a rotational joint with a single degree of freedom then the element corresponding to the ith end effector in the jth column of J can be computed analytically as: J v s p ) ij j ( i j where v j is the unit vector pointing along the axis of rotation, p j is the position of the joint, and s i is the position of the ith end effector

Iterative Solver Input: e 0 current end effector positions e t target end effector positions θ 0 current DoFs Algorithm: while( e t e 0 > threshold){ compute J; // Take many small steps and recompute J at each step δe= e t - e 0 ; // Can scale this down to aim for smaller steps Solve J δθ= δe to find δθ; update the DoF with a small step of αδθ: i.e., θ 0 += αδθ; update end effectors: e 0 =F(θ 0 ); }

Solving J δθ= δe J is not guaranteed to be invertible, and is typically not even a square matrix If J is overdetermined, multiply both sides by J T, solve J T J δθ= J T δe for the least-squares solution (Householder is better!) this gives the unique solution too, if it exists (of course, there are better methods if the solution is unique) If J is underdetermined, use pseudo inverse J + to obtain δθ= J + δe for the minimum norm solution The general solution of δθ= J + δe can be written as δθ= J + δe+(i- J + J)γ The second term (I- J + J) represents the orthogonal projection to the null space of J For any β= (I- J + J)γ we have J β=0, which means β will only affect the interior joints and causes no motion of the end effectors This null space term can be used for some secondary goals, e.g. finding the most natural positions for the joints, balance, etc. think about all the styles of walking Take CS205!

Pros and Cons Modeling poses of characters interacting with other objects E.g., make sure fingers are exactly in contact with a cup Cannot get a solution if the target position is impossible (over-constrained) Try to find a solution as close as possible in some sense, but this could look bad Hard to pick the best solution for an underconstrained system (null space matters!) Requires additional constraints or optimizing some quantities

Question #1 LONG FORM: Summarize forward and inverse kinematics. Describe your ideas, so far, for your game. SHORT FORM: Give a name to each game we discuss in class.

Puppeteering

Puppeteering Specifying animation curves and splines for every degree of freedom (root and all angles) by hand can be tedious And hard to make look realistic Inverse kinematics can help But still leaves the null space degrees of freedom unspecified It would be better if one could input motion in a higher level fashion similar to how a puppeteer *guides* a puppet One solution to this is motion capture, where human movements are captured by various types of cameras

Motion Capture Attach a number of markers to a person Light is emitted from a number of cameras and reflected back to the cameras Compute the 3D location of the markers by inferring depth values From the marker locations, determine rigid body positions and joint angles and thus the character motion https://www.nbc.com/saturday-night-live/video/motion-capture/n13489

Cameras Multiple cameras are set up to capture the performance space

Motion Capture Stage Stages can be quite extravagant

Facial Motion Capture A special camera attached to the actors head is often used

Facial Motion Capture Extensive secondary effects, including simulation, can be incorporated on top of the motion capture