Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I would like to render the bones of the Tiny.x animated mesh. I know there are 35 bones, and I know their names, but I'm having trouble with each bone's matrix. Do I need to convert the matrix with d3dxvec3transformcoord function, or can I use the .m41,.m42,.m43 on the vertex buffer ?

share|improve this question
add comment

1 Answer

Each bone transform needs to be combined with it's parent all the way up the hierarchy chain. So a toe bone has to be multiplied to the foot bone which was previously multiplied to the leg bone which was previously multiplied to the hip bone.... etc all the way back to the root bone. Once all that is done, then m41, m42, m43 of the result will represent the position of the toe. The order that you combine bones is opposite for openGL and DirectX.

To render a bone (instead of, say, a toe), it needs geometry in the form of vertices. Typically that geometry is created in a 3d modeling app as a visual aid to see the bone but is not transfered over to the .x file. You would have to create your own.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.