Jump to content
  • Advertisement
Sign in to follow this  
webjeff

XFile Bone Manipulation help

This topic is 5041 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

OK, I am loading the bone heirarchy fine and my model is rendering perfect in X File format with an animation but now im working on ragdoll effects and I can't seem to manipulate bones by code. Here's my update called per frame: MATRIX matWorld = CurrentMatrix(); LPD3DXFRAME frame = FindFrame( g_pFrameRoot, "arms"); D3DXMATRIX mat; D3DXMatrixRotationX(&mat,80.0f); D3DXMatrixMultiply(&frame->TransformationMatrix,&frame->TransformationMatrix,&mat); UpdateFrameMatrices( g_pFrameRoot, &matWorld ); Basically from my code above you can see all i'm trying to do is get the Frame with Arms and rotate it 80 on the X Axis. I tried Translating, rotating, scaling. No effect whatsoever on the bone. If I want to move the bone manually, what do I have to do??? Am I thinking about this wrong. Can anyone give me some help. Thanks a lot, Jeff King. PS ITs 1AM and I'm really tired so let me know if you need any more clarification.

Share this post


Link to post
Share on other sites
Advertisement
I found something interesting, if I manually update a bone by myself and then render that bone and its children, I see it moved at (0,0,0). GOOD right? No, well it doesn't seem to save that transformation matrix cause when it renders the model after words its back to normal.

I have it so I press a button and it updates the matrix and renders from that frame down, it shows correct, but rendering the model does not. Any clues as to why my transformations aren't being saved???

Jeff

Share this post


Link to post
Share on other sites
Anyone got any ideas?

I just cant figure out why, if I update the bone's localmatrix to store a rotation value, then next render pass when it multiplies it by its parent it should still rotate. This doesn't make any sense why this does not work.

Any X File bone experts out there?

Thanks
Jeff.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!