Rendering 3d models loaded with ASSIMP in OpenGL

Started by
1 comment, last by mv348 12 years, 5 months ago
So I've been reading the documentation of ASSIMP which I hope to use to load models in my game engine. From what I understand, every loaded model is stored in an "aiScene" object consisting of nodes, meshes, materials, bones, and animations. But they don't provide much specific information for how the rendering/animation process is carried out. I assume this is because its a very standard procedure and so the creators of ASSIMP didn't think it was relevant.

Can anyone suggest any tutorials or articles on how this node/mesh/bone hierarchy is structured so I can understand how to render/animate them?

For example, the model is stored as a hierarchy of nodes, each containing a transformation (relative to its parent) and series of meshes. Okay, thats fine, just use a recursive drawng function and OpenGL's matrix stack. But then there are bones which deform the mesh, and there is some curious interaction between meshes, nodes, and bones that the documentation of ASSIMP does not explain in much detail.

Any tips/suggestions for what to look into to help me understand this better would be appreciated.
Advertisement
The scene contains meshes and nodes. Each node has its transformation, its meshes and its child nodes. The correct way for drawing meshes is then probably


  1. set scene->mRootNode as the current node
  2. in a recursive function with a "current node" parameter,
  3. apply current node's transform
  4. render its meshes
  5. call the function again with children nodes
  6. unapply the transform

For animating bones, I recommend making a skeleton as described here.

Hope that helps.
Thank you for your response, ifthen!

Yes thats the basic hierarchy I understood. But where is the bone's role in this? Each bone (contained within each mesh) has a transformation that deforms the mesh, and a set of weights that influence how much influence it has on certain vertices in the mesh. Why do we have a node hierarchy AND a bone system? This is a main point of confusion for me.

This topic is closed to new replies.

Advertisement