How to use FBX files with QMesh?
-
The documentation suggests that FBX files can be used in the following picture/link of the Qt documentation below. I've included the Autodesk SDK in my project and included the header file (and successfully have access to the library classes) and still get an error when loading the source file for the QMesh.
https://doc.qt.io/qt-5.11/qt3drender-qmesh.html
This is my code:
Qt3DRender::QMesh* handMesh = new Qt3DRender::QMesh(); handMesh->setSource(QUrl::fromLocalFile(filepath));
This is the error I get:
Qt3D.Renderer.Jobs: unsupported format encountered (fbx)
What I'd like to know is a step-by-step guide for setting FBX in Qt Creator properly. What is the FBX geometry loader plugin needed? I've included 3drender in my .pro file, but I still get the error. For reference, I'm using Qt 5.11.2 with Qt Creator 4.7.2
Any help is greatly appreciated.
-
Hi and welcome to devnet,
Do you have the Autodesk SDK installed on your system ?
-
Yes, I have it included in my project, added the header, and can succesffuly access the sdk classes:
This is my .pro file:
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/fbxsdk/lib/vs2015/x64/release/ -llibfbxsdk else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/fbxsdk/lib/vs2015/x64/debug/ -llibfbxsdk else:unix: LIBS += -L$$PWD/fbxsdk/lib/vs2015/x64/ -llibfbxsdk INCLUDEPATH += $$PWD/fbxsdk/include/ DEPENDPATH += $$PWD/fbxsdk/lib/vs2015/x64/
And I included the sdk in my program as so:
#include <fbxsdk.h>
-
Most likely, the SDK .dlls are not found when you run your application.
-
@SGaist said in How to use FBX files with QMesh?:
Most likely, the SDK .dlls are not found when you run your application
Hi SGaist,
We are also trying to load FBX in QT and we have the same issue (not supported)
Have you been able to make it work on your side ? -
Hi and welcome to devnet,
At what point ? Building the plugin ?
When running your application ?
On what platform ?