CS775 ASSGINMENT 2
Inverse Kinematics and Skinning
Jai Mashalkar : 113050007
Ahana Pradhan : 113050039
User Interface:
- s: toggle skeleton
- m: toggle mesh
- Move end effector: select axis, x,y,z, then +/-
- k: solve IK
- r: rotate
- h: toggle human
- 1: Move end effector of Human Head
- 2,3: Move end effector of Human Hands
- 4,5: Move end effector of Human Legs
Inverse Kinematics
The kinematic chain consists of three links where the root joint has 3 degree of freedom ( can be rotated about x, y, z axis ) and other two joints are hinge joints where the axis of rotation is Z axis.
Damped least squares solution for inverse kinematics is implemented here so that the kinematic chain remains well behaved near singularity.
GSL is used for SVD.
The threshold value for damping parameter has been decided based on the observed singular values.
Images of kinematic chain :

IK chain at initial position IK chain with goal specified

IK chain after IK solving Well-behaved at singularity
Skinning
Vertex Blend skinning has been implemented. Each mesh vertex is assigned to the two joints it lies in between.
Weights are proportional to the distance to the other joint.
Images of Mesh after Skinning :

Mesh after skinning Skin Collapse
Human Skeleton & Mesh
SKeleton
Human skeleton has been modelled using 5 kinematic chains, of 3 bones each. The torso chain is the root chain, and the chains for hands and legs are modelled as children of the torso.
Some constraints are placed on rotations of the roots of the chain, to make it realistic.
End effectors are provided for each chain, and can be changed together as specified by the user.
Ik solver solves the chains one by one, starting from the torso chain.
Limitation: Since IK is solved one by one, certain configurations which are achievable by the multichain cannot be reached in our case. Eg. Touching hand to ground by only changing the end effector of the hand.

Human Skeleton Rest Pose Human Skeleton at goal position
Mesh
Human mesh is modelled using 5 cylinders of varying radii. The radius is varied while drawing the cylinder, which produces a curved cylinder. Different functions for chaning radius are used for each body part, to try to make it look close to a human.
Each body part is seperately skinned to its corresponding kinematic chain. Hence it gets affected by only the movement of one chain.


Human Mesh Rest Pose Human Mesh at goal position
Note: Some part of structuring of code may have got influenced from the code here