Jump to content
  • Advertisement
Sign in to follow this  
Lugerns

Bone animation (Matrix problem)

This topic is 4778 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 have a problem white my bone animation, it consists of tow bones and tow boxes, and one box is assigned tow each bone. I have the boxes matrixes these rotates/transforms/scales the object so that it looks as it should. And one array(key frames) of bone matrixes that rotates/transforms the bone. If I just use the boxes matrix the object looks as it should. And if I only use the bones matrix(bone matrix of a specific key frame), to transform the boxes, the animation looks fine, but the object dose not look as it should. So I multiplied these tow matrixes together. And the result is not what I wanted the axes of rotation and translation in the animation gets wrong and the object don't look as it should it also gets the wrong rotation and translation. I am not so good at math when it comes to matrixes, but I am learning. So what do I do to get the object and the animation to look as it should? /Luger

Share this post


Link to post
Share on other sites
Advertisement
Hi :)

Without having any knowledge towards your code, have you tried switching the multiplication-order? :)
One common mistake is to forget wether you use column-wise or row-wise matrices!

Hope everything works out for ya'

Best regards,
Roquqkie

Share this post


Link to post
Share on other sites
I don't think that's it, I am using DirectX and the D3DXMatrix.... functions to set up the matrixes and to manipulate them, so I hope the column and row's are handled correctly by those functions.

/Luger

Share this post


Link to post
Share on other sites
It's not the row and column order he is referring to but the multiplication order of the matrices. When multiplying matices order does matter.

A * B * C is NOT the same as C * B * A

Perhaps you could show us some images?

Cheers

Share this post


Link to post
Share on other sites
As ernow said, I meant the multiplication-order.

A * B != B * A

Futhermore I also wanted you to be sure that you didn't have to transpose any of your matrices (column-wise to row-wise and vica versa)

Best regards,
Roq

Share this post


Link to post
Share on other sites
oki, I will try to expline this white som screen/pics I made.

If I just only use the box matrix the box looks as it should.
Like this

And if I use the box bone matrix it looks like this.
Like this

You can see the difference.



Now here is what the animation looks like when I only use the bones matrix to transform the object.
Like this

And here is what I would like it to look like.
Like this

/Luger

Share this post


Link to post
Share on other sites
Sign in to follow this  

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