QT3D_QML. loading .3ds files



  • I tried to load a .3ds model.

    import Qt3D 2.0
    import Qt3D.Render 2.0
    import QtQuick 2.1 as QQ2

    Entity {
    id: sceneRoot

    Camera {
        id: camera
        projectionType: CameraLens.PerspectiveProjection
        fieldOfView: 45
        aspectRatio: _window.width / _window.height
        nearPlane: 0.1
        farPlane: 1000.0
        position: Qt.vector3d(0.0, 10.0, 20.0)
        viewCenter: Qt.vector3d(0.0, 0.0, 0.0)
        upVector: Qt.vector3d(0.0, 1.0, 0.0)
    }
    
    FrameGraph {
        id : external_forward_renderer
        activeFrameGraph : ForwardRenderer {
            camera: camera
            clearColor: Qt.rgba(0.0, 0.4, 0.7, 1.0)
        }
    }
    
    Entity {
        Mesh {
            id: myModel
            source: "file:///C:/Users/Hoang Pham/Desktop/Qt3D-qml/ChallengeForNewApp.3ds"
        }
    
        Transform {
            id: myModelTransform
            property real scaleFactor: 10
    
            Scale {
                scale: 1.0 / myModelTransform.scaleFactor
            }
        }
    
        components: [
            myModel,
            myModelTransform
        ]
    }
    

    }

    I got crashing error:
    Qt3D.Core.ChangeArbiter: void __cdecl Qt3D::QChangeArbiter::createThreadLocalChangeQueue(void *) QThread(0x6b6638, name = "Thread (pooled)")
    Qt3D.Core.ChangeArbiter: void __cdecl Qt3D::QChangeArbiter::createThreadLocalChangeQueue(void *) QThread(0x6b63b8, name = "Thread (pooled)")
    QMetaObject::indexOfSignal: signal transformsChanged() from Qt3D::QTransform redefined in Qt3D::Quick::Quick3DTransform
    Qt3D.Render.Jobs: Entering void __thiscall Qt3D::Render::UpdateWorldTransformJob::run(void) QThread(0x6b63b8, name = "Thread (pooled)")

    Program: D:\Dev\qt5\qtbase\lib\libGLESv2d.dll
    File: ......\3rdparty\angle\src\common\MemoryBuffer.cpp
    Line: 76
    Expression: mData

    any help for me?



  • It works fine with: source: "file:///C:/Users/Hoang Pham/Desktop/shadow-map-qml/toyplane.obj"
    but i still got warning:
    QMetaObject::indexOfSignal: signal transformsChanged() from Qt3D::QTransform redefined in Qt3D::Quick::Quick3DTransform
    Qt3D.Render.Jobs: Entering void __thiscall Qt3D::Render::UpdateWorldTransformJob::run(void) QThread(0x7a6088, name = "Thread (pooled)")

    whats difference here ? obj and 3ds ?



  • I have the same problem. Would be awesome if someone had a solution to this!

    Toyplane renders as expected. But other .obj files doesn't. It crashes with some .3ds files, but not others, however still nothing rendered. I dont understand what makes the toyplane.obj differ from other obj-files.

    Apperantly Scene3D doesn't support 3ds files at the moment. SceneLoader should do, as it uses assimp. However, that doesn't work for me either, so i reverted to 5.4 and an older verson of Qt3D and got the 3ds files to render.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Can you share both which exact version of Qt you are using ? On which platform ? Where did you get the failing files ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.