Jump to content
  • Advertisement
Sign in to follow this  

Skeletal animation issues

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

Hi Everyone, I've been spending the past couple of days hammering away at getting skeletal animation imported from .dae files.


I have been following this tutorial which in all honesty has been a travesty to work though (poorly formatted code, confusing variable names, and a strange obsession with converting every math component in assimp to a glm equivalent)

Through it all, I seemed to have at least gotten a "desired" result, though that results is more apt to being called something straight out of David Cronenberg's house of horrors.

I have attached all the source (c++) files relevant to the animation system, I figure another experienced set of eyes will help point out what I've missed.



Share this post

Link to post
Share on other sites

The first step is to understand the data of a skinned mesh : the vertices are in world space.
Once you know that you understand to move from one world space to another world you have to do 2 operations : remove the actual world space and add the new world space.
To remove the actual world space you use the inverse of the bind pose matrix, bind pose matrix is the world space matrix of the bone.
When you apply this inverse bind pose matrix you end to local space, so then you simply have to use the new world space matrix.
The new world space matrix is the matrix computed for one animation at a time using interpolation on keyframes.
Each bones of your mesh contains a serie of keyframes.
It why the matrix of the bone is computed as :

InverseBoneBindPose * BoneAnimationWorldSpace

You can add your object world space in the calcule :

InverseBoneBindPose * BoneAnimationWorldSpace * ObjectWorldSpace
Edited by Alundra

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!