The Qt documentation for QMesh at the following link, https://doc.qt.io/qt-5.11/qt3drender-qmesh.html, shows that QMesh supports FBX when using the Autodesk FBX SDK. It provides no resource about how to go about setting this up, so I searched and found 1 resource on setting up the FBX SDK with Qt Creator at the following link:
https://forums.autodesk.com/t5/fbx-forum/including-sdk-to-qt-creator/td-p/8184654
I tried the above solution, but when I try to load the QMesh I still get a Debug warning that: Qt3D.Renderer.Jobs: unsupported format encountered (fbx)
This is my code, which works for .obj
files
Qt3DRender::QMesh* mesh = new Qt3DRender::QMesh();
mesh->setSource(QUrl::fromLocalFile(filepath));
I'm not sure if the "fbx geometry loader plugin is built and found" which according the Qt documentation is needed. I put the proper reference to the library in my .pro
, but as far as I can tell setSource
still doesn't know to utilize FBX files.