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. Loading .FBX file with QT
Forum Updated to NodeBB v4.3 + New Features

Loading .FBX file with QT

Scheduled Pinned Locked Moved Unsolved General and Desktop
10 Posts 6 Posters 5.6k 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.
  • C Offline
    C Offline
    Charlie514841
    wrote on last edited by
    #1

    I am trying to load a .FBX file using the QT3D library. Currently I am running on windows.

    However, I am getting a Found no suitable importer plugin for QUrl error on loading the file. I am guessing that the assimp inside the QT3D module is not linked or something. Is there a need to link it inside the .pro file or something? If so how do I do that?

    Thanks.

    // main.qml
    
    import QtQuick.Controls 1.4
    import QtQuick.Dialogs 1.3
    import QtQuick.Scene3D 2.0
    
    import Qt3D.Core 2.0
    import Qt3D.Render 2.0
    import Qt3D.Input 2.0
    import Qt3D.Extras 2.0
    
    ApplicationWindow
    {
        visible: true
        width: 640
        height: 480
        title: qsTr("3D Viewer")
    
        toolBar: ToolBar
            {
                ToolButton
                {
                    text: "Open 3D Model"
                    onClicked:
                    {
                        fileDialog.open()
                    }
                }
            }
    
        FileDialog
        {
            id: fileDialog
            onAccepted:
            {
                sceneLoader.source = fileDialog.fileUrl
            }
        }
    
        Scene3D
        {
            anchors.fill: parent
    
            aspects: ["input", "logic"]
            cameraAspectRatioMode: Scene3D.AutomaticAspectRatio
    
            Entity
            {
                id: sceneRoot
    
                Camera
                {
                    id: camera
                    projectionType: CameraLens.PerspectiveProjection
                    fieldOfView: 30
                    aspectRatio: 16/9
                    nearPlane : 0.1
                    farPlane : 1000.0
                    position: Qt.vector3d( 10.0, 0.0, 0.0 )
                    upVector: Qt.vector3d( 0.0, 1.0, 0.0 )
                    viewCenter: Qt.vector3d( 0.0, 0.0, 0.0 )
                }
    
                OrbitCameraController
                {
                    camera: camera
                }
    
                components: [
                    RenderSettings
                    {
                        activeFrameGraph: ForwardRenderer
                        {
                            clearColor: Qt.rgba(0, 0.5, 1, 1)
                            camera: camera
                        }
                    },
                    InputSettings
                    {
                    }
                ]
    
                Entity
                {
                    id: monkeyEntity
                    components: [
                        SceneLoader
                        {
                            id: sceneLoader
                        }
                    ]
                }
            }
        }
    }
    
    
    
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      What format is that and where does it come from ?
      What version of Qt are you using ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      W 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        What format is that and where does it come from ?
        What version of Qt are you using ?

        W Offline
        W Offline
        wrosecrans
        wrote on last edited by
        #3

        @SGaist
        FBX is an Autodesk format. Assimp theoretically supports it: https://github.com/assimp/assimp/blob/master/code/FBXDocument.h I don't know if Qt3D's use of Assimp disables it or needs some extra glue code?

        @charlie514841 How was the FBX file made? With what version of what software, etc? Can you download the AssimpView utility from upstream assimp, and see if it loads the file and displays it correctly? If assimpview can't read the file, then it's probably not a Qt issue, just a problem with the assimp library that Qt uses and you may need to talk to the developers of that library.

        1 Reply Last reply
        0
        • C Offline
          C Offline
          Charlie514841
          wrote on last edited by Charlie514841
          #4

          @wrosecrans said in Loading .FBX file with QT:

          AssimpView

          I am using Qt 5.11.2. Yes the AssimpView utility works fine and can open the file.

          Just curious, is there an additional compilation step to install assimp or linking step inside the .pro file to be done seperately for it to work? Because I have always assumed that there is a assimp dll included within the Qt framework directly.

          More specifically, the error was

          Qt3D.Renderer.SceneLoaders: Qt3DCore::QEntity* Qt3DRender::Render::LoadSceneJob::tryLoadScene(Qt3DRender::Render::Scene*, Qt3DRender::QSceneLoader::Status&, const QStringList&, const std::function<void(Qt3DRender::QSceneImporter*)>&) Found no suitable importer plugin for QUrl
          
          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Do you get the same error if you use the path to you file directly in your QML code ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            C 1 Reply Last reply
            0
            • SGaistS SGaist

              Do you get the same error if you use the path to you file directly in your QML code ?

              C Offline
              C Offline
              Charlie514841
              wrote on last edited by
              #6

              @SGaist Yes I get that as well.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Would it be possible to share that file or at least a minimal example to test ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                F 1 Reply Last reply
                0
                • SGaistS SGaist

                  Would it be possible to share that file or at least a minimal example to test ?

                  F Offline
                  F Offline
                  filipdns
                  wrote on last edited by
                  #8

                  @SGaist Hello SGaist, I have same problem, then I give you an example with 2 model, one in obj, qt is able to load it and the fbx qt unable to load it..

                  I install the FBXSDK and in pro file I try to import libs with:

                  LIBS += -LE:/Qt/5.11.2/msvc2015_64/lib/SDKFBX/x64/release/ -llibfbxsdk
                  INCLUDEPATH += E:/Qt/5.11.2/msvc2015_64/include/SDKFBX/fbxsdk
                  DEPENDPATH += E:/Qt/5.11.2/msvc2015_64/include/SDKFBX/fbxsdk

                  but same message:
                  Qt3D.Renderer.Jobs: unsupported format encountered (fbx)

                  here the dropbox link with project
                  https://www.dropbox.com/s/0k637m2cpzfao3m/simple-qml.zip?dl=0

                  kind regards
                  Philippe

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    TheQuaternion
                    wrote on last edited by
                    #9

                    Did you ever figure this out?

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      K8S running
                      wrote on last edited by
                      #10

                      No wrong on ubuntu 24,but i meet same error on windows.

                      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