Instancing QML Type

Base type for instance tables. More...

Import Statement: import QtQuick3D .
Instantiates: QQuick3DInstancing


Inherited By:

InstanceList and RandomInstancing


Detailed Description

Instanced rendering allows duplicating a model with variations.

The Instancing type defines a table that specifies how each instance is modified relative to the base model. The table has an entry for each index, containing a transform matrix, a color, and generic data for use by custom materials. To use instancing, set a model's instancing property to reference an Instancing object.

An application can define an Instancing object in C++ by subclassing QQuick3DInstancing, or it can use one of the pre-defined QML types: InstanceList or RandomInstancing.

Property Documentation

hasTransparency : bool

Set this property to true if the instancing table contains alpha values that should be used when rendering the model. This property only makes a difference if the model is opaque: If the model has a transparent material, or an opacity less than one, the alpha value from the table will be used regardless.

Note: Enabling alpha blending may cause rendering issues when instances overlap. See the alpha blending and instancing documentation for details.

instanceCountOverride : int

Set this property to limit the number of instances without regenerating or re-uploading the instance table. This allows very inexpensive animation of the number of instances rendered.

© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.