Jump to content

  • Log In with Google      Sign In   
  • Create Account


Rendering 3d models loaded with ASSIMP in OpenGL


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 mv348   Members   -  Reputation: 249

Like
0Likes
Like

Posted 02 November 2011 - 11:07 PM

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.

Sponsor:

#2 ifthen   Members   -  Reputation: 820

Like
0Likes
Like

Posted 03 November 2011 - 12:24 AM

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


  • set scene->mRootNode as the current node
  • in a recursive function with a "current node" parameter,
  • apply current node's transform
  • render its meshes
  • call the function again with children nodes
  • unapply the transform
For animating bones, I recommend making a skeleton as described here.

Hope that helps.

#3 mv348   Members   -  Reputation: 249

Like
0Likes
Like

Posted 03 November 2011 - 10:00 AM

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.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS