SceneEnvironment QML Type

Lets you configure how a scene is rendered. More...

Import Statement: import QtQuick3D 1.14
Inherits:

Object3D

Properties

Detailed Description

SceneEnvironment defines the environment in which the scene is rendered, which defines how the scene gets rendered globaly.

Property Documentation

aoBias : float

This property defines a cutoff distance preventing objects from exhibiting ambient occlusion at close distances. Higher values increase the distance required between objects before ambient occlusion is seen.

Note: If you see ambient occlusion shadowing on objects where there should be no shadowing, increase the value slightly to clip away close results.


aoDistance : float

This property defines roughly how far ambient occlusion shadows spread away from objects. Greater distances cause increasing impact to performance.


aoDither : bool

When this property is enabled it scatters the edges of the ambient occlusion shadow bands to improve smoothness (at the risk of sometimes producing obvious patterned artifacts).

Note: Very large distances between the clipping planes of your camera may cause problems with ambient occlusion. If you are seeing odd banding in your ambient occlusion, try adjusting the clipFar property of your camera to be closer to your content.

See also PerspectiveCamera.clipFar and OrthographicCamera.clipFar.


aoSampleRate : int

This property defines ambient occlusion quality (more shades of gray) at the expense of performance.


aoSoftness : float

This property how smooth the edges of the ambient occlusion shading are.


aoStrength : float

This property defines the amount of ambient occulusion applied. Ambient occulusion is a form of approximated global illumination which causes non-directional self-shadowing where objects are close together. A value of 100 causes full darkness shadows; lower values cause the shadowing to appear lighter. A value of 0 disables ambient occlusion entirely, improving performance at a cost to the visual realism of 3D objects rendered in the scene.

All values other than 0 have the same impact to the performance.

The default value is 0


backgroundMode : enumeration

This property controls if and how the background of the scene should be cleared.

ConstantDescription
SceneEnvironment.TransparentThe scene is cleared to be transparent. This is useful to render 3D content on top of another item.
SceneEnvironment.ColorThe scene is cleared with the color specified by the clearColor property.
SceneEnvironment.SkyboxThe scene will not be cleared, but instead a Skybox or Skydome will be rendered. The Skybox is defined using the HDRI map defined in the lightProbe property.

The default value is SceneEnvironment.Color


clearColor : color

This property defines which color will be used to clear the viewport when using SceneEnvironment.Color for the backgroundMode property.

The default value is Qt::black

See also backgroundMode.


depthPrePassEnabled : bool

When this property is set to false, the renderer will perform the depth buffer writing as part of the color pass instead of doing a seperate pass that only writes to the depth buffer. On GPU's that uses a tiled rendering architecture, this should always be set to false.


depthTestEnabled : bool

When this property is set to false, the depth test will be skipped. This is an optimization that can cause rendering errors if disabled.


fastImageBasedLightingEnabled : bool

When this property is enabled more shortcuts are taken to approximate the light contributes of the light probe at the expense of quality.


lightProbe : QtQuick3D::Texture

This property defines an image (preferably a high-dynamic range image) to use to light the scene, either instead of or in addition to standard lights. If selected, note that this image will be used as the environment for any custom materials, instead of the environment map often associated with them.


multisampleAAMode : enumeration

This property enables and sets the level of multisample antialiasing applied to the scene.

The edges of geometry are super-sampled, resulting in smoother silhouettes. This technique has no effect on the materials inside geometry, however.

Pros: Good results on geometry silhouettes, where aliasing is often most noticeable; works with fast animation without issue.

Cons: Can be expensive to use; does not help with texture or reflection issues.

Possible values are:

ConstantDescription
SceneEnvironment.NoAANo multisample antialiasing is applied.
SceneEnvironment.X2Antialiasing uses 2 samples per pixel.
SceneEnvironment.X4Antialiasing uses 4 samples per pixel.

The default value is SceneEnvironment.NoAA


probeBrightness : float

This property modifies the amount of light emitted by the light probe.


probeFieldOfView : float

This property defines the image source field of view for the case of using a camera source as the IBL probe.


probeHorizon : float

This property when defined with increasing values adds darkness (black) to the bottom half of the environment, forcing the lighting to come predominantly from the top of the image (and removing specific reflections from the lower half).


progressiveAAMode : enumeration

This property enables and sets the level of progressive antialiasing applied to the scene.

When all content of the scene has stopped moving, the camera is jiggled very slightly between frames, and the result of each new frame is blended with the previous frames. The more frames you accumulate, the better looking the result.

Pros: Provides wonderful detail on static images with no performance cost.

Cons: Does not take effect if any visual changes are occurring; 8x PAA takes one eighth of a second—to finish rendering (at 60fps), which may be noticeable.

Possible values are:

ConstantDescription
SceneEnvironment.NoAANo progressive antialiasing is applied.
SceneEnvironment.X2Progressive antialiasing uses 2 frames for final image.
SceneEnvironment.X4Progressive antialiasing uses 4 frames for final image.
SceneEnvironment.X8Progressive antialiasing uses 8 frames for final image.

The default value is SceneEnvironment.NoAA


temporalAAEnabled : bool

When this property is enabled temporal antialiasing will be used.

The camera is jiggled very slightly between frames, and the result of each new frame is blended with the previous frame.

Pros: Due to the jiggling camera it finds real details that were otherwise lost; low impact on performance.

Cons: Fast-moving objects cause one-frame ghosting.


© 2020 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.