Jump to content
  • Advertisement

Archived

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

ludo8x

Matrix Bones

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

I''d read somewhere that bones are represent by matrix.. but now, if i have start and end point of a bone, how can i represent it like a matrix ?? I want to moltiply the bone matrix to a vector vertex to move this vertex in the space.. how can i do it ?

Share this post


Link to post
Share on other sites
Advertisement
Is there, per chance, any mention of matrix stacks in the article that you have read?

Share this post


Link to post
Share on other sites
Ok, sorry, matrix stacks aren't required at all for what you want (though they are related).

You want a matrix transformation such that the "bone" at the position (0,0,0) - (0,1,0) (for instance), is moved to the position (startpoint) - (endpoint). Once you have such a transformation, you can apply it to any point, and it will be transformed to the "bone space".

The transformation that you are looking for is simply a composition of a scaling transformation, a rotation transformation, and a translation transformation. Depending on the graphic package that you are using, building the matrices to do these transformation might be very easy.

- The scaling factor is simply the length of the vector (endpoint - startpoint)
- The rotation angle is the angle between the vector (endpoint - startpoint) and the vector (0,1,0). The axis is the crossproduct of these two vectors.
- The translation vector is simply (startpoint)

I hope that this is clear...

Cédric

[edited by - cedricl on July 6, 2003 11:38:11 AM]

Share this post


Link to post
Share on other sites
In the articles & resources section. Alternately, you could make a member search for python_regious and look at his "Contributions" section.

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!