- Qt 6.8
- Qt Quick 3D
- QML Types
- ReflectionProbe
- Qt Quick 3D | Commercial or GPLv3

# ReflectionProbe QML Type

Defines a reflection probe in the scene. More...

Import Statement: | `import QtQuick3D`
Inherits: | Node

- List of all members, including inherited members

## Properties

- boxOffset : vector3d
- boxSize : vector3d
- clearColor : Color
- debugView : bool `(since 6.4)`
- parallaxCorrection : bool
- quality : enumeration
- refreshMode : enumeration
- texture : CubeMapTexture `(since 6.5)`
- timeSlicing : enumeration

## Methods

- scheduleUpdate()

## Detailed Description

A reflection probe is used to provide reflections of the current scene to the objects. The probe provides properties to the runtime which are then used to render the scene to a cube map. The cube map is then used as the reflection information for the reflecting objects.

See also Qt Quick 3D - Reflection Probes Example.

## Property Documentation

boxOffset : vector3d

Box offset is used to move the box relative to the reflection probe position. Since the probe captures the environment from its position, this property can be used to move the box around without affecting the position where the probe capture the environment. This property alongside with ReflectionProbe::boxSize will be used to determine the object that fall inside the box. With ReflectionProbe::parallaxCorrection turned on, this property can be used to position the box to get more accurate reflections.

See also parallaxCorrection.

boxSize : vector3d

Box size is used to determine which objects get their reflections from this ReflectionProbe. Objects that are inside the box are under the influence of this ReflectionProbe. If an object lies inside more than one reflection probe at the same time, the object is considered to be inside the nearest reflection probe. With ReflectionProbe::parallaxCorrection turned on the size is also used to calculate the distance of the reflections in the cube map.

See also parallaxCorrection.

clearColor : Color

Clear color is the color used to clear the cube map prior rendering the scene.

debugView : bool `[since 6.4]`

If this property is set to true, a wireframe is rendered to visualize the reflection probe box.

This property was introduced in Qt 6.4.

parallaxCorrection : bool

By default the reflections provided by the reflection probe are assumed to be from an infinite distance similar to the skybox. This works fine for environmental reflections but for tight spaces this causes perspective errors in the reflections. To fix this parallax correction can be turned on. The distance of the reflection is then determined by the ReflectionProbe::boxSize property.

See also boxSize.

quality : enumeration

Quality determines the resolution of the cube map.

Possible values are:

Constant | Description
--- | ---
`ReflectionProbe.VeryLow` | Renders a reflection map using a 128x128 texture.
`ReflectionProbe.Low` | Renders a reflection map using a 256x256 texture.
`ReflectionProbe.Medium` | Renders a reflection map using a 512x512 texture.
`ReflectionProbe.High` | Renders a reflection map using a 1024x1024 texture.
`ReflectionProbe.VeryHigh` | Renders a reflection map using a 2048x2048 texture.

The default value is `ReflectionProbe.Low`

refreshMode : enumeration

Refresh mode tells the runtime how often the cube map should be updated.

Possible values are:

Constant | Description
--- | ---
`ReflectionProbe.FirstFrame` | Renders the scene on the first frame.
`ReflectionProbe.EveryFrame` | Renders the scene every frame.

The default value is `ReflectionProbe.EveryFrame`

Note: Use `ReflectionProbe.FirstFrame` for improved performance.

texture : CubeMapTexture `[since 6.5]`

Instead of rendering the scene, this cube map texture is used to show reflections in objects affected by this reflection probe.

This property was introduced in Qt 6.5.

See also CubeMapTexture.

timeSlicing : enumeration

Time slicing determines how the cube map render is timed.

Possible values are:

Constant | Description
--- | ---
`ReflectionProbe.None` | All faces of the cube map are rendered and prefiltered during one frame.
`ReflectionProbe.AllFacesAtOnce` | All faces are rendered during one frame but the prefiltering is divided to subsquent frames with each mip level handled on their own frame. Rough surface reflections are thus refreshed every sixth frame while smooth surfaces have reflections that refresh every frame.
`ReflectionProbe.IndividualFaces` | Each face is rendered and prefiltered in a separate frame. Thus all reflections are refreshed every sixth frame.

The default value is `ReflectionProbe.None`

Note: Use `ReflectionProbe.AllFacesAtOnce` or `ReflectionProbe.IndividualFaces` to increase performance.

## Method Documentation

scheduleUpdate()

Updates the reflection probe render when called while ReflectionProbe::refreshMode is set as `ReflectionProbe.FirstFrame`.