Motion Capture and Animation (01) RNDr. Martin Madaras, PhD. - - PowerPoint PPT Presentation

motion capture and animation 01
SMART_READER_LITE
LIVE PREVIEW

Motion Capture and Animation (01) RNDr. Martin Madaras, PhD. - - PowerPoint PPT Presentation

Virtual and Augmented Reality Motion Capture and Animation (01) RNDr. Martin Madaras, PhD. madaras@skeletex.xyz Outline Principles of animation Keyframe animation Articulated figures Skeletal animation Motion capture


slide-1
SLIDE 1

Virtual and Augmented Reality

Motion Capture and Animation (01)

  • RNDr. Martin Madaras, PhD.

madaras@skeletex.xyz

slide-2
SLIDE 2

Outline

2

 Principles of animation  Keyframe animation  Articulated figures  Skeletal animation  Motion capture  Projects…

slide-3
SLIDE 3

3

  • Ask questions, please!!!
  • Be communicative
  • www.slido.com #VAR01
  • More active you are, the better for you!

How the lectures should look like #1

slide-4
SLIDE 4

Manual animation

4

 Stop-motion animation  e.g. Coraline, Wallace & Gromit, etc.

slide-5
SLIDE 5

Computer Animation

5

 What is animation?

 Make objects change over time according to scripted actions

 What is simulation?

 Predict how object change over time according to physical laws

slide-6
SLIDE 6

Computer Animation

6

 Animation pipeline

 3D Modeling  Articulation  Motion specification  Motion simulation  Shading  Lighting  Rendering  Postprocessing

slide-7
SLIDE 7

Keyframe Animation

7

 Define character poses at specific time steps called

“keyframes”

slide-8
SLIDE 8

Inbetweening (“tweening”)

8

 Computing missing values based on existing surrounding

values

45

slide-9
SLIDE 9

Inbetweening (“tweening”)

9

 Linear (constant)  Ease-in, ease-out

slide-10
SLIDE 10

Keyframe Animation

10

 Inbetweening:

 Linear interpolation – usually not enough continuity

slide-11
SLIDE 11

Spline Continuity

11

 How to ensure curves are “smooth”  Generally we have three levels of continuity  C0 - The curves meet  C0 & C1 - The tangents are shared  C0 & C1 & C2 - The “speed” is the same

slide-12
SLIDE 12

C0 Continuity

12

 Zero order parametric continuity

slide-13
SLIDE 13

C0 & C1 Continuity

13

 First order parametric continuity

slide-14
SLIDE 14

C0 & C1 & C2 Continuity

14

 Second order parametric continuity

slide-15
SLIDE 15

Implications for animation

15

 Linear interpolation is only C0

 Movement changes instantly at keyframes  Very unnatural looking

 We need at least C0 & C1 continuity

 Hermite interpolation  Spline interpolation  “Smoothstep” function

slide-16
SLIDE 16

Smoothstep

16

slide-17
SLIDE 17

Smoothstep

17

float smootherstep(float edge0, float edge1, float x) { // Scale, and clamp x to 0..1 range x = clamp((x - edge0)/(edge1 - edge0), 0.0, 1.0); // Evaluate polynomial return x*x*x*(x*(x*6 - 15) + 10); }

slide-18
SLIDE 18

Keyframe Animation

18

 Inbetweening:

 Spline interpolation – may be visually good enough  May not follow physical laws

slide-19
SLIDE 19

Keyframe Animation

19

 Inbetweening:

 Inverse kinematics or dynamics

slide-20
SLIDE 20

Articulated Figures

20

 Character poses described by set of rigid bodies

connected by “joints”

slide-21
SLIDE 21

Articulated Figures

21

 Well suited for humanoid characters

slide-22
SLIDE 22

Keyframe Animation

22

 Inbetweening:

 Compute angles between keyframes

slide-23
SLIDE 23

Example: Walk Cycle

23

 Inbetweening:

 Compute angles between keyframes

slide-24
SLIDE 24

Example: Walk Cycle

24

 Hip joint orientation

slide-25
SLIDE 25

Example: Walk Cycle

25

 Knee joint orientation

slide-26
SLIDE 26

Example: Walk Cycle

26

 Ankle joint orientation

slide-27
SLIDE 27

Animation Hierarchies

27

 Animate objects in relation to their parent

 Sun matrix is Ms  Earth matrix is MsMe  Moon matrix is MsMeMm

slide-28
SLIDE 28

Kinematics and Dynamics

28

 Kinematics

 Considers only motion  Determined by positions, velocities, accelerations

 Dynamics

 Considers underlaying forces  Capture motion from initial positions and physics

slide-29
SLIDE 29

Example: 2-Link Structure

29

 Two links connected by rotational joints

slide-30
SLIDE 30

Forward Kinematics

30

 Animators specifies angles Θ1 and Θ2  Computer finds position of end effector: X

slide-31
SLIDE 31

Forward Kinematics

31

 Joint motion can be specified by spline curves

Joint motion can be specified by spline curves

slide-32
SLIDE 32

Forward Kinematics

32

 Joint motions can be specified by initial conditions

Joint motion can be specified by spline curves

slide-33
SLIDE 33

Example: 2-Link Structure

33

 What if animator knows position of “end effector”

slide-34
SLIDE 34

Inverse Kinematics

34

 Animator specifies end effector positions: X  Computer finds joint angles Θ1 and Θ2

slide-35
SLIDE 35

Inverse Kinematics

35

 End-effector positions can be specified by splines

slide-36
SLIDE 36

Inverse Kinematics

36

 Problem with more complex structures

 System with equation is usually under-defined  Multiple solutions

slide-37
SLIDE 37

Inverse Kinematics

37

 Solution for more complex structures

 Find best solution (eg. minimize energy in motion)  Non-linear optimization

slide-38
SLIDE 38

Inverse Kinematics

38

 Forward Kinematics

 Specify conditions (joint angles)  Compute conditions of end effectors

 Inverse Kinematics

 “Goal-directed” motion  Specify goal positions of end effectors  Compute conditions required to achieve goal

slide-39
SLIDE 39

39

Character Animation (Linear Blend Skinning) (Skeletal Animation)

slide-40
SLIDE 40

Skeletal Animation

40

 Hierarchical graph structure called Skeleton

 Nodes and edges (bones)

slide-41
SLIDE 41

Skeletal Animation

41

 Graph structure can be disconnected in space

slide-42
SLIDE 42

Real-time skeletal skinning

42

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

slide-43
SLIDE 43

Facial animation

43

 Facial expressions  Lips to speech synchronization  Controllers  Skinning  Morphing

http://www.anzovin.com/products/tfm1maya.html

slide-44
SLIDE 44

Reusable animation

44

 One skeleton – different models

http://www.studiopendulum.com/alterego/

slide-45
SLIDE 45

Motion capture

45

 Markers on actor’s body  Optical / magnetic sensors  3D reconstruction of markers’ position  Motion mapping

to virtual character

slide-46
SLIDE 46

Outline

46

 Principles of animation  Keyframe animation  Articulated figures  Skeletal animation  Motion capture  Projects…

slide-47
SLIDE 47

47

  • Ask questions, please!!!
  • Be communicative
  • www.slido.com #VAR01
  • More active you are, the better for you!

How the lectures should look like #2

slide-48
SLIDE 48

Motion Capture

48

 Capturing of actor’s movement  Natural animation of CG characters

slide-49
SLIDE 49

Optical Mocap

49

 Estimation of marker positions

slide-50
SLIDE 50

Optical Mocap Problems

50

 Complicated setup  Problems with occlusions  Limited space

slide-51
SLIDE 51

Inertial Mocap

51

 Inertial Measurement Unit  Bone rotations from IMU sensors

slide-52
SLIDE 52

Mocap Suit Problems

52

 Custom implementation of walking algorithm  Inaccurate for sliding, complex jumping etc.  Recalibration needed over time

slide-53
SLIDE 53

Mocap Walking Algorithm

53

slide-54
SLIDE 54

Walking Algorithm Fail-Case

54

slide-55
SLIDE 55

Optinertial

55

Optical-Inertial Synchronization of MoCap Suit with Single Camera Setup for Reliable Position Tracking VISIGRAPP 2018 (Adam Riečický, Martin Madaras, Michal Piovarči)

slide-56
SLIDE 56

Motivation

56

 Combine optical and inertial data  Use camera image to find the actor in the scene  Use data streamed from the mocap suit

slide-57
SLIDE 57

Main Idea

57

 Synchronize inertial mocap suit and camera data

 Suit joint rotations  Camera-based position estimation

 Overcome disadvantage of each method  Get reliable position tracking and mocap rotations  How to merge and synchronize the data ?

slide-58
SLIDE 58

58

Related work

slide-59
SLIDE 59

RGB Camera-based Mocap / Tracking

59

 Multi-view RGB – sum of spatial Gaussians

 Cheung et al. 2003  Stoll et al. 2011

 RGB camera probabilistic methods

 Wojek et al. 2009

 Optical flow + Chamfer matching

 Dimitrijevic et al. 2006  Katz and Aghajan 2008

slide-60
SLIDE 60

Related Hybrid Methods

60

 Laser scanner + robot + IMUs

 Ziegler et al. 2011

 Template-based + IMUs + RGB cameras

 Pons-Moll et al. 2017  von Marcard et al. 2016

 Depth camera +IMUs + template

 Helten et al. 2013

slide-61
SLIDE 61

Related Work Problems

61

 Mesh templates  Depth cameras  Multiple RGB cameras  Complicated setup  Position estimation only  Our Optinertial system needs only RGB or

monochromatic camera and the suit data

slide-62
SLIDE 62

62

Optical-Inertial Synchronization

slide-63
SLIDE 63

Our Idea

63

slide-64
SLIDE 64

Optinertial Pipeline

64

 Chamfer matching

slide-65
SLIDE 65

Actor Image

65

 Distance transform image  Background subtraction / contrast suit color

slide-66
SLIDE 66

Optinertial Pipeline

66

 Template image rendering

slide-67
SLIDE 67

Mocap Suits

67

 High number of IMUs vs. affordable price

slide-68
SLIDE 68

Virtual Scene

68

 Real-time update of the virtual scene  Frame rendering  Camera calibration / pose estimation

slide-69
SLIDE 69

Camera Calibration

69

 OpenCV ChArUco board  Estimation of origin/camera position in world space

slide-70
SLIDE 70

Base-mesh Rendering

70

 SQM algorithm (skeleton, radii)

 Baerentzen et al. 2012

slide-71
SLIDE 71

Base-mesh Rendering

71

 Actor image database  Skinning of base-mesh

slide-72
SLIDE 72

Optinertial Pipeline

72

 Minimizing DT for the best match

slide-73
SLIDE 73

Actor Movement Detection

73

 Find the best match for actor shift vector  Distance transform minimization

slide-74
SLIDE 74

Image-space Optimization

74

 Silhouette + kernel integration

slide-75
SLIDE 75

Optimization Implementation

75

 Parallel matrix multiplication on GPU  The best match gives the actor motion vector

slide-76
SLIDE 76

Optinertial Pipeline

76

 Skeleton root translation

slide-77
SLIDE 77

Results - Video

77

slide-78
SLIDE 78

78

Evaluation

slide-79
SLIDE 79

Evaluation Scene

79

 HTC Vive ground truth tracking

slide-80
SLIDE 80

Evaluation Paths

80

slide-81
SLIDE 81

Data Smoothing

81

 Post-processing  Gaussian filtering

slide-82
SLIDE 82

Results - Error

82

 Suit walking algorithm vs. our approach

slide-83
SLIDE 83

Results – Visualization

83

 Sliding sequence

slide-84
SLIDE 84

Conclusion

84

 Optical-inertial tracking and motion capture  Monochromatic camera only  Solid position estimation during jumping and sliding  Our method may produce noisy results, however it can

be improved using Gaussian filtering

slide-85
SLIDE 85

Limitations

85

 Camera occlusions are still problem  Fails if subject is too close to camera  Cannot run real-time for higher database sampling

slide-86
SLIDE 86

Inertial + Optical Mocap

86

Capturing of Movement During Music Performance Bachelor thesis 2018

  • Bc. Dana Škorvánková
slide-87
SLIDE 87

Goals

  • Implement a framework for

inertial motion capture – forearms, hands, fingers captured while playing the guitar

  • Apply the captured motion on

a 3D humanoid character

  • Synchronization with optical

mocap – 3D camera

87

slide-88
SLIDE 88

Technologies

88

 HTC Vive tracker  3D camera by Photoneo Motion capture glove by

Synertial

slide-89
SLIDE 89

Process

 Kinexact

Hand (calibration tool)

 Optical + inertial data synchronization  Datasets recording  Merging BVH files Updating structures Inertial data streamer Attaching hands to full- body animation

89

slide-90
SLIDE 90

 Calibration of the

performer‘s hand skeleton

 C++  Update –

compatibility with new structures (representing skeleton – new organization of the skeletal nodes)

Kinexact Hand – calibration tool

root node in-hand nodes

90

slide-91
SLIDE 91

Recording datasets

Glove setup

91

slide-92
SLIDE 92

Glove + Vive tracker

data visualization

92

slide-93
SLIDE 93

Optical + inertial data

Optical data

PhoXi 3D camera by Photoneo

Inertial data

Motion capture glove by Synertial

PhoXi Streamer app

C++

added glove data streaming

Pointcloud + skeleton + BVH

In each frame

skeleton format ?

93

slide-94
SLIDE 94

Optical + inertial data

In each frame generating

  • model pointcloud
  • skeleton pointcloud

+ BVH file (the entire dataset)

94

slide-95
SLIDE 95

Optical + inertial data

Reality

MoCap glove

60 fps

PhoXi 3D camera

  • ca. 10 fps

(relative to PC performance)

Synchronization not stable

=> Potential future work

95

slide-96
SLIDE 96

Captured by PhoXi 3D camera by PhotoNeo

Pointcloud generation

96

slide-97
SLIDE 97

Before & after

attaching hands to body skeleton

97

slide-98
SLIDE 98

98

Acknowledgements

 Thanks to all the people, whose work is shown here and whose

slides were used as a material for creation of these slides:

Matej Novotný, GSVM lectures at FMFI UK Peter Drahoš, PPGSO lectures at FIIT STU Output of all the publications and great team work Very best data from 3D cameras

slide-99
SLIDE 99

99

www.skeletex.xyz madaras@skeletex.xyz

Questions ?!