motion capture and animation 01
play

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


  1. Virtual and Augmented Reality Motion Capture and Animation (01) RNDr. Martin Madaras, PhD. madaras@skeletex.xyz

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

  3. How the lectures should look like #1 Ask questions, please!!! - Be communicative - www.slido.com #VAR01 - More active you are, the better for you! - 3

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

  5. Computer Animation  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 5

  6. Computer Animation  Animation pipeline  3D Modeling  Articulation  Motion specification  Motion simulation  Shading  Lighting  Rendering  Postprocessing 6

  7. Keyframe Animation  Define character poses at specific time steps called “keyframes” 7

  8. Inbetweening (“ tweening ”)  Computing missing values based on existing surrounding values 45 0 8

  9. Inbetweening (“ tweening ”)  Linear (constant)  Ease-in, ease-out 9

  10. Keyframe Animation  Inbetweening:  Linear interpolation – usually not enough continuity 10

  11. Spline Continuity  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 11

  12. C0 Continuity  Zero order parametric continuity 12

  13. C0 & C1 Continuity  First order parametric continuity 13

  14. C0 & C1 & C2 Continuity  Second order parametric continuity 14

  15. Implications for animation  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 15

  16. Smoothstep 16

  17. Smoothstep 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); } 17

  18. Keyframe Animation  Inbetweening:  Spline interpolation – may be visually good enough  May not follow physical laws 18

  19. Keyframe Animation  Inbetweening:  Inverse kinematics or dynamics 19

  20. Articulated Figures  Character poses described by set of rigid bodies connected by “joints” 20

  21. Articulated Figures  Well suited for humanoid characters 21

  22. Keyframe Animation  Inbetweening:  Compute angles between keyframes 22

  23. Example: Walk Cycle  Inbetweening:  Compute angles between keyframes 23

  24. Example: Walk Cycle  Hip joint orientation 24

  25. Example: Walk Cycle  Knee joint orientation 25

  26. Example: Walk Cycle  Ankle joint orientation 26

  27. Animation Hierarchies  Animate objects in relation to their parent  Sun matrix is Ms  Earth matrix is MsMe  Moon matrix is MsMeMm 27

  28. Kinematics and Dynamics  Kinematics  Considers only motion  Determined by positions, velocities, accelerations  Dynamics  Considers underlaying forces  Capture motion from initial positions and physics 28

  29. Example: 2-Link Structure  Two links connected by rotational joints 29

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

  31. Forward Kinematics  Joint motion can be specified by spline curves Joint motion can be specified by spline curves 31

  32. Forward Kinematics  Joint motions can be specified by initial conditions Joint motion can be specified by spline curves 32

  33. Example: 2-Link Structure  What if animator knows position of “end effector” 33

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

  35. Inverse Kinematics  End-effector positions can be specified by splines 35

  36. Inverse Kinematics  Problem with more complex structures  System with equation is usually under-defined  Multiple solutions 36

  37. Inverse Kinematics  Solution for more complex structures  Find best solution (eg. minimize energy in motion)  Non-linear optimization 37

  38. Inverse Kinematics  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 38

  39. Character Animation (Linear Blend Skinning) (Skeletal Animation) 39

  40. Skeletal Animation  Hierarchical graph structure called Skeleton  Nodes and edges (bones) 40

  41. Skeletal Animation  Graph structure can be disconnected in space 41

  42. Real-time skeletal skinning https://www.youtube.com/watch?v=DfIfcQiC2oA 42

  43. Facial animation  Facial expressions  Lips to speech synchronization  Controllers  Skinning  Morphing http://www.anzovin.com/products/tfm1maya.html 43

  44. Reusable animation  One skeleton – different models http://www.studiopendulum.com/alterego/ 44

  45. Motion capture  Markers on actor’s body  Optical / magnetic sensors  3D reconstruction of markers’ position  Motion mapping to virtual character 45

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

  47. How the lectures should look like #2 Ask questions, please!!! - Be communicative - www.slido.com #VAR01 - More active you are, the better for you! - 47

  48. Motion Capture  Capturing of actor’s movement  Natural animation of CG characters 48

  49. Optical Mocap  Estimation of marker positions 49

  50. Optical Mocap Problems  Complicated setup  Problems with occlusions  Limited space 50

  51. Inertial Mocap  Inertial Measurement Unit  Bone rotations from IMU sensors 51

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

  53. Mocap Walking Algorithm 53

  54. Walking Algorithm Fail-Case 54

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

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

  57. Main Idea  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 ? 57

  58. Related work 58

  59. RGB Camera-based Mocap / Tracking  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 59

  60. Related Hybrid Methods  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 60

  61. Related Work Problems  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 61

  62. Optical-Inertial Synchronization 62

  63. Our Idea 63

  64. Optinertial Pipeline  Chamfer matching 64

  65. Actor Image  Distance transform image  Background subtraction / contrast suit color 65

  66. Optinertial Pipeline  Template image rendering 66

  67. Mocap Suits  High number of IMUs vs. affordable price 67

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

  69. Camera Calibration  OpenCV ChArUco board  Estimation of origin/camera position in world space 69

  70. Base-mesh Rendering  SQM algorithm (skeleton, radii)  Baerentzen et al. 2012 70

  71. Base-mesh Rendering  Actor image database  Skinning of base-mesh 71

  72. Optinertial Pipeline  Minimizing DT for the best match 72

  73. Actor Movement Detection  Find the best match for actor shift vector  Distance transform minimization 73

  74. Image-space Optimization  Silhouette + kernel integration 74

  75. Optimization Implementation  Parallel matrix multiplication on GPU  The best match gives the actor motion vector 75

  76. Optinertial Pipeline  Skeleton root translation 76

  77. Results - Video 77

  78. Evaluation 78

  79. Evaluation Scene  HTC Vive ground truth tracking 79

  80. Evaluation Paths 80

  81. Data Smoothing  Post-processing  Gaussian filtering 81

Recommend


More recommend