Top Banner
CPSC 641 Computer Graphics: Animation with Motion Capture Jinxiang Chai
64

CPSC 641 Computer Graphics: Animation with Motion Capture

Feb 06, 2016

Download

Documents

Mercia Mathias

CPSC 641 Computer Graphics: Animation with Motion Capture. Jinxiang Chai. Data Process. Complete 3D marker trajectories (.c3d file). 3D marker positions (.c3d file). Fill in missing data. Filter mocap data. Inverse Kinematics. How to represent motion data in joint angle space?. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CPSC 641 Computer Graphics:  Animation with Motion Capture

CPSC 641 Computer Graphics: Animation with Motion Capture

Jinxiang Chai

Page 2: CPSC 641 Computer Graphics:  Animation with Motion Capture

Data Process

3D marker positions (.c3d file)

Inverse Kinematics

Joint angle data (.amc file)

Complete 3D marker trajectories

(.c3d file)

Fill in missing data

Filter mocap data

How to represent motion data in joint angle space?

Page 3: CPSC 641 Computer Graphics:  Animation with Motion Capture

How to represent human motions?

Page 4: CPSC 641 Computer Graphics:  Animation with Motion Capture

A sequence of poses: q1,q2,…qT

Each pose is represented as a high-dimensional vector qt: Rn

Motion trajectoriesPose qt Motion q1,…qT

Human motion representation

Page 5: CPSC 641 Computer Graphics:  Animation with Motion Capture

How to represent human motions?

Page 6: CPSC 641 Computer Graphics:  Animation with Motion Capture

How to represent human motions?

-The body proportion and size of characters

- the joint angle values across the entire sequence

Page 7: CPSC 641 Computer Graphics:  Animation with Motion Capture

Motion Capture Data FilesEach sequence of human

motion data contains two files:– Skeleton file (.asf): Specify

the skeleton model of a character

– Motion data file (.amc): Specify the joint angle values over the frame/time

– Both files are generated by Vicon software

Page 8: CPSC 641 Computer Graphics:  Animation with Motion Capture

Human skeletal fileDescribed in a default pose

Page 9: CPSC 641 Computer Graphics:  Animation with Motion Capture

Human skeletal model

This is still a tree!

Page 10: CPSC 641 Computer Graphics:  Animation with Motion Capture

Human skeletal model

This is still a tree!

• How to describe the skeletal model?

• What should you know about each bone?

Page 11: CPSC 641 Computer Graphics:  Animation with Motion Capture

Human skeletal file (.asf)

• individual bone information - length of the bone - direction of the bone - local coordinate frame - number of Dofs - joint limits

• bone hierarchy/connections

Page 12: CPSC 641 Computer Graphics:  Animation with Motion Capture

Individual bone informationbegin

id bone_id                  /* Unique id for each bone */name bone_name        /* Unique name for each bone */direction dX dY dZ    /* Vector describing direction of the bone in world */ coor. system length 7.01722           /* Length of the bone*/ axis 0 0 20 XYZ         /* Rotation of local coordinate system for                                    this bone relative to the world coordinate                                    system. In .AMC file the rotation angles                                     for this bone for each time frame will be                                    defined relative to this local coordinate                                     system**/ dof rx ry rz                /* Degrees of freedom for this bone. limits (-160.0 20.0) /* joint limits*/            (-70.0 70.0)             (-60.0 70.0) end

Page 13: CPSC 641 Computer Graphics:  Animation with Motion Capture

Individual bone informationbegin id 2                 name lfemur        direction 0.34 -0.93 0    length 7.01722           axis 0 0 20 XYZ         dof rx ry rz                limits (-160.0 20.0)             (-70.0 70.0)             (-60.0 70.0) end

xw

yw

zw

Page 14: CPSC 641 Computer Graphics:  Animation with Motion Capture

Individual bone informationbegin id 2                 name lfemur        direction 0.34 -0.93 0    length 7.01722           axis 0 0 20 XYZ         dof rx ry rz                limits (-160.0 20.0)             (-70.0 70.0)             (-60.0 70.0) end

xw

yw

zw

Page 15: CPSC 641 Computer Graphics:  Animation with Motion Capture

Individual bone informationbegin id 2                 name lfemur        direction 0.34 -0.93 0    length 7.01722           axis 0 0 20 XYZ         dof rx ry rz                limits (-160.0 20.0)             (-70.0 70.0)             (-60.0 70.0) end

xw

yw

zw

Page 16: CPSC 641 Computer Graphics:  Animation with Motion Capture

Individual bone informationbegin id 2                 name lfemur        direction 0.34 -0.93 0    length 7.01722           axis 0 0 20 XYZ         dof rx ry rz                limits (-160.0 20.0)             (-70.0 70.0)             (-60.0 70.0) end

xw

yw

zw

xk

yk

zk

Euler angle representation: Rk=Rz(γ)Ry(β)Rx(α)

Page 17: CPSC 641 Computer Graphics:  Animation with Motion Capture

Individual bone informationbegin id 2                 name lfemur        direction 0.34 -0.93 0    length 7.01722           axis 0 0 20 XYZ         dof rx ry rz                limits (-160.0 20.0)             (-70.0 70.0)             (-60.0 70.0) end

xw

yw

zw

xk

yk

zk

- The number of dof for this joint

- The minimal and maximum joint angle for each dof

Page 18: CPSC 641 Computer Graphics:  Animation with Motion Capture

Individual bone informationbegin id 2                 name lfemur        direction 0.34 -0.93 0    length 7.01722           axis 0 0 20 XYZ         dof rx ry rz                limits (-160.0 20.0)             (-70.0 70.0)             (-60.0 70.0) end

xw

yw

zw

yk

xk

zk

1-dof joint 2-dof joint 3-dof joint

Page 19: CPSC 641 Computer Graphics:  Animation with Motion Capture

Individual bone informationbegin id 2                 name lfemur        direction 0.34 -0.93 0    length 7.01722           axis 0 0 20 XYZ         dof rx ry rz                limits (-160.0 20.0)             (-70.0 70.0)             (-60.0 70.0) end begin id 3                 name ltibia        direction 0.34 -0.93 0    length 7.2138           axis 0 0 20 XYZ         dof rx            limits (-10.0 170.0) end

xk

zk X k+1

zk+1

yk

yk+1

Page 20: CPSC 641 Computer Graphics:  Animation with Motion Capture

Individual bone informationbegin id 2                 name lfemur        direction 0.34 -0.93 0    length 7.01722           axis 0 0 20 XYZ         dof rx ry rz                limits (-160.0 20.0)             (-70.0 70.0)             (-60.0 70.0) end begin id 3                 name ltibia        direction 0.34 -0.93 0    length 7.2138           axis 0 0 20 XYZ         dof rx            limits (-10.0 170.0) end

xk

zk X k+1

zk+1

yk

yk+1

What do we miss?

Page 21: CPSC 641 Computer Graphics:  Animation with Motion Capture

Individual bone informationbegin id 2                 name lfemur        direction 0.34 -0.93 0    length 7.01722           axis 0 0 20 XYZ         dof rx ry rz                limits (-160.0 20.0)             (-70.0 70.0)             (-60.0 70.0) end begin id 3                 name ltibia        direction 0.34 -0.93 0    length 7.2138           axis 0 0 20 XYZ         dof rx            limits (-10.0 170.0) end

xk

zk X k+1

zk+1

yk

yk+1

What do we miss?

- global position

- global orientation

Page 22: CPSC 641 Computer Graphics:  Animation with Motion Capture

Root representation:rootorder TX TY TZ RX RY RZaxis XYZposition 0 0 0 orientation 0 0 0 xw

yw

zw

Page 23: CPSC 641 Computer Graphics:  Animation with Motion Capture

Root representation:rootorder TX TY TZ RX RY RZaxis XYZposition 0 0 0 orientation 0 0 0 xw

yw

zw

How to compute the coordinate of a joint in the world coordinate frame?

Page 24: CPSC 641 Computer Graphics:  Animation with Motion Capture

Root representation:rootorder TX TY TZ RX RY RZaxis XYZposition 0 0 0 orientation 0 0 0 xw

yw

zw

How to compute the coordinate of a joint in the world coordinate frame?

Page 25: CPSC 641 Computer Graphics:  Animation with Motion Capture

:hierarchy begin root lhipjoint rhipjoint lowerback lhipjoint lfemur lfemur ltibia ltibia lfoot lfoot ltoes rhipjoint rfemur rfemur rtibia rtibia rfoot rfoot rtoes lowerback upperback upperback thorax thorax lowerneck lclavicle rclavicle … end

Hierarchy/Bone Connections

Page 26: CPSC 641 Computer Graphics:  Animation with Motion Capture

:hierarchy begin root lhipjoint rhipjoint lowerback lhipjoint lfemur lfemur ltibia ltibia lfoot lfoot ltoes rhipjoint rfemur rfemur rtibia rtibia rfoot rfoot rtoes lowerback upperback upperback thorax thorax lowerneck lclavicle rclavicle … end

root rhipjoint

lowerback

Hierarchy/Bone Connections

Page 27: CPSC 641 Computer Graphics:  Animation with Motion Capture

:hierarchy begin root lhipjoint rhipjoint lowerback lhipjoint lfemur lfemur ltibia ltibia lfoot lfoot ltoes rhipjoint rfemur rfemur rtibia rtibia rfoot rfoot rtoes lowerback upperback upperback thorax thorax lowerneck lclavicle rclavicle … end

root rhipjoint lhipjoint

lowerback

lfemur

Hierarchy/Bone Connections

Page 28: CPSC 641 Computer Graphics:  Animation with Motion Capture

:hierarchy begin root lhipjoint rhipjoint lowerback lhipjoint lfemur lfemur ltibia ltibia lfoot lfoot ltoes rhipjoint rfemur rfemur rtibia rtibia rfoot rfoot rtoes lowerback upperback upperback thorax thorax lowerneck lclavicle rclavicle … end

root rhipjoint lhipjoint

lowerback

lfemur

Hierarchy/Bone Connections

ltibia

Page 29: CPSC 641 Computer Graphics:  Animation with Motion Capture

:hierarchy begin root lhipjoint rhipjoint lowerback lhipjoint lfemur lfemur ltibia ltibia lfoot lfoot ltoes rhipjoint rfemur rfemur rtibia rtibia rfoot rfoot rtoes lowerback upperback upperback thorax thorax lowerneck lclavicle rclavicle … end

root rhipjoint lhipjoint

lowerback

lfemur

Hierarchy/Bone Connections

ltibialfoot

Page 30: CPSC 641 Computer Graphics:  Animation with Motion Capture

:hierarchy begin root lhipjoint rhipjoint lowerback lhipjoint lfemur lfemur ltibia ltibia lfoot lfoot ltoes rhipjoint rfemur rfemur rtibia rtibia rfoot rfoot rtoes lowerback upperback upperback thorax thorax lowerneck lclavicle rclavicle … end

root rhipjoint lhipjoint

lowerback

lfemur

Hierarchy/Bone Connections

ltibialfootltoe

Page 31: CPSC 641 Computer Graphics:  Animation with Motion Capture

What can we do with .asf file?

We can visualize the default pose

We can compute various transforms in the default pose

- between world coordinate frame and local coordinate - between parent coordinate frame and child coordinate frame

Page 32: CPSC 641 Computer Graphics:  Animation with Motion Capture

From local coordinate to world coordinate

xw

yw

zw yk

xk

zk

kkkw TXRX

Page 33: CPSC 641 Computer Graphics:  Animation with Motion Capture

From local coordinate to world coordinate

xw

yw

zw yk

xk

zk

kkkw TXRX ? ?

Page 34: CPSC 641 Computer Graphics:  Animation with Motion Capture

From local coordinate to world coordinate

xw

yw

zw yk

kkkw TXRX

Page 35: CPSC 641 Computer Graphics:  Animation with Motion Capture

From local coordinate to world coordinate

xw

yw

zw yk

xk

zk

kkkw TXRX

Page 36: CPSC 641 Computer Graphics:  Animation with Motion Capture

From child to parent nodeHow to Compute the transformation Tk

k-1 from a child local coordinate frame to its parent local coordinate frame

x

Tkk-1

Page 37: CPSC 641 Computer Graphics:  Animation with Motion Capture

Bone transform

111 kkkw TXRX

kkkw TXRX

world

parent

child

Tkk-1?

Page 38: CPSC 641 Computer Graphics:  Animation with Motion Capture

Bone transform

111 kkkw TXRX

kkkw TXRX

111 kkkkkkw TXRTXRXworld

parent

child

Tkk-1?

Page 39: CPSC 641 Computer Graphics:  Animation with Motion Capture

Bone transform

111 kkkw TXRX

kkkw TXRX

111 kkkkkkw TXRTXRXworld

parent

child

Tkk-1?

)( 111

111

kkkkkkk TTRXRRX

10)( 1

11

111 kkkkkk

kTTRRR

T

Page 40: CPSC 641 Computer Graphics:  Animation with Motion Capture

Forward kinematics

How to compute the coordinate of a joint in the world coordinate frame?

xw

yw

zw

Page 41: CPSC 641 Computer Graphics:  Animation with Motion Capture

Forward kinematics

How to compute the coordinate of a joint in the world coordinate frame?

xw

yw

zw

1000

1121

kk

ww TTTX

Page 42: CPSC 641 Computer Graphics:  Animation with Motion Capture

Forward kinematics

How to compute the coordinate of a joint in the world coordinate frame?

xw

yw

zw

1000

1121

kk

ww TTTX

Page 43: CPSC 641 Computer Graphics:  Animation with Motion Capture

Forward kinematics

How to compute the coordinate of a joint in the world coordinate frame?

xw

yw

zw

1000

1121

kk

ww TTTX

We need to consider joint angle values!

Page 44: CPSC 641 Computer Graphics:  Animation with Motion Capture

Motion data file (.amc)i // frame numberroot 2.36756 16.4521 12.3335 -165.118 31.188 -179.889 // root position and orientationlowerback -17.2981 -0.243065 -1.41128 // joint angles for lowerback jointupperback 0.421503 -0.161394 2.20925 // joint angles for thorax jointthorax 10.2185 -0.176777 3.1832lowerneck -15.0172 -5.84786 -7.55529upperneck 30.0554 -3.19622 -4.68899head 12.6247 -2.35554 -0.876544rclavicle 4.77083e-014 -3.02153e-014rhumerus -23.3927 30.8588 -91.7324rradius 108.098rwrist -35.4375rhand -5.30059 11.2226rfingers 7.12502rthumb 20.5046 -17.7147lclavicle 4.77083e-014 -3.02153e-014lhumerus -35.2156 -19.5059 100.612

Page 45: CPSC 641 Computer Graphics:  Animation with Motion Capture

Motion data file (.amc)i

// frame numberroot 2.36756 16.4521 12.3335 -165.118 31.188 -

179.889 // root position and orientationlowerback -17.2981 -0.243065 -1.41128

// joint angles for lowerback jointupperback 0.421503 -0.161394 2.20925

// joint angles for thorax jointthorax 10.2185 -0.176777 3.1832lowerneck -15.0172 -5.84786 -7.55529upperneck 30.0554 -3.19622 -4.68899head 12.6247 -2.35554 -0.876544rclavicle 4.77083e-014 -3.02153e-014rhumerus -23.3927 30.8588 -91.7324rradius 108.098rwrist -35.4375rhand -5.30059 11.2226rfingers 7.12502rthumb 20.5046 -17.7147lclavicle 4.77083e-014 -3.02153e-014lhumerus -35.2156 -19.5059 100.612

- Rotation described in local coordinate frame

- Euler angle representation x-y-z

)()()( xyz RRR

Page 46: CPSC 641 Computer Graphics:  Animation with Motion Capture

Composite 3D Transformation

xRRTRTRRRTRRRzyxTp )()()()()()()()()(),,( 332

3212111

01000000

46From .asf file

Page 47: CPSC 641 Computer Graphics:  Animation with Motion Capture

Composite 3D Transformation

xRRTRTRRRTRRRzyxTp )()()()()()()()()(),,( 332

3212111

01000000

47From .amc file

Page 48: CPSC 641 Computer Graphics:  Animation with Motion Capture

Composite 3D Transformation

xRRTRTRRRTRRRzyxTp )()()()()()()()()(),,( 332

3212111

01000000

48

Page 49: CPSC 641 Computer Graphics:  Animation with Motion Capture

Composite 3D Transformation

xRRTRTRRRTRRRzyxTp )()()()()()()()()(),,( 332

3212111

01000000

49

Page 50: CPSC 641 Computer Graphics:  Animation with Motion Capture

Composite 3D Transformation

xRRTRTRRRTRRRzyxTp )()()()()()()()()(),,( 332

3212111

01000000

50

Page 51: CPSC 641 Computer Graphics:  Animation with Motion Capture

Composite 3D Transformation

xRRTRTRRRTRRRzyxTp )()()()()()()()()(),,( 332

3212111

01000000

51

Page 52: CPSC 641 Computer Graphics:  Animation with Motion Capture

Motion capture data

• http://mocap.cs.cmu.edu/

Page 53: CPSC 641 Computer Graphics:  Animation with Motion Capture

Some character models

Page 54: CPSC 641 Computer Graphics:  Animation with Motion Capture

More complex models

Page 55: CPSC 641 Computer Graphics:  Animation with Motion Capture

Mesh skinning• Skinning is the process of binding a skeleton to a single

mesh object• Skinning deformation is the process of deforming the

mesh as the skeleton is animated or moved.

Page 56: CPSC 641 Computer Graphics:  Animation with Motion Capture

Mesh skinning• Cylinder Being Deformed by Two Bones

Page 57: CPSC 641 Computer Graphics:  Animation with Motion Capture

Skinning basics

N

iii vMwv

1

• For each vertex, compute the position by

Page 58: CPSC 641 Computer Graphics:  Animation with Motion Capture

Skinning basics

N

iii vMwv

1

• For each vertex, compute the position by

v: undeformed vertex position

Page 59: CPSC 641 Computer Graphics:  Animation with Motion Capture

Skinning basics

N

iii vMwv

1

• For each vertex, compute the position by

v: undeformed vertex position

v’: deformed vertex position

Page 60: CPSC 641 Computer Graphics:  Animation with Motion Capture

Skinning basics

N

iii vMwv

1

• For each vertex, compute the position by

v: undeformed vertex position

v’: deformed vertex position

Mi: articulated motion

Page 61: CPSC 641 Computer Graphics:  Animation with Motion Capture

Skinning basics

N

iii vMwv

1

• For each vertex, compute the position by

v: undeformed vertex position

v’: deformed vertex position

Mi: articulated motion

wi: blending weight

N

iiw

1

1

Page 62: CPSC 641 Computer Graphics:  Animation with Motion Capture

Skinning basics

N

iii vMwv

1

• For each vertex, compute the position by

v: undeformed vertex position

v’: deformed vertex position

Mi: articulated motion

wi: blending weight

N

iiw

1

1Specified by artistsFrom mocap data

From mesh model

Page 63: CPSC 641 Computer Graphics:  Animation with Motion Capture

The "Bind Pose”

Page 64: CPSC 641 Computer Graphics:  Animation with Motion Capture

Mesh skinning

• Skeleton causing deformation of a single skin mesh