0

6.3.0 MinGW Using Qt3DRender::QMesh to load my obj file:

Qt3DRender::QMesh  *planeModel = new Qt3DRender::QMesh(rootEntity);
planeModel->setSource(QUrl("qrc:/tu-154/Tu154.obj"));
rootEntity->addComponent(planeModel);

File load correct but i don't see textures: enter image description here It should be: enter image description here

Using QTextureLoader says me:

Failed to load textureImage data using QImage
[Qt3DRender::GLTexture] No QTextureData generated from Texture Generator yet. Texture will be invalid for this frame
Qt3DRender::QMesh::Ready

What else might be right way here?

Github

  • Did you already tried to load the OBJ file with the SceneLoader? AFAIK QMesh only loads the mesh, not the material information. – vre May 31 '22 at 09:01
  • Yesi tried before Qt3DRender::Render::LoadSceneJob::tryLoadScene(Qt3DRender::QSceneLoader::Status&, const QStringList&, const std::function&) Found no suitable importer plugin for QUrl("qrc:/tu-154/Tu154.obj") Qt3DRender::QSceneLoader::Error –  May 31 '22 at 09:06
  • I found answer, publich it here asap –  May 31 '22 at 09:11
  • You need to build Qt with `assimp` support in order to make `QSceneLoader` load 3D file formats. – karlphillip Jun 02 '22 at 21:44
  • @karlphillip i am using speclial class for it. Publish it my github –  Jun 03 '22 at 06:15

0 Answers0