Skeletal Animation Common Errors

Hi everyone, im building my first engine with OpenGL and C++ and i have hit my first major roadblock at skeletal animation.

I have followed along with every tutorial I could find (ThinMatrix, ogldev and some random blogs I found) and after understanding what Skeletal animation is and how it should be implemented, I read up on Assimp’s animation pipeline.

I have been working on this for over 2 weeks and my animated model still looks like crap. I have included a video to show you what it currently looks like.

https://youtu.be/Eorbm1XkYCg

In the video, a static model has been included to show that projection view and model matrices are all correctly setup and working for all other parts of the engine. the colours are generated in the fragment shader based on the texcoords.

I’m not asking for anyone to fix my code, I would like to know the most common mistakes made when implementing skeletal animation , and if anyone has any resources they can recomend, I would be extremely appreciative.

Thanks in advance for any input.

The most common mistake is not understanding the relationships between coordinate systems. E.g. whether a matrix is relative to the bone’s parent or to bone-space or to the bind pose matrix or whatever.

The first thing you should do is to check that the skeleton itself is being animated correctly.

For each bone, transform the point [0 0 0 1] to find its origin. Draw a line from the origin of each bone to the origin of its parent. That should produce an animated stick figure. If that isn’t right, nothing else will be.

[QUOTE=liamdx;1292363]Hi everyone, im building my first engine with OpenGL and C++ and i have hit my first major roadblock at skeletal animation.

if anyone has any resources they can recomend, I would be extremely appreciative.[/QUOTE]

Here are my favorites:

[ul]
[li]Re: Question about FBX/ASSIMP - skeletal animation [/li][/ul]
The first step with skeletal animation is to make sure everyone’s talking the same language. Here’s a post I made a while back describing Gregory’s terminology for the transforms involved:

[ul]
[li]Re: Need help with skeletal animation [/li][/ul]

I’m not asking for anyone to fix my code, I would like to know the most common mistakes made when implementing skeletal animation…

Well, related to assimp and the ogldev tutorial:

[ul]
[li]Tutorial 38: Skeletal Animation With Assimp [/li][/ul]
when I was first looking through this, I swapped e-mail with the author about a few questions and suggestions.

Here is one piece from our e-mail thread that might be useful to you:

I would suggest taking your code and gradually mutate its transforms and assimp usage into what the ogldev tutorial is doing (or vice versa). That’s likely to point out the key difference.