Support EXT_mesh_gpu_instancing in the native glTF importer


Import the extension's per-instance TRANSLATION, ROTATION and SCALE
attributes as an instance table, held by a new Instancing resource node
in the scene description. RuntimeLoader serves the table from an
internal QQuick3DInstancing subclass, and balsam writes it in
FileInstancing's binary format to an instances/ folder next to the
generated QML. Custom attributes, and attributes with the wrong
accessor type, are skipped with a warning.

The extension applies the instance transforms between the node's
global transform and the mesh. To get that composition from the
renderer, the node's transform goes on a plain parent node, and the
model becomes its own instance root with an identity transform. The
node's children attach to that parent, unaffected by the instancing.

The parent also carries the asset's node name, so
RuntimeLoader::query() returns a Node rather than a Model for an
instanced node, as its documentation now states.

[ChangeLog][Asset Import] The native glTF importer now supports
EXT_mesh_gpu_instancing. Instanced nodes import as a Model with an
instance table, served from an instances/*.bin file next to the QML
generated by balsam, or built in memory by the RuntimeLoader.

Task-number: QTBUG-148576
Change-Id: Ib169f1f7732fa3e85ce05d74559cb85a87bd5a2a
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
commitda479a77fc55adb7b3b3ccf04714e7a84a03ceae
parent4a1ce73e95e0e867e599ce78dde4d0882583a2e9
authorAndy Nichols <andy.nichols@qt.io>
committerAndy Nichols <andy.nichols@qt.io>
commit timeTue, 29 Sep 2026 11:22:11 +0000