Jump to content
  • Advertisement
Sign in to follow this  
Keba

Keyframed Skeletal Animation Problem

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

Hello, I have this problem with keyframed skeletal animation. First I compute the (in maya) local transformation matrix for each bone: L = R * T, where R is the rotation (in quaternion) and the T is the translation of the bone(relative to its parent bone). Here i could also add the scaling, but for now i set it to {1,1,1} so i let it be. This is done for all bones in all keyframes in the exported animations. The application then retrieves two keyframes that match the current time and interpolates between these. the next step is to update the hierarchy: C = L * P, here the C is the final combined matrix of the bone in the hierarchy and the L is the local transformation and the P is the parent transformation. So far so good. the Hiearchy is updated, and animated when rendering. Now its time for skinning. When skinning the model onto the hierarchy we need a offset matrix. and its here the questions arise. how do i compute this offset matrix? Is it: * the inverted transformation matrix of the bone in T-pose? * Advance Animation With DirectX(Jim Adams): "you can compute it yourself by first updating the frame hierarchy and then inverting each frames combined transformation". This dosen't make sense to me since A*A^-1 = I. The book sugest that one should calculate the combinedmatrix(A) and then invert it (A^-1) and then the multiply these.

Share this post


Link to post
Share on other sites
Advertisement
In the technique I use. You first iterate through the bones and generate their inverse matrix to the original pose. Then transform your mesh to this inverse state (if you rendered it now, it would look colapsed on itself). All of that is a one time preprocess. Every frame, you calculate the transform matrix for each bone (from the origin you just moved them all to), transform you verticies, and draw.

It's brilliantly simple. Thank RSN for that tid bit. Tell me if my understanding of it is incorrect but I have recreated the concept a few times in IK demo's.

Right now I'm workin on ditching keyframes all together and converting my skeleton to follow proceduraly generated target points.

edit: In your example, basicaly do the last step your confused about, first. Imagine your lower arm. Transform all your lower arm verticies to the origin first, then when you want to position it, all you have to do is calculate the forward transformation and boom you're there.

Share this post


Link to post
Share on other sites
Quote:

You first iterate through the bones and generate their inverse matrix to the original pose.


Is this the T-pose, or bindpose, you mean? and the matrix we are talking about is it the transformation matrix for that pose. If i remember this correct, that inversed matrix will transform the vertices in the t-pose/bindpose to local space?

Quote:

Every frame, you calculate the transform matrix for each bone (from the origin you just moved them all to), transform you verticies, and draw.


Here i get confused about the "offset" matrix, the matrix which is responsible to transforming my vertices to the origin. Thats the one i wan't.

Quote:

In your example, basicaly do the last step your confused about, first. Imagine your lower arm. Transform all your lower arm verticies to the origin first, then when you want to position it, all you have to do is calculate the forward transformation and boom you're there.


This may sound stupid...whats is the "forward transformation"?


So let se if I get this staright. I Should move my vertices, let say for the lower arm, to the origin, performe the rotation, and then apply a offset(the offset to the parent) and then mulptiply with the parent transformation matrix?

Quote:

Right now I'm workin on ditching keyframes all together and converting my skeleton to follow proceduraly generated target points.


Sounds interesting :D.....first things first though....gotta catch this "bugg" ;)...gotta catch them all

EDIT: ahhha!...after reading RSN I now understand what you mean, have to test it later...

[Edited by - Keba on November 8, 2006 2:02:39 AM]

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!