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

Similar documents
Computer Animation and Visualisation. Lecture 4. Rigging / Skinning

Introduction to Computer Graphics. Animation (1) May 19, 2016 Kenshi Takayama

CS 775: Advanced Computer Graphics. Lecture 4: Skinning

CS354 Computer Graphics Character Animation and Skinning

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

Kinematics and Orientations

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

Advanced Graphics and Animation

CMSC 425: Lecture 10 Skeletal Animation and Skinning

Game Programming. Bing-Yu Chen National Taiwan University

Articulated Characters

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

Character animation Christian Miller CS Fall 2011

Animation. CS 465 Lecture 22

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

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

Course Review. Computer Animation and Visualisation. Taku Komura

Forward kinematics and Denavit Hartenburg convention

Robotics kinematics and Dynamics

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

Example-Based Skeleton Extraction. Scott Schaefer Can Yuksel

Real Time Skin Deformation with Bones Blending

05 Mesh Animation. Steve Marschner CS5625 Spring 2016

CALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES

Industrial Robots : Manipulators, Kinematics, Dynamics

计算机图形学. Computer Graphics 刘利刚.

MODELING AND HIERARCHY

Computer Animation Fundamentals. Animation Methods Keyframing Interpolation Kinematics Inverse Kinematics

Character Animation COS 426

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

animation computer graphics animation 2009 fabio pellacini 1

EEE 187: Robotics Summary 2

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

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

Learning Autodesk Maya The Modeling & Animation Handbook. Free Models From Turbo Squid Value US $ Official Autodesk Training Guide

Deformation Sensitive Decimation

ROBOTICS 01PEEQW. Basilio Bona DAUIN Politecnico di Torino

Animation of 3D surfaces.

Animation of 3D surfaces

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

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

Stretchable and Twistable Bones for Skeletal Shape Deformation

CS 775: Advanced Computer Graphics. Lecture 3 : Kinematics

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

Applications of Dual Quaternions in Three Dimensional Transformation and Interpolation

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

Basilio Bona ROBOTICA 03CFIOR 1

Realistic Rendering and Animation of a Multi-Layered Human Body Model

Today. Parity. General Polygons? Non-Zero Winding Rule. Winding Numbers. CS559 Lecture 11 Polygons, Transformations

Animation Lecture 10 Slide Fall 2003

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

Using Algebraic Geometry to Study the Motions of a Robotic Arm

10 - ARAP and Linear Blend Skinning

Chapter 5.2 Character Animation

Animation by Adaptation Tutorial 1: Animation Basics

What is a Manipulator? 2007 RoboJackets TE Sessions 10/16/2007. Keys to Understanding Manipulators TE Sessions Manipulators 10/16/07

Advanced Computer Graphics

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

For each question, indicate whether the statement is true or false by circling T or F, respectively.

CSE452 Computer Graphics

Animation. Motion over time

Animation II: Soft Object Animation. Watt and Watt Ch.17

COMP 175 COMPUTER GRAPHICS. Lecture 10: Animation. COMP 175: Computer Graphics March 12, Erik Anderson 08 Animation

Free-Form Deformation and Other Deformation Techniques

Kinematics & Motion Capture

CS 231. Basics of Computer Animation

Interactive Computer Graphics

Data-driven Approaches to Simulation (Motion Capture)

CS 523: Computer Graphics, Spring Shape Modeling. Skeletal deformation. Andrew Nealen, Rutgers, /12/2011 1

INFOMCANIM Computer Animation Motion Synthesis. Christyowidiasmoro (Chris)

Inverse Kinematics Programming Assignment

CMSC 425: Lecture 10 Basics of Skeletal Animation and Kinematics

EE Kinematics & Inverse Kinematics

Human Skeletal and Muscle Deformation Animation Using Motion Capture Data

Triangulation: A new algorithm for Inverse Kinematics

Prof. Mark Yim University of Pennsylvania

Lecture 18 of 41. Scene Graphs: Rendering Lab 3b: Shader

Spherical Blend Skinning on GPU

Curve skeleton skinning for human and creature characters

Skinning Mesh Animations

Articulated Robots! Robert Stengel! Robotics and Intelligent Systems! MAE 345, Princeton University, 2017

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

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

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

Robotics. SAAST Robotics Robot Arms

CS 775: Advanced Computer Graphics. Lecture 17 : Motion Capture

Lecture 22 of 41. Animation 2 of 3: Rotations, Quaternions Dynamics & Kinematics

Lecture 22 of 41. Animation 2 of 3: Rotations, Quaternions Dynamics & Kinematics

MOTION CAPTURE DATA PROCESSING - MOTION EDITING / RETARGETING - MOTION CONTROL / GRAPH - INVERSE KINEMATIC. Alexandre Meyer Master Informatique

Real-Time Enveloping with Rotational Regression. Robert Yuanbo Wang

Robot mechanics and kinematics

Beginners Guide Maya. To be used next to Learning Maya 5 Foundation. 15 juni 2005 Clara Coepijn Raoul Franker

Chapter 9 Animation System

Animation Movie under Autodesk Maya

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

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

Animation space: a truly linear framework for character animation

Visual Recognition: Image Formation

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

Reading. Hierarchical Modeling. Symbols and instances. Required: Angel, sections , 9.8. Optional:

Transcription:

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

Skeletal Animation Victoria 2 CSE 872 Dr. Charles B. Owen Advanced Computer Graphics

Skinning http://www.youtube.com/watch? v=dniwvu55pec&feature=related http://www.youtube.com/watch? v=z0qwbdk8mca&feature=related Assuming the skin mesh is given 1. Kinamatics : How the motions of the skeleton are given 2. Skinning : How the character s skin deform according to the motion of the skeleton

Kinematics How to animate skeletons (articulated figures) Kinematics is the study of motion (without regard to the forces that caused it)

Backgrounds A transformation matrix (4x4) is defined per bone that converts local coordinates to world coordinates xli i yl zi l x gi xli i y g = M i yli i i z g zl

Hierarchical Models Tree structure of joints and bones The root bone can be chosen arbitrarily Usually the pelvis bone is the root bone A Joint connect two bones Revolute (hinge) joint allows rotation about a fixed axis Prismatic joint allows translation along a line Ball-and-socket joint allows rotation about an arbitrary axis

Human Joints Human joints are actually much more complicated, but...

Forward Kinematics θ2 θ1 θ2 θ1 (p, q) = F(θ i ) θ i = F (p, q) Forward Kinematics Inverse Kinematics 1

Forward Kinematics: A Simple Example A simple robot arm in 2-dimensional space 2 revolute joints Joint angles are known Compute the position of the end-effector ( xe, ye ) l2 l1 θ1 θ2 xe = l1 cos θ1 + l2 cos(θ1 + θ 2 ) ye = l1 sin θ1 + l2 sin(θ1 + θ 2 )

3D Transformations The position and orientation of an object is represented as a rigid transformation Vector & 3x3 Matrix Rv + p 4x4 Matrix X Y Y R p v Tv = 0 1 1 Vector & Quaternion 1 qvq + p X

Forward Kinematics: A Simple Example Forward kinematics map as a coordinate transformation that transforms the position and orientation of the end-effector according to joint angles Y Y X ' l2 θ2 l1 θ1 X ' xe ye = 1 T 0 0 1

A Chain of Transformations X Y Y l2 xe ye = 1 θ2 l1 θ1 X T 0 0 1 T = ( rotθ1 ) ( transl1 ) ( rotθ 2 ) ( transl2 ) cos θ1 = sin θ1 0 sin θ1 cos θ1 0 0 1 0 l1 cos θ 2 0 0 1 0 sin θ 2 1 0 0 1 0 sin θ 2 cos θ 2 0 0 1 0 l2 0 0 1 0 1 0 0 1

Thinking of Transformations In a view of body-attached coordinate system Y Y X X T = ( rotθ1 ) ( transl1 ) ( rotθ 2 ) ( transl 2 ) cos θ1 = sin θ1 0 sin θ1 cos θ1 0 0 1 0 l1 cos θ 2 0 0 1 0 sin θ 2 1 0 0 1 0 sin θ 2 cos θ 2 0 0 1 0 l2 0 0 1 0 1 0 0 1

Thinking of Transformations In a view of body-attached coordinate system Y Y X θ1 X T = ( rotθ1 ) ( transl1 ) ( rotθ 2 ) ( transl 2 ) cos θ1 = sin θ1 0 sin θ1 cos θ1 0 0 1 0 l1 cos θ 2 0 0 1 0 sin θ 2 1 0 0 1 0 sin θ 2 cos θ 2 0 0 1 0 l2 0 0 1 0 1 0 0 1

Thinking of Transformations In a view of body-attached coordinate system Y Y X L1 θ1 X T = ( rotθ1 ) ( transl1 ) ( rotθ 2 ) ( transl 2 ) cos θ1 = sin θ1 0 sin θ1 cos θ1 0 0 1 0 l1 cos θ 2 0 0 1 0 sin θ 2 1 0 0 1 0 sin θ 2 cos θ 2 0 0 1 0 l2 0 0 1 0 1 0 0 1

Thinking of Transformations In a view of body-attached coordinate system X Y Y θ2 L1 θ1 X T = ( rotθ1 ) ( transl1 ) ( rotθ 2 ) ( transl 2 ) cos θ1 = sin θ1 0 sin θ1 cos θ1 0 0 1 0 l1 cos θ 2 0 0 1 0 sin θ 2 1 0 0 1 0 sin θ 2 cos θ 2 0 0 1 0 l2 0 0 1 0 1 0 0 1

Thinking of Transformations In a view of body-attached coordinate system Y Y L2 X θ2 L1 θ1 X T = ( rotθ1 ) ( transl1 ) ( rotθ 2 ) ( transl 2 ) cos θ1 = sin θ1 0 sin θ1 cos θ1 0 0 1 0 l1 cos θ 2 0 0 1 0 sin θ 2 1 0 0 1 0 sin θ 2 cos θ 2 0 0 1 0 l2 0 0 1 0 1 0 0 1

Thinking of Transformations In a view of global coordinate system Y Y X X T = ( rotθ1 ) ( transl1 ) ( rotθ 2 ) ( transl 2 ) cos θ1 = sin θ1 0 sin θ1 cos θ1 0 0 1 0 l1 cos θ 2 0 0 1 0 sin θ 2 1 0 0 1 0 sin θ 2 cos θ 2 0 0 1 0 l2 0 0 1 0 1 0 0 1

Thinking of Transformations In a view of global coordinate system Y Y L2 X X T = ( rotθ1 ) ( transl1 ) ( rotθ 2 ) ( transl 2 ) cos θ1 = sin θ1 0 sin θ1 cos θ1 0 0 1 0 l1 cos θ 2 0 0 1 0 sin θ 2 1 0 0 1 0 sin θ 2 cos θ 2 0 0 1 0 l2 0 0 1 0 1 0 0 1

Thinking of Transformations In a view of global coordinate system Y Y X L2 θ2 X T = ( rotθ1 ) ( transl1 ) ( rotθ 2 ) ( transl 2 ) cos θ1 = sin θ1 0 sin θ1 cos θ1 0 0 1 0 l1 cos θ 2 0 0 1 0 sin θ 2 1 0 0 1 0 sin θ 2 cos θ 2 0 0 1 0 l2 0 0 1 0 1 0 0 1

Thinking of Transformations In a view of global coordinate system Y Y X L2 L1 θ2 X T = ( rotθ1 ) ( transl1 ) ( rotθ 2 ) ( transl 2 ) cos θ1 = sin θ1 0 sin θ1 cos θ1 0 0 1 0 l1 cos θ 2 0 0 1 0 sin θ 2 1 0 0 1 0 sin θ 2 cos θ 2 0 0 1 0 l2 0 0 1 0 1 0 0 1

Thinking of Transformations In a view of global coordinate system Y Y L2 X θ2 L1 θ1 X T = ( rotθ1 ) ( transl1 ) ( rotθ 2 ) ( transl 2 ) cos θ1 = sin θ1 0 sin θ1 cos θ1 0 0 1 0 l1 cos θ 2 0 0 1 0 sin θ 2 1 0 0 1 0 sin θ 2 cos θ 2 0 0 1 0 l2 0 0 1 0 1 0 0 1

How to Handle Ball-and-Socket Joints? Three revolute joints whose axes intersect at a point (equivalent to Euler angles), or 3D rotation about an arbitrary axis T = ( transl1 ) ( rotθ x ) ( rotθ y ) ( rotθ z ) ( transl2 ) 0 1 0 cos θ x = 0 sin θ x 0 0 0 sin θ x cos θ x 0 0 cos θ y 0 0 0 sin θ y 1 0 0 sin θ y 1 0 0 cos θ y 0 0 0 cos θ z 0 sin θ z 0 0 1 0 sin θ z cos θ z 0 0 0 0 0 0 1 0 0 1

Floating Base The position and orientation of the root segment are added θ1 Y l1 l2 θ2 l3 X θ3 T 2= ( transl r ) ( rot θ r ) ( transl 1) ( rot θ 1 ) ( transl 2 ) ( rot θ 2 )

Joint & Link Transformations Each segment has its own coordinate frame Forward kinematics map is an alternating multiple of Joint transformations : represents joint movement Usually rotations Link transformations : defines a frame relative to its parent Usually translations (bone-length) 1st link transformation T = J 0 L1 J1 L2 J 2 L3 J 3 1st joint transformation The position and orientation of the root segment L1 L2 L3

Joint & Link Transformations Note that Joint transformations may include translation Human joints are not ideal hinges Link transformations may include rotation Some links are twisted

Representing Hierarchical Models A tree structure A node contains a joint transformation An arc contains a link transformation L1 J1 L2 J2 L3 J3 J0

Depth-First Tree Traversal Draw graphics needs to compute the position and orientation of all links OpenGL s matrix stack is useful J0 L1 J1 L2 J2 L3 J3

Motion Capture

BVH mocap file format The Biovision Hierarchy (BVH) file format was developed by Biovision, a motion capture company. It stores motion capture data. It s a text file. It matches with OpenGL well. It has two parts: hierarchy and data.

Part 1: Hierarchy The hierarchy is a joint tree. Each joint has an offset and a channel list. Joint 1: Offset: L1 The channel list defines a sequence of transformations of J1 L1 J1 L2 J2 L3 J3 J0

An example

An example Chest Joint and its local coordinate system Neck Joint and its local coordinate system Neck s offset from chest (like a bone) Channel list: Transformation from chest coordinate system to neck coordinate system

Part 2: Data MOTION Frames: 4620 Frame Time: 0.008333 0.4954-10.3314 36.8439-1.0364-2.0052 92.3287 6.5990-0.8348 14.2185 0.0000 13.7079 12.9074-5.0440-2.9531-19.4662-0.0000-36.9689-0.0000-5.8559-2.0372-19.6725 0.0000 16.1210-14.2594 6.5762 2.0311 25.2317-0.0000-40.3850-0.0000 0.4920-11.6100 42.3449 1.5698-10.2585-1.3778-1.6618 12.8953-7.8738-6.1442 0.0000 22.3789 19.4173-9.7285-32.4893 0.0000-24.5218-6.5960 5.5760 2.4836-0.0000 18.7680-0.0000-2.8578...

Part 2: Data Variable 1 Variable 2 Variable 3 Variable 4 Variable 5 Variable 6 Variable 7 Variable 8 Variable 9 The data part stores a number of frames. Each frame is a list of variables. The model is animated, when each frame uses variables.

Summary Kinematics is the study of motion of articulated figures Kinematics does not consider physics (forces, mass, ) Forward kinematics is straightforward Forward kinematics map can be considered as a chain of coordinate transformations

Skinning http://www.youtube.com/watch? v=dniwvu55pec&feature=related http://www.youtube.com/watch? v=z0qwbdk8mca&feature=related Assuming the skin mesh is given 1. Kinematics : How the motions of the skeleton are given 2. Skinning : How the character s skin deform according to the motion of the skeleton

For robots, skinning is trivial Compute the local-to-global matrix for all body segments : M Multiply the local coordinates v of every body segment to this matrix to calculate its global position : v = Mv Then, the global position of all the points can be computed

What about for characters? A single mesh is modeled : the rest pose

Rest Pose to Bone Coordinate the global position of a particular vertex, v, in the rest pose is written as v The transformation matrix associated with bone i in the rest pose is written as M i Rest pose: The pose in which surface mesh is modeled

Rest Pose to Bone Coordinate for each bone, i, the position of the vertex in the rest pose is first transformed from model coordinates (v ) to bone coordinates (v i ) by applying the inverse of the rest pose bone transformation: 1 ˆ vˆ i = M i vˆ

Bone Coordinate to World Coordinate The vertex in bone coordinates, v i is then transformed back into world coordinates by applying the transformation of the bone in its new skeletal configuration: 1 ˆ v i = M i vˆ i = M i M i vˆ M i : the local - to - global matrix in the new posture

Problem : For some points, we don t know to which body segment it belongs to For the points near the elbow joint, it might belong to the upper arm, or the forearm or maybe both We want both segments to affect its movements

What is the position of point A after the elbow is bent 90 degrees?

A (3,1) What is the position of point A after the elbow is bent 90 degrees? Assuming it is a point of the upper arm

(-1,1) A What is the position of point A after the elbow is bent 90 degrees? Assuming it is a point of the upper arm Assuming it is a point of the lower arm

A What is the position of point A after the elbow is bent 90 degrees? Assuming it is a point of the upper arm Assuming it is a point of the lower arm Assuming the weight is 0.8 for the upperarm and 0.2 for the forearm

Solution: Linear Blending Linear Blending determines the new position of a vertex by linearly combining the results of the vertex transformed rigidly with each bone. A scalar weight, wi, is given to each influencing bone and the weighted sum gives the vertex s position, v, in the new pose, as follows: b ˆ 1 vˆ v i = wi M i M i i =1 b w i =1 i =1 b is the number of bones influencing the position of v

How to decide the weights? Decide the mapping of the vertex to the bone If vertex v is in the middle of bone i, then wi = 1 and for the rest w j i = 0 If the vertex is near the border of bone i and i+1, wi will gradually decrease to 0 and wi+1 will gradually increase to 1 If the vertex is affected by more than three bones, the weight can be determined according to its distance to each bone

Containment Binding (3DSMax) Volume primitives around the bones Boxes, cylinders, etc. Vertex weights assigned based on which primitives it is in 50 CSE 872 Dr. Charles B. Owen Advanced Computer Graphics

Smooth Skin Algorithm 51 CSE 872 Dr. Charles B. Owen Advanced Computer Graphics

Problems with Linear Blending The meshes exhibit volume loss as joints are rotated to extreme angles. These are called joint collapse and candy wrapper effect These undesirable results occur because of a lack of flexibility in the framework. Linear blending Non-linear blending 90 degree 180 degree

Limitations of Smooth Skin 53 CSE 872 Dr. Charles B. Owen Advanced Computer Graphics

Why does it happens? Simple linear blending in the Cartesian space causes the artefacts

Solution? Interpolating the homogeneous transformations Kavan et al. [SIGGRAPH08], etc. 90 degree 180 degree

How to solve volume loss? Add additional joints that half interpolate the rotations Each joint should be only rotated a little, not reaching the extreme angle

Remaining difficulties Deciding Weights Deciding Skeletons Muscle buldging Bulging the biceps when the elbow is bent

Deciding Weights from Examples Instead of manually tuning the weights, we can let the system learn them from examples Alex Mohr and Michael Gleicher [SIGGRAPH 03] http://www.youtube.com/watch? v=e6y5pltq6bo

Automatic Rigging How can we automatically compute the skeleton from the polygon data? Can make use of the medial axis Medial axis is where the distance to the surface is C1 discontinuous Can be computed by circle / sphere fitting

Anatomical models Model the body by Muscles Fat Skin

Detailed Anatomical Models 61 CSE 872 Dr. Charles B. Owen Advanced Computer Graphics

Method 1. When the joints are bent, the muscles contract 2. The distance between the origin and insertion point decreases 3. The volume of the muscles are kept the same, so they pump up 4. The skin is deformed to cover the muscles

Summary Kinematics Hierarchical Model Motion Capture Skinning Linear Blending Example-based method Automatic Rigging Anatomical models

Readings (beyond the scope of this class) Skinning A Comparison of Linear Skinning Techniques for Character Animation Afrigraph 2007 Multi-Weight Enveloping: Least-Squares Approximation Techniques for Skin Animation Wang and Phillips, SCA 02 http://portal.acm.org/citation.cfm?id=545283 Guessing the weights from examples Alex Mohr Michael Gleicher Building Effcient, Accurate Character Skins from Examples. SIGGRAPH 2003 Automatic Rigging and Animation of 3D Characters Ilya Baran Jovan Popovi c, SIGGRAPH 2007 http://www.mit.edu/~ibaran/autorig/pinocchio.html Geometric Skinning with Approximate Dual Quaternion Blending, SIGGRAPH 2008