Original Post
i'v been implementing my own animation controller, based off id3dxanimationcontroller, my problem is that i can't completly understood how weights work
so far i'v come up with
[original_position or identity] ->weight0 -> anim0-> weight1 ->anim1 ->result
which for 2 tracks go like this
result=Lerp( Lerp(original,anim0,weight0), anim1,weight1)
which i for now implemented by decomposing matrix from previous frame
my question is how real world weights in animation controller are working and implemented?
so far i'v come up with
[original_position or identity] ->weight0 -> anim0-> weight1 ->anim1 ->result
which for 2 tracks go like this
result=Lerp( Lerp(original,anim0,weight0), anim1,weight1)
which i for now implemented by decomposing matrix from previous frame
D3DXVECTOR3 LerpV(D3DXVECTOR3 a,D3DXVECTOR3 b,float weight){ D3DXVECTOR3 res; res=a * (1.0f - weight) + b * weight; return res;}D3DXQUATERNION LerpQ(D3DXQUATERNION a,D3DXQUATERNION b,float weight){ D3DXQUATERNION res; D3DXQuaternionSlerp(&res,&a,&b,weight);//will be replaced by nlerp return res;}...D3DXVECTOR3 s0,t0; D3DXQUATERNION quat0; s0=D3DXVECTOR3(1,1,1); t0=D3DXVECTOR3(0,0,0); quat0=qid; D3DXMatrixDecompose(&s0,&quat0,&t0,pMatrix); t=LerpV(t0,t,track.weight); s=LerpV(s0,s,track.weight); quat=LerpQ(quat0,quat,track.weight); D3DXMatrixTransformation(&result, NULL, NULL, &s, NULL, &quat, &t); *pMatrix = result;my question is how real world weights in animation controller are working and implemented?