Jump to content
  • Advertisement
Sign in to follow this  
lucky6969b

Loosing materials when adding IK transformations to the bone?

This topic is 871 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!