Introduction to Computer Graphics Animation (1) July 2, 2020 - - PowerPoint PPT Presentation

introduction to computer graphics animation 1
SMART_READER_LITE
LIVE PREVIEW

Introduction to Computer Graphics Animation (1) July 2, 2020 - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

Introduction to Computer Graphics – Animation (1) –

July 2, 2020 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

https://mukai-lab.org/content/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=zXDuyMtzunA

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

Mocap by drone tracking

11

Flycon: real-time environment-independent multi-view human pose estimation with aerial vehicles [Nageli SIGGRAPHAsia18]

https://www.youtube.com/watch?v=iSJY-vHDmHQ

slide-12
SLIDE 12

Motion database

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

12

slide-13
SLIDE 13

Recombining motions

  • Allow transition from one motion to another if

poses are similar in certain frame

13

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-14
SLIDE 14

Generating motion through simulation

  • For creatures unsuitable

for mocap

  • Too dangerous,

nonexistent, ...

  • Natural motion

respecting body shape

  • Can interact with

dynamic environment

14

Flexible Muscle-Based Locomotion for Bipedal Creatures [Geijtenbeek et al. SIGGRAPH Asia 2013] https://www.youtube.com/watch?v=pgaEE27nsQw

slide-15
SLIDE 15

Creating poses using special devices

15

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-16
SLIDE 16

Many topics about character motion

16

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/w atch?v=1S_6wSKI_nU https://www.youtube.com/ watch?v=pqBSNAOsMDc https://www.youtube.com/ watch?v=x8c27XYTLTo https://vimeo.com/33409868

slide-17
SLIDE 17

Skinning

17

slide-18
SLIDE 18

18

slide-19
SLIDE 19

19

slide-20
SLIDE 20

20

slide-21
SLIDE 21

21

slide-22
SLIDE 22

𝐰!

" = 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

slide-23
SLIDE 23

Simple way to define weights: painting

23

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

slide-24
SLIDE 24

Better UI for manual weight editing

24

Spline Interface for Intuitive Skinning Weight Editing [Bang,Lee,TOG18]

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

slide-25
SLIDE 25

Automatic weight computation

  • Define weight 𝑥

! as a smooth scalar field that takes 1 on the j-th bone and 0

  • n the other bones
  • Minimize 1st-order derivative ∫

"

𝛼𝑥

! #𝑒𝐵 [Baran 07]

  • Approximate solution only on surface è easy & fast
  • Minimize 2nd-order derivative ∫

" Δ𝑥 ! #𝑒𝐵 [Jacobson 11]

  • Introduce inequality constraints 0 ≤ 𝑥

" ≤ 1

  • Quadratic Programming over the volume è high-quality

25

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

Teddy/Pinocchio demo

slide-26
SLIDE 26

Simple way to blend transformations: Linear Blend Skinning

  • 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

slide-27
SLIDE 27

Artifact of LBS: ”candy wrapper” effect

  • Linear combination of rigid transformation is

not a rigid transformation!

  • Points around joint concentrate when twisted

27

Initial shape & two bones Twist one bone Deformation using LBS

slide-28
SLIDE 28

Alternative to LBS: Dual Quaternion Skinning

  • Idea
  • Quaternion (four numbers) è 3D rotation
  • Dual quaternion (two quaternions) è 3D rigid motion (rotation + translation)

28

Initial shape & two bones Deformation using LBS Deformation using DQS

slide-29
SLIDE 29

Dual number & dual quaternion

  • Dual number
  • Introduce dual unit 𝜁 & its arithmetic rule 𝜁% = 0 (cf. imaginary unit 𝑗)
  • Dual number is sum of primal & dual components:
  • Dual conjugate:

) * 𝑏 = 𝑏! + 𝜁𝑏" = 𝑏! − 𝜁𝑏"

  • Dual quaternion
  • Quaternion whose elements are dual numbers
  • Can be written using two quaternions
  • Dual conjugate:

1 𝐫 = 𝐫! + 𝜁𝐫" = 𝐫! − 𝜁𝐫"

  • Quaternion conjugate:

1 𝐫∗ = 𝐫! + 𝜁𝐫" ∗ = 𝐫!

∗ + 𝜁𝐫" ∗

29

Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08]

𝐫 ≔ 𝐫3 + 𝜁𝐫4 5 𝑏 ≔ 𝑏3 + 𝜁𝑏4

𝑏!, 𝑏" ∈ ℝ

slide-30
SLIDE 30

Arithmetic rules for dual number/quaternion

  • For dual number 5

𝑏 = 𝑏3 + 𝜁𝑏4 :

  • Reciprocal

& ' ( = & (! − 𝜁 (" (!

#

  • Square root

𝑏 = 𝑏) + 𝜁

(" % (!

  • Trigonometric

sin 0 𝑏 = sin 𝑏) + 𝜁𝑏* cos 𝑏) cos 0 𝑏 = cos 𝑏) − 𝜁𝑏* sin 𝑏)

  • For dual quaternion 0

𝐫 = 𝐫3 + 𝜁𝐫4 :

  • Norm

8 𝐫 = 8 𝐫∗8 𝐫 = 𝐫) + 𝜁 𝐫!,𝐫"

𝐫!

  • Inverse

8 𝐫-& =

. 𝐫∗ . 𝐫 #

  • Unit dual quaternion satisfies 8

𝐫 = 1

⟺ 𝐫! = 1 & 𝐫!, 𝐫" = 0

30

Dot product as 4D vectors

Easily derived by combining usual arithmetic rules with new rule 𝜁! = 0 From Taylor expansion

Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08]

slide-31
SLIDE 31

Rigid transformation using dual quaternion

  • Unit dual quaternion representing rigid motion of

translation ⃗ 𝐮 = 𝑢;, 𝑢<, 𝑢= and rotation 𝐫3 (unit quaternion) : 𝐫 = 𝐫3 + 𝜁 2 ⃗ 𝐮𝐫3

  • Rigid transformation of 3D position 𝐰 = 𝑤;, 𝑤<, 𝑤= using

unit dual quaternion 0 𝐫 : 𝐫 1 + 𝜁𝐰 0 𝐫∗ = 1 + 𝜁𝐰'

  • 𝐰$ : 3D position after transformation

31

Note: 3D vector is considered as quaternion with zero real part

Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08]

slide-32
SLIDE 32

Rigid transformation using dual quaternion

  • 8

𝐫 = 𝐫) + *

% ⃗

𝐮𝐫)

  • 8

𝐫 1 + 𝜁𝐰 8 𝐫∗ = 𝐫) + *

% ⃗

𝐮𝐫) 1 + 𝜁𝐰 𝐫) + *

% ⃗

𝐮𝐫)

32

⃗ 𝐮𝐫"

∗ = 𝐫" ∗ ⃗

𝐮

= −𝐫"

∗ ⃗

𝐮

Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08]

= 𝐫" + 𝜁 2 ⃗ 𝐮𝐫" 1 + 𝜁𝐰 𝐫"

∗ + 𝜁

2 ⃗ 𝐮𝐫"

= 𝐫" + 𝜁 2 ⃗ 𝐮𝐫" 1 + 𝜁𝐰 𝐫"

∗ − 𝜁

2 𝐫"

∗ ⃗

𝐮 = 𝐫" + 𝜁 2 ⃗ 𝐮𝐫" 1 + 𝜁𝐰 𝐫"

∗ + 𝜁

2 𝐫"

∗ ⃗

𝐮 = 𝐫" + 𝜁 2 ⃗ 𝐮𝐫" 𝐫"

∗ + 𝜁𝐰𝐫" ∗ + 𝜁

2 𝐫"

∗ ⃗

𝐮 + 𝜁! 2 𝐰𝐫"

∗ ⃗

𝐮 = 𝐫"𝐫"

∗ + 𝜁

2 ⃗ 𝐮𝐫"𝐫"

∗ + 𝜁𝐫"𝐰𝐫" ∗ + 𝜁!

2 ⃗ 𝐮𝐫"𝐰𝐫"

∗ + 𝜁

2 𝐫"𝐫"

∗ ⃗

𝐮 + 𝜁! 4 ⃗ 𝐮𝐫"𝐫"

∗ ⃗

𝐮

= 1 + 𝜁 ⃗ 𝐮 + 𝐫)𝐰𝐫)

∗ 𝐫" ! = 1 3D position 𝐰 rotated by quaternion 𝐫"

slide-33
SLIDE 33

Rigid transformation as “screw motion”

  • Any rigid motion is uniquely described as screw motion
  • (Up to antipodality)

33

Conventional notion: rotation + translation Screw motion Axis direction

Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08]

slide-34
SLIDE 34

Screw motion & dual quaternion

  • Unit dual quaternion 0

𝐫 can be written as: 𝐫 = cos ? 𝜄 2 + 5 𝐭 sin ? 𝜄 2

  • <

𝜄 = 𝜄) + 𝜁𝜄*

𝜄!, 𝜄" : real number

𝐭 = 𝐭) + 𝜁𝐭*

𝐭!, 𝐭" : unit 3D vector

  • Geometric meaning
  • 𝐭) : direction of rotation axis
  • 𝜄) : amount of rotation
  • 𝜄* : amount of translation parallel to 𝐭)
  • 𝐭* : when rotation axis passes through ⃗

𝐬, it satisfies 𝐭* = ⃗ 𝐬×𝐭)

34

Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08]

slide-35
SLIDE 35

Interpolating two rigid transformations

  • Linear interpolation + normalization (nlerp)

nlerp 0 𝐫A, 0 𝐫#, 𝑢 ≔

ABC 1 𝐫!DC1 𝐫" ABC 1 𝐫!DC1 𝐫"

  • Note: 0

𝐫 & −0 𝐫 represent same transformation with opposite path

  • If 4D dot product of non-dual

components of 0 𝐫A & 0 𝐫# is negative, use −0 𝐫# in the interpolation

35

slide-36
SLIDE 36

Blending rigid motions using dual quaternion

blend 𝑥A, 0 𝐫A , 𝑥#, 0 𝐫# , … ≔ 𝑥A0 𝐫A + 𝑥#0 𝐫# + ⋯ 𝑥A0 𝐫A + 𝑥#0 𝐫# + ⋯

  • Akin to blending rotations using quaternion
  • Same input format as LBS & low computational cost
  • Standard feature in many

commercial CG packages

36

Geometric Skinning with Approximate Dual Quaternion Blending [Kavan TOG08]

slide-37
SLIDE 37

Artifact of DQS: ”bulging” effect

  • Produces ball-like shape around the joint when bended

37

LBS DQS

Elasticity-Inspired Deformers for Character Articulation [Kavan SIGGRAPHAsia12] Bulging-free dual quaternion skinning [Kim CASA14]

slide-38
SLIDE 38

Overcoming DQS’s drawback

38

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-39
SLIDE 39

Skinning for avoiding self-intersections

  • Make use of implicit functions

39

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

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

slide-40
SLIDE 40

Other deformation mechanisms than skinning

40

Bounded Biharmonic Weights for Real-Time Deformation [Jacobson SIGGRAPH11]

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

Unified point/cage/skeleton handles [Jacobson 11] BlendShape

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

slide-41
SLIDE 41

References

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

41