ReflectionProbe QML Type

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

Import Statement: import QtQuick3D
Inherits:

Node

Properties

Methods

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:

ConstantDescription
ReflectionProbe.VeryLowRenders a reflection map using a 128x128 texture.
ReflectionProbe.LowRenders a reflection map using a 256x256 texture.
ReflectionProbe.MediumRenders a reflection map using a 512x512 texture.
ReflectionProbe.HighRenders a reflection map using a 1024x1024 texture.
ReflectionProbe.VeryHighRenders 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:

ConstantDescription
ReflectionProbe.FirstFrameRenders the scene on the first frame.
ReflectionProbe.EveryFrameRenders 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:

ConstantDescription
ReflectionProbe.NoneAll faces of the cube map are rendered and prefiltered during one frame.
ReflectionProbe.AllFacesAtOnceAll 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.IndividualFacesEach 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.