Jump to content
  • Advertisement
Sign in to follow this  
Dev_NightDreamer

OpenGL Help with calculate skinned models loaded with Assimp

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

Hey dudes.

 

I'm using C++ with SFML + OpenGL (+ GLM) + Assimp and I'm currently working on an animation system for my first 3D game project and I'm struggling with bone animated 3D meshs and the Assimp library since a few weeks.

Since threads to this theme are rare on the internet, I decided to ask you guys. ^^

First of all, I wanted to say, that I can load and display static models with textures assigned properly. smile.png 
Although the shaders for rendering to a different framebuffer and for post processing are working fine.
But I can't get some animation working flawlessly due to the fact, that I didn't understand some things in order to complete this task. ohmy.png

So, my main question is (which is moreover the main problem): How do I get one specific keyframe of the bones and get their transformations/rotations/scaling ?

My thoughts are:

  1. Load the vertex bone data, so each vertex know, by what bone it is how much influenced (done! biggrin.png )
  2. Each frame:
    - Get the time, since the animation started (done! smile.png)
    - Look up the "nearest" time stamp in the keyframe list (I didn't want to interpolate yet, just keyframe after keyframe for now )
    - Calculate all transformations per bone for this specific keyframe in a 4x4 matrix
    - Update transformation matrices in the shader (maybe done, can't test it... biggrin.png)

1. is done properly and I stuck with 2. since a few weeks now.
The problem is, so far I can define it, how can I look up one keyframe for each bone in Assimps "aiScene" and how do I calculate the per bone transformations? unsure.png 

Does anybody have good tips on this or something like that? blink.png 

Good evening,
NightDreamer

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!