Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › Qt 3D – Load obj model on Android & textures issue

Tagged: , , , ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #19858

    Javier

    Hello,

    I am testing with Qt 3D trying to load an obj model. I have two issues.

    • The model loads fine on Linux but I get the following error on Android.

     

    W linker  : /data/data/com.yourcompany.wizardEVAP.Helio/qt-reserved-files/plugins/sceneparsers/libgltfsceneimport.so: unused DT entry: type 0x1d arg 0x3860
    W linker  : /data/data/com.yourcompany.wizardEVAP.Helio/qt-reserved-files/plugins/sceneparsers/libgltfsceneimport.so: unsupported flags DT_FLAGS_1=0x81
    W Adreno-EGL: <qeglDrvAPI_eglCreateContext:2529>: EGL_BAD_CONTEXT
    W helio   : Qt3DCore::QEntity* Qt3DRender::Render::LoadSceneJob::tryLoadScene(Qt3DRender::Render::Scene*, Qt3DRender::QSceneLoader::Status&, const QStringList&, const std::function<void(Qt3DRender::QSceneImporter*)>&) Found not suitable importer plugin for QUrl("assets:/assets/3D_model/prueba.obj")

     

    • The textures, in a mtl file, are not loaded. Am I missing something? This is the code.

     

        readonly property string modelFilename: "../assets/3D_model/prueba.obj"
        Scene3D
        {
            anchors.fill: parent
            aspects: ["input", "render", "logic"]
            cameraAspectRatioMode: Scene3D.AutomaticAspectRatio
    
            Entity
            {
                id: sceneRoot
    
                Camera
                {
                    id: camera
                    projectionType: CameraLens.PerspectiveProjection
                    fieldOfView: 30
                    aspectRatio: 16/9
                    nearPlane : 0.1
                    farPlane : 100000.0
                    position: Qt.vector3d( 0.0, 0.0, -40.0 )
                    upVector: Qt.vector3d( 0.0, 1.0, 0.0 )
                    viewCenter: Qt.vector3d( 0.0, 0.0, 0.0 )
                }
    
                OrbitCameraController
                {
                    camera: camera
                    linearSpeed: 5000
                    lookSpeed: 100
                }
    
                components: [
                    RenderSettings
                    {
                        activeFrameGraph: ForwardRenderer
                        {
                            clearColor: Qt.rgba(0, 0.5, 1, 1)
                            camera: camera
                        }
                    },
                    InputSettings
                    {
                    }
                ]
    
                Entity
                {
                    id: monkeyEntity
                    components: [
                        SceneLoader
                        {
                            id: sceneLoader
                            source: modelFilename
                        }
                    ]
                }
            }
        }

     

    Thanks!

    #19862

    Javier

    I have also tested it on iOS (iPhone 7) and I got a similar error.

     

    Warning: Qt3DCore::QEntity *Qt3DRender::Render::LoadSceneJob::tryLoadScene(Qt3DRender::Render::Scene *, QSceneLoader::Status &, const QStringList &, const std::function<void (QSceneImporter *)> &) Found not suitable importer plugin for QUrl("file:///privat
    e/var/containers/Bundle/Application/4B8990C8-1899-452F-A48F-ECFEA955F37C/Helio.app/assets/3D_model/prueba.obj") ((null):0, (null))
    Warning: stale focus object QQuickLoader(0x1c055db10) , doing manual update ((null):0, (null))

    Just to clarify, I already tested it with the last Felgo version, released yesterday.

     

    #19867

    Günther
    Felgo Team

    Hi,

    as the code works on Linux I can think of two possibilities:

    • Due to limitations of the native Android and iOS platform, certain 3D features / objects / textures / formats might not be supported on mobiles.
    • There’s a Qt bug which only affects mobile platforms.

    Maybe also some code changes are required to make some features work on mobiles. I suggest to make sure that your code is correct and that you can run 3D on mobiles, e.g. with some of the Qt 3D examples.

    For further help about Qt 3D, I recommend to ask in the official Qt forums.

    Best,
    Günther

    #19901

    Javier

    Thanks Günther,

     

    I will have a look and let you know if I find something.

    #19903

    Javier

    Ok, so this error is probably a Qt bug. It is mentioned there that the Assimp importer plugin (used to load 3d model files) is not deployed properly on Android (and probably also on iOS).

    #21950

    Guillermo Ambar

    you can compile the plugin from the source code (with the android kit) and put the .so in its place.
    To use the plugin you need to include all its dependencies in the .pro

Viewing 6 posts - 1 through 6 (of 6 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded