Introduction to Computer Graphics Animation (1) May 18, 2017 - - PowerPoint PPT Presentation

introduction to computer graphics animation 1
SMART_READER_LITE
LIVE PREVIEW

Introduction to Computer Graphics Animation (1) May 18, 2017 - - PowerPoint PPT Presentation

Introduction to Computer Graphics Animation (1) May 18, 2017 Kenshi Takayama Skeleton-based animation Simple Intuitive Low comp. cost https://www.youtube.com/watch?v=DsoNab58QVA 2 Representing a pose using skeleton Tree


slide-1
SLIDE 1

Introduction to Computer Graphics – Animation (1) –

May 18, 2017 Kenshi Takayama

slide-2
SLIDE 2

Skeleton-based animation

  • Simple
  • Intuitive
  • Low comp. cost

2

https://www.youtube.com/watch?v=DsoNab58QVA

slide-3
SLIDE 3

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

slide-4
SLIDE 4

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

slide-5
SLIDE 5

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

http://mukai-lab.org/wp-content/uploads/2014/04/CcdParticleInverseKinematics.pdf

slide-6
SLIDE 6

IK minimizing elastic energy

6

Fast Automatic Skinning Transformations [Jacobson SIGGRAPH12] https://www.youtube.com/watch?v=PRcXy2LjI9I

slide-7
SLIDE 7

Ways to obtain/measure motion data

7

slide-8
SLIDE 8

Optical motion capture

  • Put markers on the actor, record video from many viewpoints (~48)

8

https://www.youtube.com/watch?v=c6X64LhcUyQ from Wikipedia

slide-9
SLIDE 9

Mocap using inexpensive depth camera

9

https://www.youtube.com/watch?v=qC-fdgPJhQ8

slide-10
SLIDE 10

Mocap designed for outdoor scene

10

Motion Capture from Body-Mounted Cameras [Shiratori SIGGRAPH11] https://www.youtube.com/watch?v=xbI-NWMfGPs

slide-11
SLIDE 11

Motion database

  • http://mocap.cs.cmu.edu/
  • 6 categories, 2605 in total
  • Free for research purposes
  • Interpolation, recombination, analysis, search, etc.

11

slide-12
SLIDE 12

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 frame

slide-13
SLIDE 13

Generating motion through simulation

  • For creatures

unsuitable for mocap

  • Too dangerous,

nonexistent, ...

  • Natural motion

respecting body shape

  • Can interact with

dynamic environment

13

Generalizing Locomotion Style to New Animals With Inverse Optimal Regression [Wampler SIGGRAPH14] https://www.youtube.com/watch?v=KF_a1c7zytw

slide-14
SLIDE 14

Creating poses using special devices

14

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

slide-15
SLIDE 15

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

https://www.youtube.com/ watch?v=1S_6wSKI_nU https://www.youtube.com/ watch?v=pqBSNAOsMDc https://www.youtube.com/ watch?v=x8c27XYTLTo https://vimeo.com/33409868

slide-16
SLIDE 16

Skinning

16

slide-17
SLIDE 17

17

slide-18
SLIDE 18

18

slide-19
SLIDE 19

19

slide-20
SLIDE 20

20

slide-21
SLIDE 21

𝐰𝑗

′ = 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 transformations

21

slide-22
SLIDE 22

Simple way to define weights: painting

22

https://www.youtube.com/watch?v=TACB6bX8SN0

slide-23
SLIDE 23

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

23

Automatic rigging and animation of 3d characters [Baran SIGGRAPH07] Bounded Biharmonic Weights for Real-Time Deformation [Jacobson SIGGRAPH11]

Pinocchio demo

slide-24
SLIDE 24

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

slide-25
SLIDE 25

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

slide-26
SLIDE 26

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

slide-27
SLIDE 27

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

∗ + 𝜁𝐫𝜁 ∗

27

Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08]

𝐫 ≔ 𝐫0 + 𝜁𝐫𝜁 𝑏 ≔ 𝑏0 + 𝜁𝑏𝜁

𝑏0, 𝑏𝜁 ∈ ℝ

slide-28
SLIDE 28

Arithmetic rules for dual number/quaternion

  • For dual number

𝑏 = 𝑏0 + 𝜁𝑏𝜁 :

  • Reciprocal

1 𝑏 = 1 𝑏0 − 𝜁 𝑏𝜁 𝑏0

2

  • Square root

𝑏 = 𝑏0 + 𝜁

𝑏𝜁 2 𝑏0

  • Trigonometric

sin 𝑏 = sin 𝑏0 + 𝜁𝑏𝜁 cos 𝑏0 cos 𝑏 = 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]

slide-29
SLIDE 29

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]

slide-30
SLIDE 30

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

𝐮 𝐫0 2 = 1 3D position 𝐰 rotated by quaternion 𝐫0

Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08]

slide-31
SLIDE 31

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]

slide-32
SLIDE 32

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

32

Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08]

slide-33
SLIDE 33

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

slide-34
SLIDE 34

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

34

Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08]

slide-35
SLIDE 35

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]

slide-36
SLIDE 36

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,

  • ffset vertices along normals [Kim14]

LBS DQS [Kavan12]

slide-37
SLIDE 37

Limitation of DQS: Cannot represent rotation by more than 360°

37

Differential Blending for Sketch-based Expressive Posing [Oztireli SCA13]

slide-38
SLIDE 38

Skinning for avoiding self-intersections

  • Make use of implicit functions

38

Implicit Skinning; Real-Time Skin Deformation with Contact Modeling [Vaillant SIGGRAPH13]

https://www.youtube.com/watch?v=RHySGIqEgyk

slide-39
SLIDE 39

Other deformation mechanisms than skinning

39

Bounded 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

slide-40
SLIDE 40

References

  • http://en.wikipedia.org/wiki/Motion_capture
  • http://skinning.org/
  • http://mukai-lab.org/category/library/legacy

40