Introduction to Computer Graphics
β Animation (1) β
May 19, 2016
Kenshi Takayama
Skeleton-based animation
β’ Simple
β’ Intuitive
β’ Low comp. cost
2
https://www.youtube.com/watch?v=DsoNab58QVA
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
4
https://www.youtube.com/watch?v=e1qnZ9rV_kw
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]
5http://mukai-lab.org/wp-content/uploads/2014/04/CcdParticleInverseKinematics.pdf
IK minimizing elastic energy
6Fast Automatic Skinning Transformations [Jacobson SIGGRAPH12]https://www.youtube.com/watch?v=PRcXy2LjI9I
Ways to obtain/measure motion data
7
Optical motion capture
β’ Put markers on the actor, record video from many viewpoints (~48)
8https://www.youtube.com/watch?v=c6X64LhcUyQfrom Wikipedia
Mocap using inexpensive depth camera
9https://www.youtube.com/watch?v=qC-fdgPJhQ8
Mocap designed for outdoor scene
10Motion Capture from Body-Mounted Cameras [Shiratori SIGGRAPH11]
Motion databaseβ’ http://mocap.cs.cmu.edu/
β’ 6 categories, 2605 in total
β’ Free for research purposesβ’ Interpolation, recombination, analysis, search, etc.
11
Recombining motions
β’ Allow transition from one motion to another if poses are similar in certain frame
12
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
Pose similarity matrix
frame
fram
e
Generating motion through simulation
β’ For creatures unsuitable for mocapβ’ Too dangerous,
nonexistent, ...
β’ Natural motion respecting body shape
β’ Can interact with dynamic environment
13Generalizing Locomotion Style to New Animals With Inverse Optimal Regression [Wampler SIGGRAPH14]
https://www.youtube.com/watch?v=KF_a1c7zytw
Creating poses using special devices
14Tangible 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
Many topics about character motion
15
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]
Interaction between
multiple persons
Crowd simulation
Grasping motion
Path planning
Skinning
16
17
18
19
20
π―πβ² = blend π€π,1, π1 , π€π,2, π2 , β¦ π―π
β’ Inputβ’ Vertex positions π―π π = 1, β¦ , π
β’ Transformation per bone ππ π = 1, β¦ , π
β’ Weight from each bone to each vertex π€π,π π = 1, β¦ , π π = 1, β¦ , π
β’ Outputβ’ Vertex positions after deformation π―π
β² π = 1, β¦ , π
β’ Main focusβ’ How to define weights π€π,π
β’ How to blend transformations21
Simple way to define weights: painting
22https://www.youtube.com/watch?v=TACB6bX8SN0
Automatic weight computation
β’ Define weight π€π as a smooth scalar field that takes 1 on the j-th bone and 0 on the other bones
β’ Minimize 1st-order derivative Ξ©π»π€π
2ππ΄ [Baran 07]
β’ Approximate solution only on surface easy & fast
β’ Minimize 2nd-order derivative Ξ©Ξπ€π
2ππ΄ [Jacobson 11]
β’ Introduce inequality constraints 0 β€ π€π β€ 1
β’ Quadratic Programming over the volume high-quality
23Automatic rigging and animation of 3d characters [Baran SIGGRAPH07]
Bounded Biharmonic Weights for Real-Time Deformation [Jacobson SIGGRAPH11]
Pinocchio demo
Simple way to blend transformations:Linear Blend Skinningβ’ Represent rigid transformation ππ as a 3Γ4 matrix consisting of
rotation matrix ππ β β3Γ3 and translation vector ππ β β3
π―πβ² =
π
π€π,π ππ πππ―π
1
β’ Simple and fast
β’ Implemented using vertex shader: send π―π & π€π,π to GPU at initialization,
send ππ to GPU at each frame
β’ Standard method
24
Artifact of LBS: βcandy wrapperβ effect
β’ Linear combination of rigid transformation is not a rigid transformation!β’ Points around joint concentrate when twisted
25
Initial shape & two bones
Twist one bone
Deformation using LBS
Alternative to LBS: Dual Quaternion Skinning
β’ Ideaβ’ Quaternion (four numbers) 3D rotation
β’ Dual quaternion (two quaternions) 3D rigid motion (rotation + translation)
26
Initial shape & two bones Deformation using LBS Deformation using DQS
Dual number & dual quaternion
β’ Dual numberβ’ Introduce dual unit π & its arithmetic rule π2 = 0 (cf. imaginary unit π)
β’ Dual number is sum of primal & dual components:
β’ Dual conjugate: π = π0 + πππ = π0 β πππ
β’ Dual quaternionβ’ Quaternion whose elements are dual numbers
β’ Can be written using two quaternions
β’ Dual conjugate: πͺ = πͺ0 + ππͺπ = πͺ0 β ππͺπ
β’ Quaternion conjugate: πͺβ = πͺ0 + ππͺπβ = πͺ0
β + ππͺπβ
27Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08]
πͺ β πͺ0 + ππͺπ
π β π0 + πππ
π0, ππ β β
Arithmetic rules for dual number/quaternion
β’ For dual number π = π0 + πππ :
β’ Reciprocal1
π=
1
π0β π
ππ
π02
β’ Square root π = π0 + πππ
2 π0
β’ Trigonometric sin π = sin π0 + πππ cos π0cos π = cos π0 β πππ sin π0
β’ For dual quaternion πͺ = πͺ0 + ππͺπ :
β’ Norm πͺ = πͺβ πͺ = πͺ0 + ππͺ0,πͺπ
πͺ0
β’ Inverse πͺβ1 = πͺβ
πͺ 2
β’ Unit dual quaternion satisfies πͺ = 1β’ βΊ πͺ0 = 1 & πͺ0, πͺπ = 0
28
Dot product as 4D vectors
Easily derived by combining usual
arithmetic rules with new rule π2 = 0
From Taylor expansion
Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08]
Rigid transformation using dual quaternion
β’ Unit dual quaternion representing rigid motion of
translation π = π‘π₯ , π‘π¦ , π‘π§ and rotation πͺ0 (unit quaternion) :
πͺ = πͺ0 +π
2 ππͺ0
β’ Rigid transformation of 3D position π― = π£π₯ , π£π¦ , π£π§ using unit dual quaternion πͺ :
πͺ 1 + ππ― πͺβ = 1 + ππ―β²
β’ π―β² : 3D position after transformation
29
Note: 3D vector is considered as
quaternion with zero real part
Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08]
Rigid transformation using dual quaternion
β’ πͺ = πͺ0 +π
2 ππͺ0
β’ πͺ 1 + ππ― πͺβ = πͺ0 +π
2 ππͺ0 1 + ππ― πͺ0
β +π
2πͺ0
β π
= πͺ0 +π
2 ππͺ0 πͺ0
β + ππ―πͺ0β +
π
2πͺ0
β π
= πͺ0πͺ0β +
π
2 ππͺ0πͺ0
β + ππͺ0π―πͺ0β +
π
2πͺ0πͺ0
β π
= 1 + π π + πͺ0π―πͺ0β
30
0 + π πͺ0
β= πͺ0
β 0 + πβ
= βπͺ0β π
πͺ02 = 1
3D position π― rotated by quaternion πͺ0
Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08]
Rigid transformation as βscrew motionβ
β’ Any rigid motion is uniquely described as screw motionβ’ (Up to antipodality)
31
Conventional notion: rotation + translation Screw motion
Axis direction
Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08]
Screw motion & dual quaternion
β’ Unit dual quaternion πͺ can be written as:
πͺ = cos π
2+ π¬ sin
π
2β’ π = π0 + πππ π0, ππ : real number
β’ π¬ = π¬0 + ππ¬π π¬0, π¬π : unit 3D vector
β’ Geometric meaningβ’ π¬0 : direction of rotation axis
β’ π0 : amount of rotation
β’ ππ : amount of translation parallel to π¬0
β’ π¬π : when rotation axis passes through π«,it satisfies π¬π = π« Γ π¬0
32Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08]
Interpolating two rigid transformations
β’ Linear interpolation + normalization (nlerp)
nlerp πͺ1, πͺ2, π‘ β1βπ‘ πͺ1+π‘ πͺ2
1βπ‘ πͺ1+π‘ πͺ2
β’ Note: πͺ & β πͺ represent same transformation with opposite path
β’ If 4D dot product of non-dual components of πͺ1 & πͺ2 is negative, use β πͺ2 in the interpolation
33
Blending rigid motions using dual quaternion
blend π€1, πͺ1 , π€2, πͺ2 , β¦ βπ€1 πͺ1 + π€2 πͺ2 + β―
π€1 πͺ1 + π€2 πͺ2 + β―
β’ Akin to blending rotations using quaternion
β’ Same input format as LBS & low computational cost
β’ Standard feature in many commercial CG packages
34Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08]
Artifact of DQS: βbulgingβ effect
β’ Produces ball-like shape around the joint when bended
35
LBS DQS
Elasticity-Inspired Deformers for Character Articulation [Kavan SIGGRAPHAsia12]
Bulging-free dual quaternion skinning [Kim CASA14]
Overcoming DQSβs drawback
36
Decompose transformation into bend & twist,
interpolate them separately [Kavan12]
Elasticity-Inspired Deformers for Character Articulation [Kavan SIGGRAPHAsia12]
Bulging-free dual quaternion skinning [Kim CASA14]
LBS DQS [Kavan12]
After deforming using DQS,
offset vertices along normals [Kim14]
LBS DQS [Kavan12]
Limitation of DQS: Cannot represent rotation by more than 360Β°
37Differential Blending for Sketch-based Expressive Posing [Oztireli SCA13]
Skinning for avoiding self-intersections
β’ Make use of implicit functions
38Implicit Skinning; Real-Time Skin Deformation with Contact Modeling [Vaillant SIGGRAPH13]
https://www.youtube.com/watch?v=RHySGIqEgyk
Other deformation mechanisms than skinning
39Bounded Biharmonic Weights for Real-Time Deformation [Jacobson SIGGRAPH11]
https://www.youtube.com/watch?v=P9fqm8vgdB8
Unified point/cage/skeleton handles [Jacobson 11]
https://www.youtube.com/watch?v=BFPAIU8hwQ4
BlendShape
References
β’ http://en.wikipedia.org/wiki/Motion_capture
β’ http://skinning.org/
β’ http://mukai-lab.org/category/library/legacy
40