#### Archived

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

# 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.

## 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 on other sites
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.

1. 1
Rutin
41
2. 2
3. 3
4. 4
5. 5

• 16
• 18
• 12
• 14
• 9
• ### Forum Statistics

• Total Topics
633362
• Total Posts
3011526
• ### Who's Online (See full list)

There are no registered users currently online

×