CPSC 641 Computer Graphics: Animation with Motion Capture Jinxiang Chai
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?
How to represent human motions?
A sequence of poses: q 1,q 2,…q T Each pose is represented as a high-dimensional vector q t : R n Motion trajectoriesPose q t Motion q 1,…q T Human motion representation
How to represent human motions?
-The body proportion and size of characters - the joint angle values across the entire sequence
Motion Capture Data Files Each 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
Human skeletal file Described in a default pose
Human skeletal model This is still a tree!
Human skeletal model This is still a tree! How to describe the skeletal model? What should you know about each bone?
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
Individual bone information begin 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 /* Length of the bone*/ axis 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 ( ) /* joint limits*/ ( ) ( ) end
Individual bone information begin id 2 name lfemur direction length axis XYZ dof rx ry rz limits ( ) ( ) ( ) end xwxw ywyw zwzw
Individual bone information begin id 2 name lfemur direction length axis XYZ dof rx ry rz limits ( ) ( ) ( ) end xwxw ywyw zwzw
Individual bone information begin id 2 name lfemur direction length axis XYZ dof rx ry rz limits ( ) ( ) ( ) end xwxw ywyw zwzw
Individual bone information begin id 2 name lfemur direction length axis XYZ dof rx ry rz limits ( ) ( ) ( ) end xwxw ywyw zwzw xkxk ykyk zkzk Euler angle representation:R k =R z (γ)R y (β)R x (α)
Individual bone information begin id 2 name lfemur direction length axis XYZ dof rx ry rz limits ( ) ( ) ( ) end xwxw ywyw zwzw xkxk ykyk zkzk - The number of dof for this joint - The minimal and maximum joint angle for each dof
Individual bone information begin id 2 name lfemur direction length axis XYZ dof rx ry rz limits ( ) ( ) ( ) end xwxw ywyw zwzw ykyk xkxk zkzk 1-dof joint2-dof joint3-dof joint
Individual bone information begin id 2 name lfemur direction length axis XYZ dof rx ry rz limits ( ) ( ) ( ) end begin id 3 name ltibia direction length axis XYZ dof rx limits ( ) end xkxk zkzk X k+1 z k+1 ykyk y k+1
Individual bone information begin id 2 name lfemur direction length axis XYZ dof rx ry rz limits ( ) ( ) ( ) end begin id 3 name ltibia direction length axis XYZ dof rx limits ( ) end xkxk zkzk X k+1 z k+1 ykyk y k+1 What do we miss?
Individual bone information begin id 2 name lfemur direction length axis XYZ dof rx ry rz limits ( ) ( ) ( ) end begin id 3 name ltibia direction length axis XYZ dof rx limits ( ) end xkxk zkzk X k+1 z k+1 ykyk y k+1 What do we miss? - global position - global orientation
Root representation :root order TX TY TZ RX RY RZ axis XYZ position orientation xwxw ywyw zwzw
Root representation :root order TX TY TZ RX RY RZ axis XYZ position orientation xwxw ywyw zwzw How to compute the coordinate of a joint in the world coordinate frame?
Root representation :root order TX TY TZ RX RY RZ axis XYZ position orientation xwxw ywyw zwzw How to compute the coordinate of a joint in the world coordinate frame?
: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
: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
: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 rhipjointlhipjoint lowerback lfemur Hierarchy/Bone Connections
: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 rhipjointlhipjoint lowerback lfemur Hierarchy/Bone Connections ltibia
: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 rhipjointlhipjoint lowerback lfemur Hierarchy/Bone Connections ltibia lfoot
: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 rhipjointlhipjoint lowerback lfemur Hierarchy/Bone Connections ltibia lfoot ltoe
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
From local coordinate to world coordinate xwxw ywyw zwzw ykyk xkxk zkzk
xwxw ywyw zwzw ykyk xkxk zkzk ??
xwxw ywyw zwzw ykyk
xwxw ywyw zwzw ykyk xkxk zkzk
From child to parent node How to Compute the transformation T k k-1 from a child local coordinate frame to its parent local coordinate frame x T k k-1
Bone transform world parent child T k k-1 ?
Bone transform world parent child T k k-1 ?
Bone transform world parent child T k k-1 ?
Forward kinematics How to compute the coordinate of a joint in the world coordinate frame? xwxw ywyw zwzw
Forward kinematics How to compute the coordinate of a joint in the world coordinate frame? xwxw ywyw zwzw
Forward kinematics How to compute the coordinate of a joint in the world coordinate frame? xwxw ywyw zwzw
Forward kinematics How to compute the coordinate of a joint in the world coordinate frame? xwxw ywyw zwzw We need to consider joint angle values!
Motion data file (.amc) i // frame number root // root position and orientation lowerback // joint angles for lowerback joint upperback // joint angles for thorax joint thorax lowerneck upperneck head rclavicle e e-014 rhumerus rradius rwrist rhand rfingers rthumb lclavicle e e-014 lhumerus
Motion data file (.amc) i // frame number root // root position and orientation lowerback // joint angles for lowerback joint upperback // joint angles for thorax joint thorax lowerneck upperneck head rclavicle e e-014 rhumerus rradius rwrist rhand rfingers rthumb lclavicle e e-014 lhumerus Rotation described in local coordinate frame - Euler angle representation x-y-z
Composite 3D Transformation 46 From.asf file
Composite 3D Transformation 47 From.amc file
Composite 3D Transformation 48
Composite 3D Transformation 49
Composite 3D Transformation 50
Composite 3D Transformation 51
Motion capture data
Some character models
More complex models
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.
Mesh skinning Cylinder Being Deformed by Two Bones
Skinning basics For each vertex, compute the position by
Skinning basics For each vertex, compute the position by v: undeformed vertex position
Skinning basics For each vertex, compute the position by v: undeformed vertex position v’: deformed vertex position
Skinning basics For each vertex, compute the position by v: undeformed vertex position v’: deformed vertex position M i : articulated motion
Skinning basics For each vertex, compute the position by v: undeformed vertex position v’: deformed vertex position M i : articulated motion w i : blending weight
Skinning basics For each vertex, compute the position by v: undeformed vertex position v’: deformed vertex position M i : articulated motion w i : blending weight Specified by artists From mocap data From mesh model
The "Bind Pose”
Mesh skinning Skeleton causing deformation of a single skin mesh