Motion Representation & forward Kinematics Jinxiang Chai
Topics Representing charactersRepresenting characters Transformation hierarchiesTransformation hierarchies Skeleton file (.asf file)Skeleton file (.asf file) Motion data file (.amc file)Motion data file (.amc file)
Assumptions Linear algebra matrix multiplication, linear transformationsmatrix multiplication, linear transformations
bdac i m f l q he jk pon Px Py Pz 1 Transformation Matrix
Ty Tz Tx Translation along x, y and z axis Translation Matrix
We know how to rotate about the global axes cos( ) -sin( ) 0 sin( ) cos( ) cos( ) -sin( ) 0 sin( ) cos( ) cos( ) 0 sin( ) sin( ) 0 cos( ) Rotate θ around x axis Rotate θ around z axis Rotate θ around y axis Rotation matrices
Character Models are rich, complex hair, clothes (particle systems)hair, clothes (particle systems) muscles, skin (FFD’s etc.)muscles, skin (FFD’s etc.) Focus is rigid-body Degrees of Freedom (DOFs) joint anglesjoint angles what we can currently obtain from motion capture datawhat we can currently obtain from motion capture data Character Representation
Simple Rigid Body Skeleton Copyright © Squaresoft 1999 Who wins? You decide. vs.
Human Motion Representation How to represent right leg motion?
Representing a Skeleton Model & connect each bone difficult to formulate joint limitsdifficult to formulate joint limits not very efficient eithernot very efficient either –explicit constraints for joints –many wasted DOFs xh,yh,zh,h,h,hxh,yh,zh,h,h,h xt,yt,zt,t,t,txt,yt,zt,t,t,t xc,yc,zc,c,c,cxc,yc,zc,c,c,c xf,yf,zf,f,f,fxf,yf,zf,f,f,f
Efficient Skeleton: Hierarchy Implicitize joint constraints each bone relative to parenteach bone relative to parent easy to limit joint angleseasy to limit joint angles very efficientvery efficient –# angles = # DOFs –no constraints to enforce –leverages graphics libraries and hardware xh,yh,zh,h,h,hxh,yh,zh,h,h,h t,t,tt,t,t cc f,ff,f hips r-upper leg r-lower leg r-foot left-leg...
Operations on Hierarchies Specify poses Draw the character in a given pose Compute positions and orientations on body for example...
Computing a Sensor Position Forward kinematics uses vector-matrix multiplicationuses vector-matrix multiplication transformation matrix is composition of all joint transforms between sensor/effector and roottransformation matrix is composition of all joint transforms between sensor/effector and root xh,yh,zh,h,h,hxh,yh,zh,h,h,h t,t,tt,t,t cc f,ff,f vsvs y x z vsvs vsvs
Joints = Rotations To specify a pose, we specify the joint-angle rotations Each joint can have up to three rotational DOFs 1 DOF: knee 2 DOF: wrist 3 DOF: arm
Representing Motions animation = Pose(time) See demo using maya!
Motion Capture Data Each sequence of human motion data contains two files: Skeleton file (.asf):Skeleton file (.asf): Specify the skeleton model of character Motion data file (.amc):Motion data file (.amc): Specify the joint angle values over the frame/time
.ASF file Specify character skeleton Individual boneIndividual bone Bone hierarchyBone hierarchy
.ASF file: Bones For each bone 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 ( ) ( ) ( ) end
. ASF file: Hierarchy :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 lowerneck upperneck upperneck head lclavicle lhumerus lhumerus lradius lradius lwrist lwrist lhand lthumb lhand lfingers rclavicle rhumerus rhumerus rradius rradius rwrist rwrist rhand rthumb rhand rfingers end
. ASF file: Hierarchy :hierarchy begin root lhipjoint rhipjoint lowerback Three bones connected to root Root is the parent node of lhipjoint, rhipjoint, and lowerback root lhipjointrhipjoint lowerback
. ASF file: Hierarchy rhips rfemur rtibia r-foot right-leg :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 lowerneck upperneck upperneck head lclavicle lhumerus lhumerus lradius lradius lwrist lwrist lhand lthumb lhand lfingers rclavicle rhumerus rhumerus rradius rradius rwrist rwrist rhand rthumb rhand rfingers end
Hierarchical Representation
.AMC file 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 …. For each frame
Animation with.ASF and.AMC file See demo!
Representing charactersRepresenting characters Transformation hierarchiesTransformation hierarchies Skeleton file (.asf file)Skeleton file (.asf file) Motion data file (.amc fileMotion data file (.amc file Representing charactersRepresenting characters Transformation hierarchiesTransformation hierarchies Skeleton file (.asf file)Skeleton file (.asf file) Motion data file (.amc fileMotion data file (.amc file Today’s topic
1) Create a handle on body position or orientationposition or orientation 2) Pull on the handle 3) IK figures out how joint angles should change 1) Create a handle on body position or orientationposition or orientation 2) Pull on the handle 3) IK figures out how joint angles should change Next Lecture: Inverse Kinematics