Sign in to follow this  

Loosing materials when adding IK transformations to the bone?

This topic is 716 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

.. computing IK after applying standard animations

.. calculate the matFinal which is the resulting pose of the IK

// mess up materials
frame->TransformationMatrix += matFinal;

If I don't add the matFinal to the bone's transformation matrix, and matrix stays the same.
But if I add to it, the whole mesh turns black.
Any ideas why?

BTW:

I would get some obscure matrix like this, where the _44 part is extremely large

=================
8.03239    0.000804141    0.0285331    0    
-0.0285433    0.0901246    8.03099    0    
0.000484145    -8.03104    0.0901269    0    
0.000702    -0.085437    0.082161    9   

Should I or should I not just concatenate 2 matrices together to the get the bone's current transformation?

 

I already have this in my code, strange?

d3d::m_pDevice->SetRenderState(D3DRS_LIGHTING, TRUE);
d3d::m_pDevice->SetRenderState(D3DRS_SHADEMODE, D3DSHADE_GOURAUD);
d3d::m_pDevice->SetRenderState(D3DRS_NORMALIZENORMALS, TRUE);
d3d::m_pDevice->SetRenderState(D3DRS_AMBIENT, D3DColors::WHITE);

Thanks

Jack

Edited by lucky6969b

Share this post


Link to post
Share on other sites
frame->TransformationMatrix += matFinal;

You have to multiply matrices to combine them (in the good order).

Edited by Alundra

Share this post


Link to post
Share on other sites

This topic is 716 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this