I am experiencing issues loading and displaying a 3D model (.obj) in QML (Qt 5.15/6.0.0). I have tried the following 3 techniques but they all seem to have unique issues.
Using QQuickItem and OpenGL with my own .obj loader. This can work but I'd like to take advantage of the power Qt provides as far as quality rendering, assimp model loading, and the potential to move away from OpenGL-specific draw code.
A Scene3D from the Qt3D module. This works but it crashes on exit. I've tried suggested workarounds but they all fall short of preventing the crash, or if I do prevent the crash then my model doesn't load or display properly.
A View3D from Quick 3D. This seems like the best option going forward but the drawback seems to be that I need to preprocess the obj file using balsam in order to convert it into a qt .mesh format. I'd rather avoid this step as I'd like users to be able to load their own models (obj, step, etc.)
Being able to set the mesh and texture source is required. This is possible using a Scene3D with a Mesh, but I don't see the same option using a View3D with a Model object.
Ideally, I could use the qml Qt3D.Render::Mesh item or Qt3DRender::QMesh to load object files dynamically but then use that mesh to render in the View3D. Or use a custom QQuick3DGeometry that loads the model and can be added as the QtQuick3D::Mode.geometry.
Am I missing something here or am I trying to blend two incompatible modules: Qt3D and Quick3D? Can a model be dynamically loaded into a View3D without converting it into a .mesh file?