Assimp meshes & animation

Started by
0 comments, last by doomtr666 10 years, 2 months ago

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?

Advertisement

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.

----

www.winthatwar.com

Download our latest demo here.

www.insaneunity.com

@InsaneUnity

@DTR666

This topic is closed to new replies.

Advertisement