Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Show 3D model of GLB file in Qt window

Show 3D model of GLB file in Qt window

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 1.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sridharan
    wrote on last edited by Sridharan
    #1

    Hi,
    My requirement is to show 3D model of GLB file format in Qt window. I use QSceneLoader object to achieve it but I could only see blank window. I see following error in my application output :

    "Qt3D.Renderer.SceneLoaders: Qt3DCore::QEntity* Qt3DRender::Render::LoadSceneJob::tryLoadScene(Qt3DRender::QSceneLoader::Status&, const QStringList&, const std::function<void(Qt3DRender::QSceneImporter*)>&) Found no suitable importer plugin"

    I read Qt documentation that QT framework uses "Open Asset Import Libray" (AssImp) to load 3D content. "AssImp" library supports GLB file format. I use Qt 6.5.2 version

    I have pasted my code below. What am i missing ?

    int main(int argc, char **argv)
    {
    QApplication app(argc, argv);
    Qt3DExtras::Qt3DWindow *view = new3DExtras::Qt3DWindow();

    Qt3DCore::QEntity *rootEntity = new Qt3DCore::QEntity();
    
    Qt3DRender::QSceneLoader *loader = new Qt3DRender::QSceneLoader(rootEntity);
    QObject::connect(loader, &Qt3DRender::QSceneLoader::statusChanged,
                     &app, [](Qt3DRender::QSceneLoader::Status s){qDebug() << s;});
    QUrl url = QUrl::fromLocalFile("D:/Work/2023/gfem.glb");
    loader->setSource(url);
    
    view->setRootEntity(rootEntity);
    view->show();
    
    return app.exec();
    

    }

    C 1 Reply Last reply
    0
    • S Sridharan

      Hi,
      My requirement is to show 3D model of GLB file format in Qt window. I use QSceneLoader object to achieve it but I could only see blank window. I see following error in my application output :

      "Qt3D.Renderer.SceneLoaders: Qt3DCore::QEntity* Qt3DRender::Render::LoadSceneJob::tryLoadScene(Qt3DRender::QSceneLoader::Status&, const QStringList&, const std::function<void(Qt3DRender::QSceneImporter*)>&) Found no suitable importer plugin"

      I read Qt documentation that QT framework uses "Open Asset Import Libray" (AssImp) to load 3D content. "AssImp" library supports GLB file format. I use Qt 6.5.2 version

      I have pasted my code below. What am i missing ?

      int main(int argc, char **argv)
      {
      QApplication app(argc, argv);
      Qt3DExtras::Qt3DWindow *view = new3DExtras::Qt3DWindow();

      Qt3DCore::QEntity *rootEntity = new Qt3DCore::QEntity();
      
      Qt3DRender::QSceneLoader *loader = new Qt3DRender::QSceneLoader(rootEntity);
      QObject::connect(loader, &Qt3DRender::QSceneLoader::statusChanged,
                       &app, [](Qt3DRender::QSceneLoader::Status s){qDebug() << s;});
      QUrl url = QUrl::fromLocalFile("D:/Work/2023/gfem.glb");
      loader->setSource(url);
      
      view->setRootEntity(rootEntity);
      view->show();
      
      return app.exec();
      

      }

      C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      @Sridharan said in Show 3D model of GLB file in Qt window:

      Found no suitable importer plugin

      Have you deployed the plugins to the machine running the program, or is this happening on your development machine?
      Does the file D:/Work/2023/gfem.glb exist and does it contain a valid glTF binary file (loadable, for example, the gITF sample viewer).

      S 1 Reply Last reply
      0
      • C ChrisW67

        @Sridharan said in Show 3D model of GLB file in Qt window:

        Found no suitable importer plugin

        Have you deployed the plugins to the machine running the program, or is this happening on your development machine?
        Does the file D:/Work/2023/gfem.glb exist and does it contain a valid glTF binary file (loadable, for example, the gITF sample viewer).

        S Offline
        S Offline
        Sridharan
        wrote on last edited by
        #3

        Hi @ChrisW67 ,
        Thanks for your reply. This happens in my development machine. Plugins like "assimpsceneimport.dll, gltfsceneexport.dll, gltfsceneimport.dll" are available in my QT installation.

        Also, my filepath exists. gfem.GLB file is valid and I could load the file in the viewer you have recommended.

        I am using Qt open source version. Is Qt 3D available only for commercial version ?

        Thanks,
        Sridharan

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved