Introduction to Computer Graphics Animation (1) May 19, 2016 Kenshi Takayama
Skeleton-based animation Simple Intuitive Low comp. cost https://www.youtube.com/watch?v=dsonab58qva 2
Representing a pose using skeleton Tree structure consisting of bones & joints Each bone holds relative rotation angle w.r.t. parent joint Whole body pose determined by the set of joint angles (Forward Kinematics) Deeply related to robotics 3
Inverse Kinematics Find joint angles s.t. an end effector comes at a given goal position Typical workflow: Quickly create pose using IK, fine adjustment using FK https://www.youtube.com/watch?v=e1qnz9rv_kw 4
Simple method to solve IK: Cyclic Coordinate Descent Change joint angles one by one S.t. the end effector comes as close as possible to the goal position Ordering is important! Leaf root Easy to implement Basic assignment More advanced Jacobi method (directional constraint) Minimizing elastic energy [Jacobson 12] http://mukai-lab.org/wp-content/uploads/2014/04/ccdparticleinversekinematics.pdf 5
IK minimizing elastic energy Fast Automatic Skinning Transformations [Jacobson SIGGRAPH12] https://www.youtube.com/watch?v=prcxy2lji9i 6
Ways to obtain/measure motion data 7
Optical motion capture Put markers on the actor, record video from many viewpoints (~48) from Wikipedia https://www.youtube.com/watch?v=c6x64lhcuyq 8
Mocap using inexpensive depth camera https://www.youtube.com/watch?v=qc-fdgpjhq8 9
Mocap designed for outdoor scene Motion Capture from Body-Mounted Cameras [Shiratori SIGGRAPH11] 10
Motion database http://mocap.cs.cmu.edu/ 6 categories, 2605 in total Free for research purposes Interpolation, recombination, analysis, search, etc. 11
frame Recombining motions Allow transition from one motion to another if poses are similar in certain frame frame Pose similarity matrix Motion Graphs [Kovar SIGGRAPH02] Motion Patches: Building Blocks for Virtual Environments Annotated with Motion Data [Lee SIGGRAPH06] http://www.tcs.tifr.res.in/~workshop/thapar_igga/motiongraphs.pdf 12
Generating motion through simulation For creatures unsuitable for mocap Too dangerous, nonexistent,... Natural motion respecting body shape Can interact with dynamic environment https://www.youtube.com/watch?v=kf_a1c7zytw Generalizing Locomotion Style to New Animals With Inverse Optimal Regression [Wampler SIGGRAPH14] 13
Creating poses using special devices Tangible and Modular Input Device for Character Articulation [Jacobson SIGGRAPH14] Rig Animation with a Tangible and Modular Input Device [Glauser SIGGRAPH16] https://www.youtube.com/watch?v=vbx47jammn0 14
Many topics about character motion Interaction between multiple persons Grasping motion Crowd simulation Path planning Character motion synthesis by topology coordinates [Ho EG09] Aggregate Dynamics for Dense Crowd Simulation [Narain SIGGRAPHAsia09] Synthesis of Detailed Hand Manipulations Using Contact Sampling [Ye SIGGRAPH12] Space-Time Planning with Parameterized Locomotion Controllers.[Levine TOG11] 15
Skinning 16
17
18
19
20
v i = blend w i,1, T 1, w i,2, T 2, v i Input Vertex positions v i i = 1,, n Transformation per bone T j j = 1,, m Weight from each bone to each vertex w i,j i = 1,, n j = 1,, m Output Vertex positions after deformation v i i = 1,, n Main focus How to define weights w i,j How to blend transformations 21
Simple way to define weights: painting https://www.youtube.com/watch?v=tacb6bx8sn0 22
Automatic weight computation Define weight w j as a smooth scalar field that takes 1 on the j-th bone and 0 on the other bones Minimize 1 st -order derivative Ω w j 2 da [Baran 07] Approximate solution only on surface easy & fast Minimize 2 nd -order derivative Ω Δw j 2 da [Jacobson 11] Introduce inequality constraints 0 w j 1 Quadratic Programming over the volume high-quality Automatic rigging and animation of 3d characters [Baran SIGGRAPH07] Bounded Biharmonic Weights for Real-Time Deformation [Jacobson SIGGRAPH11] Pinocchio demo 23
Simple way to blend transformations: Linear Blend Skinning Represent rigid transformation T j as a 3 4 matrix consisting of rotation matrix R j R 3 3 and translation vector t j R 3 Simple and fast v i = j w i,j R j t j v i 1 Implemented using vertex shader: send v i & w i,j to GPU at initialization, send T j to GPU at each frame Standard method 24
Artifact of LBS: candy wrapper effect Twist one bone Initial shape & two bones Deformation using LBS Linear combination of rigid transformation is not a rigid transformation! Points around joint concentrate when twisted 25
Alternative to LBS: Dual Quaternion Skinning Initial shape & two bones Deformation using LBS Deformation using DQS Idea Quaternion (four numbers) 3D rotation Dual quaternion (two quaternions) 3D rigid motion (rotation + translation) 26
Dual number & dual quaternion Dual number Introduce dual unit ε & its arithmetic rule ε 2 = 0 (cf. imaginary unit i) Dual number is sum of primal & dual components: Dual conjugate: a = a 0 + εa ε = a 0 εa ε a a 0 + εa ε a 0, a ε R Dual quaternion Quaternion whose elements are dual numbers Can be written using two quaternions q q 0 + εq ε Dual conjugate: q = q 0 + εq ε = q 0 εq ε Quaternion conjugate: q = q 0 + εq ε = q 0 + εq ε Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08] 27
Arithmetic rules for dual number/quaternion For dual number a = a 0 + εa ε : 1 Reciprocal = 1 ε a ε a a 0 a2 0 Square root a = a 0 + ε a ε 2 a 0 Trigonometric sin a = sin a 0 + εa ε cos a 0 cos a = cos a 0 εa ε sin a 0 For dual quaternion q = q 0 + εq ε : Norm q = q q = q 0 + ε q 0,q ε q 0 Inverse q 1 = q q 2 Unit dual quaternion satisfies q = 1 q 0 = 1 & q 0, q ε = 0 Easily derived by combining usual arithmetic rules with new rule ε 2 = 0 From Taylor expansion Dot product as 4D vectors Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08] 28
Rigid transformation using dual quaternion Unit dual quaternion representing rigid motion of translation t = t x, t y, t z and rotation q 0 (unit quaternion) : q = q 0 + ε 2 tq 0 Note: 3D vector is considered as quaternion with zero real part Rigid transformation of 3D position v = v x, v y, v z using unit dual quaternion q : v : 3D position after transformation q 1 + εv q = 1 + εv Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08] 29
Rigid transformation using dual quaternion q = q 0 + ε 2 tq 0 q 1 + εv q = q 0 + ε tq 2 0 1 + εv q 0 + ε q 2 0 t = q 0 + ε tq 2 0 q 0 + εvq 0 + ε q 2 0 t = q 0 q 0 + ε tq 2 0q 0 + εq 0 vq 0 + ε q 2 0q 0 t = 1 + ε t + q 0 vq 0 0 + t q 0 = q0 0 + t q 0 2 = 1 = q 0 t 3D position v rotated by quaternion q 0 Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08] 30
Rigid transformation as screw motion Conventional notion: rotation + translation Screw motion Axis direction Any rigid motion is uniquely described as screw motion (Up to antipodality) Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08] 31
Screw motion & dual quaternion Unit dual quaternion q can be written as: q = cos θ 2 + s sin θ 2 θ = θ 0 + εθ ε s = s 0 + εs ε θ 0, θ ε : real number s 0, s ε : unit 3D vector Geometric meaning s 0 : direction of rotation axis θ 0 : amount of rotation θ ε : amount of translation parallel to s 0 s ε : when rotation axis passes through r, it satisfies s ε = r s 0 Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08] 32
Interpolating two rigid transformations Linear interpolation + normalization (nlerp) nlerp q 1, q 2, t 1 t q 1+t q 2 1 t q 1 +t q 2 Note: q & q represent same transformation with opposite path If 4D dot product of non-dual components of q 1 & q 2 is negative, use q 2 in the interpolation 33
Blending rigid motions using dual quaternion blend w 1, q 1, w 2, q 2, w 1 q 1 + w 2 q 2 + w 1 q 1 + w 2 q 2 + Akin to blending rotations using quaternion Same input format as LBS & low computational cost Standard feature in many commercial CG packages Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08] 34
Artifact of DQS: bulging effect Produces ball-like shape around the joint when bended LBS DQS Elasticity-Inspired Deformers for Character Articulation [Kavan SIGGRAPHAsia12] Bulging-free dual quaternion skinning [Kim CASA14] 35
Overcoming DQS s drawback LBS DQS [Kavan12] LBS DQS [Kavan12] Decompose transformation into bend & twist, interpolate them separately [Kavan12] After deforming using DQS, offset vertices along normals [Kim14] Elasticity-Inspired Deformers for Character Articulation [Kavan SIGGRAPHAsia12] Bulging-free dual quaternion skinning [Kim CASA14] 36
Limitation of DQS: Cannot represent rotation by more than 360 Differential Blending for Sketch-based Expressive Posing [Oztireli SCA13] 37
Skinning for avoiding self-intersections Make use of implicit functions https://www.youtube.com/watch?v=rhysgiqegyk Implicit Skinning; Real-Time Skin Deformation with Contact Modeling [Vaillant SIGGRAPH13] 38
Other deformation mechanisms than skinning Unified point/cage/skeleton handles [Jacobson 11] BlendShape https://www.youtube.com/watch?v=p9fqm8vgdb8 https://www.youtube.com/watch?v=bfpaiu8hwq4 Bounded Biharmonic Weights for Real-Time Deformation [Jacobson SIGGRAPH11] 39
References http://en.wikipedia.org/wiki/motion_capture http://skinning.org/ http://mukai-lab.org/category/library/legacy 40