Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Cannot load gltf files with QML SkeletonLoader



  • In Qt 5.15 I am trying to load a glTF file with the QML SkeletonLoader.

    Armature {
        skeleton: SkeletonLoader {
            id: skeleton
            source: "qrc:/meshes/RiggedSimple.gltf"
        ...
    

    I tried orienting on this example: KDAB/qt3d-examples/animated-skinned-mesh/.

    I downloaded the model (RiggedSimple.gltf) from the official glTF github page. For models with glTF version 1.0 an error message is prompted:

    [Warning] [Qt][default][2] :0 :: Unsupported version of glTF "1.0"
    

    Thus I assume that only glTF version 2.0 is supported. But when loading such a model a whole bunch of these errors occur:

    [Warning] [Qt][default][2] :0 :: QIODevice::read (QFile, ":\meshes\_very long cryptic path_\...KAGAAYgAIAGEAYwAGAGIAZAAEAGMAZQACAGQARgBAAGUA"): device not open
    [Warning] [Qt][Qt3D.Renderer.Jobs][2] :0 :: Unknown buffer 0 when processing buffer view
    [Warning] [Qt][Qt3D.Renderer.Jobs][2] :0 :: Unknown buffer 0 when processing buffer view
    [Warning] [Qt][Qt3D.Renderer.Jobs][2] :0 :: Unknown buffer 0 when processing buffer view
    ...
    

    If the same model is to be loaded via a QML Mesh, errors occur as well:

    [Warning] [Qt][Qt3D.GLTFGeometryLoader][2] :0 :: failed to read sufficient bytes from: _very long cryptic path_
    

    Loading it via a QML SceneLoader is also not working.

    My question now: What could be the problem here? And generally what is neccessary, whether on model export (e.g. Blender) or Qt import side, to make glTF work in Qt 5.15?


  • Lifetime Qt Champion

    Hi,

    Sorry I haven't used that yet so I won't be really useful but did you try to load the files directly from the disk rather than Qt resources ?