Advertisement

Adjusting mocap data with IK

Started by November 21, 2017 06:45 AM
1 comment, last by lucky6969b 7 years, 2 months ago

I simply cannot make the animation look good. if I just add on the translation part, the character becomes an enlarged monkey, if I just add on the rotation part, also it messes up, if I add on the transformation, the character is flattened (the character becomes very thin)

I think the correct way is to add the transformations together. If I just apply one of the mocap or ik transformation alone, the animation is okay. Any ideas?

Thanks

Jack

 


	D3DXVECTOR3 oldpos, oldscale;
D3DXQUATERNION oldquat;
D3DXMatrixDecompose(&oldscale, &oldquat, &oldpos, &frame->TransformationMatrix);
	//D3DXMATRIX oldTransform, oldSca, oldRot, oldTrans;
//D3DXMatrixScaling(&oldSca, oldscale.x, oldscale.y, oldscale.z);
//D3DXMatrixTranslation(&oldTrans, oldpos.x, oldpos.y, oldpos.z);
//D3DXMatrixRotationQuaternion(&oldRot, &oldquat);
//oldTransform = oldSca * oldRot * oldTrans;
//newPosition += oldpos;    
//newOrientation *= oldquat;
        
 D3DXMATRIX matScale, matTrans, matRot;
 D3DXMatrixTranslation(&matTrans, newPosition.x, newPosition.y, newPosition.z);        
 D3DXMatrixRotationQuaternion(&matRot, &newOrientation);    
	
  D3DXMATRIX matFinal;
  D3DXMatrixIdentity(&matFinal);
	   matFinal = matRot * matTrans;
	   // OLD TRANSFORM IS BVH
   // NEW TRANSFORM IS IK
 
   frame->TransformationMatrix = matFinal;
	

 

Oh... I get it....for this kind of animations, you can't make use of a heavy-duty library like opentissue, because they are good for explicit postures, for light-duty tasks, like arm-adjustment, you will just need some simple ik systems.

 

This topic is closed to new replies.

Advertisement