Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qt Quick 3d RuntimeLoader nodes do not hold names and extras from the assimp aiNodes derived from GLTF2 model

Qt Quick 3d RuntimeLoader nodes do not hold names and extras from the assimp aiNodes derived from GLTF2 model

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 164 Views
  • 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.
  • M Offline
    M Offline
    mvettucci
    wrote on last edited by
    #1

    Hi,
    I'm loading a gltf2 model (exported from Blender) at runtime, using RuntimeLoader.

    The exported gltf2 file contains for each node:

    • name, the Id of node
    • extras, the custom properties associated in Blender for each node

    e.g.
    {
    "extras":{
    "scatter5":{ "estimated_square_area":0.0019120166543871164},
    "HG":{},
    "myCustomProperty":"prop"
    },
    "mesh":21,
    "name":"Curve.004",
    "translation":[
    -5.14517068862915,
    0,
    5.236505031585693
    ]
    }

    Using RuntimeLoader:

    The name property is not reported in the objectName of created models.
    The extras property is ignored.
    While debugging, I noticed that the aiNodes created by assimp lib report both information in the mName and mMetaData properties respectively.
    I noticed that, after scene creation using QSSGRuntimeUtils::createScene(*m_root, scene) in qquick3druntimeloader.cpp, properties are not reported in QtQuick3d data structures.

    Basically I would need to retrieve the identifier (name) and custom properties (extras) associated with the node when I make a pick on it, in order to distinguish the part of the model with which I am interacting.

    I also tried other ways to use gltf2 models.
    In particular I tried the recommended way to convert from gltf2 to qml using both QtDesignStudio and Balsam.
    In both cases, strangely, the created qml Models show the objectName correctly evaluated with the value of the name property, but there is no trace of the extras.

    Is it a gap in the framework or is there a way I don't know?

    Thanks,
    Best regards

    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