Qt3D mesh loading works only from *.obj files



  • Hi

    I'm trying to load some mesh files (Qt 5.5) but strangely only *.obj types work. I have tried *.3ds, *.dxf, *.blend, etc. Some of them crash, some of them just don't load anything. The trouble with the .obj files is that they don't contain materials.

    I don't find any forum posts nor bug reports on it. Has anyone tried loading mesh files other than .obj?

    Regards
    Lauri


  • Lifetime Qt Champion

    Hi,

    AFAIK, it should be possible if you have ASSIMP installed on your system. IIRC, there's an example using it coming with Qt3D



  • Aah, is it needed to install assimp libs myself? Qt is so unified and bundled framework that one can sometimes forget that extra libs are needed.

    Do you know if there is a guide somewhere that I could follow? Searched a little bit but couldn't find any.

    PS. I guess that must also be the cause why some plugins are not loaded:
    -/
    Failed to load scene parser plugin "C:/Qt/5.5/mingw492_32/plugins/sceneparsers/assimpsceneparser.dll"
    Failed to load scene parser plugin "C:/Qt/5.5/mingw492_32/plugins/sceneparsers/gltfsceneparser.dll"
    /-


  • Lifetime Qt Champion

    After a quick look at the module, assimp is part of the 3rdparty however I don't know if it was part of the 5.5 tech preview release. If you can, can you recheck with the 5.6 beta ?



  • Yes, I checked the same, and it is already part of Qt 5.5. I think I was missing the point "Mesh vs SceneLoader" when loading models from files. The documentation is quite limited right now and confusion is easy to come. Mesh works with ".obj" files but SceneLoader is needed for the rest - if I'm right.

    Anyway, there seems to be some issues with SceneLoader as well (loaded models not complete, crash, etc) but at least I can see that it should work and almost works :)

    I guess I will give it try and see if Qt 5.6 has any improvements.



  • Tried with Qt 5.6 alpha. Loading and rendering models is a lot more stable.

    The only strange thing left now is that the rendered scene is so bright. I tried loading some models that definitely worked with the older Qt3D version - and the same effect - too bright. Can that be tuned somehow?


  • Qt Champions 2016

    @pcspets
    I don't think so, but my test lamp mesh (with phong material) doesn't look too bright to me. If you're using lights, I believe they have the intensity property. There might be something in your configuration/setup. Are you using a shadow mapping or shaders, that could be causing it?



  • @kshegunov
    I'm not using any shaders explicitly. But it seems that "assimp" includes more light info from the files now than the old Qt3D importer used to. When I export .obj file from 3DS MAX with the tick "Force black ambient" - then everything is OK and the mesh is not overburned in Qt3D. I would like to export *.3ds (it's smaller and loads faster) but there I haven't figured out what kind on lighting I need to disable to get rid of the burning. I tried adding a dummy light source and disabled it in 3DS Max (to get rid the default light that Max adds) but that didn't do the trick. Perhaps it's something how the materials are defined.


  • Qt Champions 2016

    @pcspets
    Well, I don't really know what might be causing the problem. Maybe try exporting without any lights, and then add your light in your program? Aside from that, you could try to post your question through the Qt Interest mail group.



  • @pcspets Hi, I have a question,can you help me?
    When I use SceneLoader import .3ds fiel. How am I supposed to render the different blocks of the file?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.