Jump to content
  • Advertisement
Sign in to follow this  
mv348

OpenGL Rendering 3d models loaded with ASSIMP in OpenGL

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

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!