Instancing QML Type | Qt Quick 3D 6.1.2

- Qt 6.1
- Qt Quick 3D
- QML Types
- Instancing QML Type
- Qt 6.1.2 Reference Documentation

# Instancing QML Type

Base type for instance tables. More...

Import Statement: | import QtQuick3D .
Instantiates: | QQuick3DInstancing
Inherits: | Object3D
Inherited By: | InstanceList and RandomInstancing

- List of all members, including inherited members

## Properties

- hasTransparency : bool
- instanceCountOverride : int

## 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.