Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Carandiru

Matrix Math - Bone Hierachy Orientation

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

First a little intro, I currently have a working hardware skinning implementation, with blended animation control. That was the first step, in the process of programming my character class. Now I''m trying to integrate Ragdoll physics, using the Tokamak Game Physics SDK. After the skinned mesh is loaded from the X. File, I''m setting up the rigid bodies to map the geometry of a bounding box for each bone. The problem I''m having is with the matrix math to orient that geometry at the position of the bone''s orientation. Having a few matrices to work with. m_matCombined, being the applied transformation, m_matBoneOffset, being the matrix representing the bone''s local space transform (correct me if I''m wrong ). For testing purposes, I have been trying to set up visible bounding boxes using D3DXCreateBox() with the bounding size for each individual bone. But I want to see these bounding boxes visuallly overlapping the respective bones. Right now, they seem to be oriented around the origin of the whole mesh, overlapping each other. Please help me orient these bounding boxes with the proper Matrix math around the respective bone they represent. Thank You! .:[Carandiru]:. -Skilled C++ Programmer -DirectX 9.0, Cg, Win32

Share this post


Link to post
Share on other sites
Advertisement
I just did this with my own bounding mesh. I didn''t generate bounding boxes, I instead created it in the modeling program. But the idea should be simular. Difference is that my bounds are in the same place as the bones on startup.

Make sure you apply the bone''s offset matrix to the bone before you generate a bounding area around it. Then apply the bone''s inverse offset matrix to the bounding vertices. Then they should be in place. If not, the bounding areas would not be accurate (imagine forearm going from corner to corner of box). The offset matrix should orientate the bone so that it is straight.

After that, just apply each bone''s final transform matrix to each bounding area, every frame you need it.

Share this post


Link to post
Share on other sites

  • 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!