Sign in to follow this  

XFile Bone Manipulation help

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

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