Archived

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

grahamAmbrose

bone matrices

Recommended Posts

I’m trying to create a skeleton. I have a hierarchal bone structure but I am having difficulty constructing the matrices that control the vertex blending. The method I’m using what I made up is: For each bone pass in a world matrix. { This is the matrix for the bone. { The inverse of the world matrix Multiplied by rotation of bone Multiplied by world matrix } (Rotation around a point) Then for each child of the bone pass { The world matrix multiplied by: The inverse of the world matrix Multiplied by rotation of bone Multiplied by transform of the bone length Multiplied by world matrix } } The problem I’m getting is that vertices are transformed so the bones don’t touch but I need to pass the transforms down the structure to set the point of rotation. If any one knows the right way to do this it would be great as I can’t find anything on it.

Share this post


Link to post
Share on other sites
DirectX 8 SDK has a skinned mesh sample, containing source code to setup bone matrices. You may take a look.
(DirectX 9''s version hides much the details into D3DX interfaces. I personally like DX8''s sample more, as it shows the "internals" of how everything works)

Share this post


Link to post
Share on other sites