Search code examples
graphicsblenderassimp

Assimp not loading hierarchy of obj file exported from blender


I made a model in blender with hierarchy looking like this

enter image description here

exported it as .obj file

then I loaded this file in opengl with Assimp

Assimp::Importer importer;

const auto * scene = importer.ReadFile(filename, aiProcess_Triangulate);

if (!scene || scene->mFlags & AI_SCENE_FLAGS_INCOMPLETE || !scene->mRootNode)
{
    Logger->log(importer.GetErrorString());
    return;
}

the mRootNode contains 30 children, which is the number of objects in the scene but each of these child contains no children so it seems like either Assimp discarded the hierarchy information or blender didn't output the hierarchy information.

can someone tell me what I'm missing here?

Thanks


Solution

  • this is a knows bug in the obj-importer from Assimp. We do not store the group hierarchy correctly. It would be great to get a small example that I can try to fix the issue, because in the past I didn't find the time for it.

    Thanks a lot for fingerpointing me :-)!

    Kim