Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business


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

Import Statement: import QtQuick3D




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.

[since 6.4] debugView : bool

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 : ReflectionQuality

Quality determines the resolution of the cube map. The qualities are ReflectionQuality.VeryLow, ReflectionQuality.Low, ReflectionQuality.Medium, ReflectionQuality.High and ReflectionQuality.VeryHigh corresponding to 128x128, 256x256, 512x512, 1024x1024 and 2048x2048 resolutions.

refreshMode : ReflectionRefreshMode

Refresh mode tells the runtime how many times the cube map is rendered. The settings are ReflectionRefreshMode.FirstFrame and ReflectionRefreshMode.EveryFrame. With ReflectionRefreshMode.FirstFrame the scene is rendered once and with ReflectionRefreshMode.EveryFrame the scene is rendered every frame.

Note: Use ReflectionRefreshMode.FirstFrame for improved performance.

timeSlicing : ReflectionTimeSlicing

Time slicing determines how the cube map render is timed. Options are ReflectionTimeSlicing.None, ReflectionTimeSlicing.AllFacesAtOnce and ReflectionTimeSlicing.IndividualFaces.

Constant Description
ReflectionTimeSlicing.None All faces of the cube map are rendered and prefiltered during one frame.
ReflectionTimeSlicing.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.
ReflectionTimeSlicing.IndividualFaces Each face is rendered and prefiltered in a separate frame. Thus all reflections are refreshed every sixth frame.

Note: Use ReflectionTimeSlicing.AllFacesAtOnce or ReflectionTimeSlicing.IndividualFaces to increase performance.

Method Documentation


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

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded