Introduction to Computer Graphics – Animation (1) – July 2, 2020 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 ( F orward K inematics) • Deeply related to robotics 3
I nverse K inematics • 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] 5 https://mukai-lab.org/content/CcdParticleInverseKinematics.pdf
IK minimizing elastic energy https://www.youtube.com/watch?v=PRcXy2LjI9I 6 Fast Automatic Skinning Transformations [Jacobson SIGGRAPH12]
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=zXDuyMtzunA 9
Mocap designed for outdoor scene https://www.youtube.com/watch?v=xbI-NWMfGPs 10 Motion Capture from Body-Mounted Cameras [Shiratori SIGGRAPH11]
Mocap by drone tracking https://www.youtube.com/watch?v=iSJY-vHDmHQ 11 Flycon: real-time environment-independent multi-view human pose estimation with aerial vehicles [Nageli SIGGRAPHAsia18]
Motion database • http://mocap.cs.cmu.edu/ • 6 categories, 2605 in total • Free for research purposes • Interpolation, recombination, analysis, search, etc. 12
Recombining motions • Allow transition from one motion to another if poses are similar in certain frame 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 13
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=pgaEE27nsQw 14 Flexible Muscle-Based Locomotion for Bipedal Creatures [Geijtenbeek et al. SIGGRAPH Asia 2013]
Creating poses using special devices https://www.youtube.com/watch?v=vBX47JamMN0 Tangible and Modular Input Device for Character Articulation [Jacobson SIGGRAPH14] 15 Rig Animation with a Tangible and Modular Input Device [Glauser SIGGRAPH16]
Many topics about character motion Interaction between Grasping motion multiple persons https://www.youtube.com/ https://www.youtube.com/w watch?v=x8c27XYTLTo atch?v=1S_6wSKI_nU Crowd simulation Path planning https://www.youtube.com/ https://vimeo.com/33409868 watch?v=pqBSNAOsMDc 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] 16 Space-Time Planning with Parameterized Locomotion Controllers.[Levine TOG11]
Skinning 17
18
19
20
21
" = blend 𝐰 ! 𝑥 !,$ , 𝐔 $ , 𝑥 !,% , 𝐔 % , … 𝐰 ! • 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 transformations 22
Simple way to define weights: painting https://www.youtube.com/watch?v=TACB6bX8SN0 23
Better UI for manual weight editing https://www.youtube.com/watch?v=mfEP8BlXTgQ 24 Spline Interface for Intuitive Skinning Weight Editing [Bang,Lee,TOG18]
Automatic weight computation • Define weight 𝑥 ! as a smooth scalar field that takes 1 on the j-th bone and 0 on the other bones # 𝑒𝐵 [Baran 07] • Minimize 1 st -order derivative ∫ 𝛼𝑥 ! " • Approximate solution only on surface è easy & fast # 𝑒𝐵 [Jacobson 11] • Minimize 2 nd -order derivative ∫ " Δ𝑥 ! • Introduce inequality constraints 0 ≤ 𝑥 " ≤ 1 • Quadratic Programming over the volume è high-quality Teddy/Pinocchio demo Automatic rigging and animation of 3d characters [Baran SIGGRAPH07] 25 Bounded Biharmonic Weights for Real-Time Deformation [Jacobson SIGGRAPH11]
Simple way to blend transformations: L inear B lend S kinning • Represent rigid transformation 𝐔 ! as a 3 × 4 matrix consisting of rotation matrix 𝐒 ! ∈ ℝ $×$ and translation vector 𝐮 ! ∈ ℝ $ 𝐰 & ' = 𝐰 & . 𝑥 &,! 𝐒 ! 𝐮 ! 1 ! • Simple and fast • Implemented using vertex shader: send 𝐰 ! & 𝑥 !," to GPU at initialization, send 𝐔 " to GPU at each frame • Standard method 26
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 27
Alternative to LBS: D ual Q uaternion S kinning 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) 28
Dual number & dual quaternion • Dual number • Introduce dual unit 𝜁 & its arithmetic rule 𝜁 % = 0 (cf. imaginary unit 𝑗 ) • Dual number is sum of primal & dual components: 𝑏 ≔ 𝑏 3 + 𝜁𝑏 4 5 𝑏 ! , 𝑏 " ∈ ℝ ) • Dual conjugate: 𝑏 = 𝑏 ! + 𝜁𝑏 " = 𝑏 ! − 𝜁𝑏 " * • Dual quaternion • Quaternion whose elements are dual numbers • Can be written using two quaternions 0 𝐫 ≔ 𝐫 3 + 𝜁𝐫 4 0 1 • Dual conjugate: 𝐫 = 𝐫 ! + 𝜁𝐫 " = 𝐫 ! − 𝜁𝐫 " 𝐫 ∗ = 𝐫 ! + 𝜁𝐫 " ∗ = 𝐫 ! ∗ + 𝜁𝐫 " ∗ • Quaternion conjugate: 1 29 Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08]
Arithmetic rules for dual number/quaternion • For dual number 5 𝑏 = 𝑏 3 + 𝜁𝑏 4 : ( = & & ( ! − 𝜁 ( " • Reciprocal Easily derived by combining usual # ' ( ! arithmetic rules with new rule 𝜁 ! = 0 ( " • Square root 𝑏 = 0 𝑏 ) + 𝜁 % ( ! • Trigonometric sin 0 𝑏 = sin 𝑏 ) + 𝜁𝑏 * cos 𝑏 ) From Taylor expansion cos 0 𝑏 = cos 𝑏 ) − 𝜁𝑏 * sin 𝑏 ) • For dual quaternion 0 𝐫 = 𝐫 3 + 𝜁𝐫 4 : Dot product as 4D vectors 𝐫 ) + 𝜁 𝐫 ! ,𝐫 " 𝐫 ∗ 8 8 8 • Norm 𝐫 = 𝐫 = 𝐫 ! 𝐫 ∗ 𝐫 -& = . • Inverse 8 𝐫 # . • Unit dual quaternion satisfies 8 𝐫 = 1 • ⟺ ⟺ 𝐫 ! = 1 & 𝐫 ! , 𝐫 " = 0 30 Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08]
Rigid transformation using dual quaternion • Unit dual quaternion representing rigid motion of translation ⃗ 𝐮 = 𝑢 ; , 𝑢 < , 𝑢 = and rotation 𝐫 3 (unit quaternion) : 𝐫 = 𝐫 3 + 𝜁 Note: 3D vector is considered as 2 ⃗ 0 𝐮𝐫 3 quaternion with zero real part • Rigid transformation of 3D position 𝐰 = 𝑤 ; , 𝑤 < , 𝑤 = using unit dual quaternion 0 𝐫 : 𝐫 ∗ = 1 + 𝜁𝐰 ' 𝐫 1 + 𝜁𝐰 0 0 • 𝐰 $ : 3D position after transformation 31 Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08]
Rigid transformation using dual quaternion 𝐫 = 𝐫 ) + * % ⃗ • 8 𝐮𝐫 ) ∗ 𝐫 ∗ = 𝐫 ) + * 𝐫 ) + * % ⃗ % ⃗ • 8 𝐫 1 + 𝜁𝐰 8 𝐮𝐫 ) 1 + 𝜁𝐰 𝐮𝐫 ) ∗ = 𝐫 " ∗ ∗ ⃗ ⃗ 𝐮𝐫 " 𝐮 = 𝐫 " + 𝜁 ∗ + 𝜁 ∗ 2 ⃗ ⃗ 𝐮𝐫 " 1 + 𝜁𝐰 𝐫 " 𝐮𝐫 " ∗ ⃗ = −𝐫 " 𝐮 2 = 𝐫 " + 𝜁 ∗ − 𝜁 ∗ ⃗ 2 ⃗ 𝐮𝐫 " 1 + 𝜁𝐰 𝐫 " 2 𝐫 " 𝐮 = 𝐫 " + 𝜁 ∗ + 𝜁 ∗ ⃗ 2 ⃗ 𝐮𝐫 " 1 + 𝜁𝐰 𝐫 " 2 𝐫 " 𝐮 0 𝐮 + 𝜁 ! = 𝐫 " + 𝜁 ∗ + 𝜁 ∗ + 𝜁𝐰𝐫 " ∗ ⃗ ∗ ⃗ 2 ⃗ 𝐮𝐫 " 𝐫 " 2 𝐫 " 2 𝐰𝐫 " 𝐮 0 0 ∗ + 𝜁 ! 𝐮 + 𝜁 ! ∗ + 𝜁 ∗ + 𝜁 ∗ + 𝜁𝐫 " 𝐰𝐫 " ∗ ⃗ ∗ ⃗ ⃗ 2 ⃗ 4 ⃗ 𝐫 " ! = 1 = 𝐫 " 𝐫 " 𝐮𝐫 " 𝐫 " 𝐮𝐫 " 𝐰𝐫 " 2 𝐫 " 𝐫 " 𝐮𝐫 " 𝐫 " 𝐮 2 = 1 + 𝜁 ⃗ ∗ 𝐮 + 𝐫 ) 𝐰𝐫 ) 3D position 𝐰 rotated by quaternion 𝐫 " 32 Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08]
Recommend
More recommend