Sign in to follow this  

Assimp meshes & animation

This topic is 1430 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 guys,

 

I'm working on an assimp model loader. I ran into a pretty big problem, i have no idea how to associate a mesh with an animation. Right now i always assume mesh 1 belongs to animation 1, etc...

 

Is there any way to tell what animation belongs to what mesh?

Share this post


Link to post
Share on other sites

Hi,

 

With Assimp you load an aiScene which contains the list of meshes contained in the the model (I guess you already use that).

 

In addition you have a pointer to the rootNode (aiScene->mRootNode). Nodes (aiNode) give you the tree hierarchy of the differents elements of the scene, contains transforms, can be bones or contain meshes. Animation data points to nodes (in aiNodeAnim, you have the node name), changing the transform of a node over time.

 

So to handle animation properly, you have to handle the node structure, particulary if you plan to use skinning.

 

I hope this helps.

Edited by DTR666

Share this post


Link to post
Share on other sites
Sign in to follow this