Jump to content
  • Advertisement
Sign in to follow this  
ASL

Basics of Skeletal Animation - Please help!

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

So I have spend the last month or so trying to figure out how skeletal animation work. I have read tutorials etc. I have learned alot - still it seems I dont have that last bit of knowledge to get a break-through! Im coding in Java and my designer is using MilkShape but is saving his work as b3d (Blitz3d), a format he believes is the best. So in the future when I get this right I will build a parser/loader for that format. We are planning to build an online mmo-rpg. Well, enough of my reasons to ask this question! I have build a writer that dumps all the good stuff in a b3d-file to the console with an illustration of the herachi of the nodes aswell. The vertex pool is dumped to a txt-file. This way I have a good visual view of how such a chunk-based 3d-file is build. Now I know how to build a 4x4 matrix with a quaternion(rotation) and a vector(translation). In java its quite simple to use the Matrix4f-class that simple takes a quaternion and a vector as its arguments. Also transforming vertices is not a problem that is also simple in java: matrix.transform(vector, target vector). Multiplying matrices shouldnt eighter be a problem - but which one the concatenate to which -> IM LOST! My designer has been kind enough to supply me with ultra-simple animation examples I can practice on. One such example, I will use in this thread. Imagine an example consisting of only 3 joints (could be an arm) joint1 could be a shoulder, joint2 the albow and joint3 would be the wrist. Animation occurs only in joint2 (albow). the rotation in joint2 causes the triangle on joint3 to move. So here is the ultra simple example I would like some help with: joint1 O---------------------Ojoint2-----------------O joint3 joint1 info - frame1: matJ1_F1 - (no animation). joint2 info - frame1: matJ2_F1 - frame10: matJ2_F10 - frame20: matJ2_F20 joint3 info - frame1: matJ3_F1 - (no animation). The triangle attached to joint3 has 3 vertices, the total mesh consists of these 3 vertices - lets call them: Ver1, ver2 and ver3. So this is a simple example - still it has it all! "mat" stands for matrix ofcourse. ------------ My question is as follows: could someone be so kind as to setup some psedo-code of how I calculate the new positions of the vertices in each keyframe 1-10-20. Also how I calculate the matrix that does the transforming for each keyframe. Well I hope the question is clear, cus I really need to understand this! Please help...

Share this post


Link to post
Share on other sites
Advertisement
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!