32
Mini Project I 1

Mini Project I - Carnegie Mellon University

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Mini Project I - Carnegie Mellon University

Mini Project I

1

Page 2: Mini Project I - Carnegie Mellon University

Instructions and basic requirement

• http://graphics.cs.cmu.edu/nsp/course/15464-s21/www/assignments/miniProject1.htm

• Due March 3, 2021 at start of class

2

Page 3: Mini Project I - Carnegie Mellon University

3

Keyframing

Motion Editing

CCD IK

Jacobian transpose IK

Jacobian Inverse IK

Skinning

Unity

Maya

Motion Builder

AMC Viewer (C++)

Animation Common Library (Python)

Scotty3D (C++)

Pinocchio (C++)

Page 4: Mini Project I - Carnegie Mellon University

4

Keyframing

Motion Editing

CCD IK

Jacobian transpose IK

Jacobian Inverse IK

Skinning

Unity

Maya

Motion Builder

AMC Viewer (C++)

Animation Common Library (Python)

Read ASF/AMC fileView Mocap in interface

Load and save BVH/FBX fileSave into mp4 files

Scotty3D (C++)

Pinocchio (C++)

Page 5: Mini Project I - Carnegie Mellon University

5

Keyframing

Motion Editing

CCD IK

Jacobian transpose IK

Jacobian Inverse IK

Skinning

Unity

Maya

Motion Builder

AMC Viewer (C++)

Animation Common Library (Python)

Scotty3D (C++)

Pinocchio (C++)

Check 15-462/662

Pro: Easy to setupCons: No live interface

Pro: Need compilingCons: Live interface

Page 6: Mini Project I - Carnegie Mellon University

6

Keyframing

Motion Editing

CCD IK

Jacobian transpose IK

Jacobian Inverse IK

Skinning

Unity

Maya

Motion Builder

AMC Viewer (C++)

Animation Common Library (Python)

Scotty3D (C++)

Pinocchio (C++)

Page 7: Mini Project I - Carnegie Mellon University

Outline

§ Animation representationData structure for hierarchical modeling

§ File formatsHow to read/load files? Some popular formats: BVH, FBX, and ASF/AMC

§ Introduction to starter code

§ A few notes on Unity and Motion Builder

7

Page 8: Mini Project I - Carnegie Mellon University

Outline

§ Animation representationData structure for hierarchical modeling

§ File formatsHow to read/load files? Some popular formats: BVH, FBX, and ASF/AMC

§ Introduction to start code

§ A quick introduction to Unity and Motion Builder

8

Page 9: Mini Project I - Carnegie Mellon University

Human figures are modeled as hierarchical linkages

9

Figure 1. Example of a human figure

Page 10: Mini Project I - Carnegie Mellon University

Human figures are modeled as hierarchical linkages

10

Figure 1. Example of a human figure

Root node (6 DOF): Translation of the root repositions the whole structure

Page 11: Mini Project I - Carnegie Mellon University

Human figures are modeled as hierarchical linkages

11

Figure 1. Example of a human figure

Root node (6 DOF): Translation of the root repositions the whole structure

Joint (3 DOF or 6 DOF): Transformations are relative to its parent joint. For rigid body, joint translation is constant when relative to its parent joint.

Page 12: Mini Project I - Carnegie Mellon University

Joint hierarchy is a tree structure

12

Figure 1. Example of a human figure

Root node

Joint

Link

Figure 2. Example of a tree structure.

Page 13: Mini Project I - Carnegie Mellon University

How to represent a character animation?

• Consider a simple example

13

Coordinate system: Y-up and right-hand

𝑌

𝑍

𝑋

Hips

Spine

End

Page 14: Mini Project I - Carnegie Mellon University

How to represent a character animation?

• Consider a simple example

14

Coordinate system: Y-up and right-hand

Hierarchy:- Joint names- Parent-child relationship- Constant translation and orientations for base pose(e.g. 𝑇! = 0, 0, 0 " , 𝑇# = 0, 10, 0 " , 𝑇$ = 0, 10, 0 " ,

𝑂! = 𝑂# = 𝑂$ = 𝐼)

𝑌

𝑍

𝑋

Hips

Spine

End

Page 15: Mini Project I - Carnegie Mellon University

How to represent a character animation?

• Consider a simple example

15

Motion:- Joint translations and orientations at each time frame(e.g.𝑅%,'()! 𝑡! = 0* , 𝑅%,'()!(𝑡#) = 90*)

Hierarchy:- Joint names- Parent-child relationship- Constant translation and orientations for base pose(e.g. 𝑇! = 0, 0, 0 " , 𝑇# = 0, 10, 0 " , 𝑇$ = 0, 10, 0 " ,

𝑂! = 𝑂# = 𝑂$ = 𝐼)

Coordinate system: Y-up and right-hand

𝑌

𝑍

𝑋

Hips

Spine

End

Page 16: Mini Project I - Carnegie Mellon University

Outline

§ Animation representationData structure for hierarchical modeling

§ File formatsHow to read/load files? Some popular formats: BVH, FBX, and ASF/AMC

§ Introduction to starter code

§ A few notes on Unity and Motion Builder

16

Page 17: Mini Project I - Carnegie Mellon University

Animation is represented by hierarchy and motion

• Consider a simple example

17

Motion:- Joint translations and orientations at each time frame(e.g.𝑅%,'()! 𝑡! = 0* , 𝑅%,'()!(𝑡#) = 90*)

𝑌

𝑍

𝑋

Hierarchy:- Joint names- Parent-child relationship- Constant translation and orientations(e.g. 𝑇! = 0, 0, 0 " , 𝑇# = 0, 10, 0 " , 𝑇$ = 0, 10, 0 " ,

𝑂! = 𝑂# = 𝑂$ = 𝐼)

Coordinate system: Y-up and right-hand

Hips

Spine

End

Page 18: Mini Project I - Carnegie Mellon University

BVH files

• Consider a simple example

18

Hips

Spine

End

𝑌

𝑍

𝑋

Page 19: Mini Project I - Carnegie Mellon University

BVH files

• Consider a simple example

19

Hips

Spine

End

𝑌

𝑍

𝑋

Page 20: Mini Project I - Carnegie Mellon University

Channel order indicates the order of transformation

• 𝑣0 = 𝑅1𝑅2𝑅3𝑣

20

Hips

Spine

End

𝑌

𝑍

𝑋

Page 21: Mini Project I - Carnegie Mellon University

Order of transformation is important for Euler angles

• Matrix multiplication is not commutative

• Example

21

𝑋

𝑌

𝑍

𝑋

𝑌

𝑍

𝑅+ = 90!𝑅, = 90!

(Extrinsic rotations)

𝑋

𝑌

𝑍

𝑅- = 90!

𝑋

𝑌

𝑍

𝑋

𝑌

𝑍

𝑋

𝑌

𝑍

𝑅+ = 90!

𝑣. = 𝑅/𝑅-𝑅%𝑣

Page 22: Mini Project I - Carnegie Mellon University

Order of transformation is important for Euler angles

• Matrix multiplication is not commutative

• Example

22

𝑋

𝑌

𝑍

𝑋

𝑌

𝑍

𝑅+ = 90!𝑅, = 90!

(Extrinsic rotations)

𝑋

𝑌

𝑍

𝑅- = 90!

𝑋

𝑌

𝑍

𝑋

𝑌

𝑍

𝑋

𝑌

𝑍

𝑅+ = 90!

𝑣. = 𝑅/𝑅%𝑅-𝑣

Page 23: Mini Project I - Carnegie Mellon University

Other file formats

• FBX • A proprietary format owned by Autodesk.

• Not human readable, needs to parse data using SDK (http://help.autodesk.com/view/FBX/2019/ENU/) or Maya scripts

• Able to store more complete information, like pre and post rotations, mesh, lighting, skinning and et al.

• ASF/AMC• Similar to BVH but stores hierarchy (i.e. skeleton) and motion in separate files

• ASF files store hierarchy

• AMC files store motion

23

Page 24: Mini Project I - Carnegie Mellon University

Outline

§ Animation representationData structure for hierarchical modeling

§ File formatsHow to read/load files? Some popular formats: BVH, FBX, and ASF/AMC

§ Introduction to starter codehttps://github.com/yangyanzhe/assignment1

§ A few notes on Unity and Motion Builder

24

Page 25: Mini Project I - Carnegie Mellon University

Animation class

25

Hierarchy / Skeleton

Motion

We can assume orients is identity transformation in this assignment

Page 26: Mini Project I - Carnegie Mellon University

Angle representation: Quaternions

26

anim = Animation(…)euler_angle = anim.rotations.euler()

Call “euler” function to get euler angle in radians

Page 27: Mini Project I - Carnegie Mellon University

Load and save animation for bvh files

27

Page 28: Mini Project I - Carnegie Mellon University

Format transformer: FBX to BVH

28

Transform an fbx file to bvh file

Page 29: Mini Project I - Carnegie Mellon University

Outline

§ Animation representationData structure for hierarchical modeling

§ File formatsHow to read/load files? Some popular formats: BVH, FBX, and ASF/AMC

§ Introduction to starter codehttps://github.com/yangyanzhe/assignment1

§ A few notes on Unity and Motion Builder

29

Page 30: Mini Project I - Carnegie Mellon University

Unity

• Download unity here: https://unity3d.com/get-unity/download

• This tutorial can walk you through importing a character into a Unity game world: https://gamedevelopment.tutsplus.com/tutorials/importing-an-animated-character-into-unity-3d--cms-27588

30

Page 31: Mini Project I - Carnegie Mellon University

Motion Builder: Load data

31

Page 32: Mini Project I - Carnegie Mellon University

Motion Builder: Check data

32

Skeleton tree