Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Adjusting mocap data with IK

$
0
0
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;

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>