Presentation is loading. Please wait.

Presentation is loading. Please wait.

Motion Representation & forward Kinematics Jinxiang Chai.

Similar presentations


Presentation on theme: "Motion Representation & forward Kinematics Jinxiang Chai."— Presentation transcript:

1 Motion Representation & forward Kinematics Jinxiang Chai

2 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)

3 Assumptions Linear algebra matrix multiplication, linear transformationsmatrix multiplication, linear transformations

4 bdac i m f l q he jk pon Px Py Pz 1 Transformation Matrix

5 010 1 1 1 00 00 000 Ty Tz Tx Translation along x, y and z axis Translation Matrix

6 We know how to rotate about the global axes 1 0 0 0 cos(  ) -sin(  ) 0 sin(  ) cos(  ) cos(  ) -sin(  ) 0 sin(  ) cos(  ) 0 0 0 1 cos(  ) 0 sin(  ) 0 1 0 -sin(  ) 0 cos(  ) Rotate θ around x axis Rotate θ around z axis Rotate θ around y axis Rotation matrices

7 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

8 Simple Rigid Body  Skeleton Copyright © Squaresoft 1999 Who wins? You decide. vs.

9 Human Motion Representation How to represent right leg motion?

10 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

11 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,tt,t,t cc f,ff,f hips r-upper leg r-lower leg r-foot left-leg...

12 Operations on Hierarchies Specify poses Draw the character in a given pose Compute positions and orientations on body for example...

13 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,tt,t,t cc f,ff,f vsvs y x z vsvs vsvs

14 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

15 Representing Motions animation = Pose(time) See demo using maya!

16 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

17 .ASF file Specify character skeleton Individual boneIndividual bone Bone hierarchyBone hierarchy

18 .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 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) (-70.0 70.0) (-60.0 70.0) end

19 . 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

20 . 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

21 . 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

22 Hierarchical Representation

23 .AMC file i // frame number root -2.55317 16.3652 11.0758 -164.044 40.963 179.196 // root position and orientation lowerback -13.4812 3.58739 1.31326 // joint angles for lowerback joint upperback 2.71059 4.96065 -3.24804 // joint angles for thorax joint thorax 10.9583 2.59835 -3.13219 lowerneck -13.4561 2.04484 3.87687 upperneck 31.3081 7.2808 -9.21625 head 13.2432 3.21452 -3.00079 rclavicle -1.39845e-013 3.18055e-014 rhumerus 13.7295 21.2853 -86.8555 rradius 116.413 rwrist -17.0142 rhand -7.19777 10.0191 rfingers 7.12502 rthumb 18.6806 -19.1039 …. For each frame

24 Animation with.ASF and.AMC file See demo!

25 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

26 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


Download ppt "Motion Representation & forward Kinematics Jinxiang Chai."

Similar presentations


Ads by Google