Fog QML Type
Specifies fog settings for a scene. More...
Import Statement: | import QtQuick3D |
Since: | Qt 6.5 |
Properties
- color : color
- density : float
- depthCurve : float
- depthEnabled : bool
- depthFar : float
- depthNear : float
- enabled : bool
- heightCurve : float
- heightEnabled : bool
- leastIntenseY : float
- mostIntenseY : float
- tansmitCurve : float
- transmitEnabled : bool
Detailed Description
When the fog property of a SceneEnvironment is set to a valid Fog object, the properties are used to configure the rendering of fog.
For example, the following snippet enables fog using the default settings:
environment: SceneEnvironment { backgroundMode: SceneEnvironment.Color clearColor: theFog.color fog: Fog { id: theFog enabled: true depthEnabled: true } }
See also Qt Quick 3D - Simple Fog Example.
Property Documentation
color : color |
The color of the fog. The default value is "#8099b3"
density : float |
Controls the fog amount, in practice this is a multiplier in range 0-1. The default value is 1.0. Reducing the value decreases the strength of the fog effect. Applicable only when depthEnabled is set to true.
depthCurve : float |
The default value is 1.0.
Applicable only when depthEnabled is set to true.
depthEnabled : bool |
Controls if the fog appears in the distance. The default value is false.
depthFar : float |
Ending distance from the camera. The default value is 1000.0. Applicable only when depthEnabled is set to true.
depthNear : float |
Starting distance from the camera. The default value is 10.0. Applicable only when depthEnabled is set to true.
enabled : bool |
Controls whether fog is applied to the scene. The default value is false.
heightCurve : float |
Specifies the intensity of the height fog. The default value is 1.0. Applicable only when heightEnabled is set to true.
heightEnabled : bool |
Controls if a height fog is enabled. The default value is false.
leastIntenseY : float |
Specifies the position (Y coordinate) where the fog is the least intense. The default value is 10.0. Applicable only when heightEnabled is set to true.
Note: By default the value is larger than mostIntenseY. As long as this is true, the fog is rendered top to bottom. When this value is smaller than mostIntenseY, the fog will render bottom to top.
mostIntenseY : float |
Specifies the position (Y coordinate) where the fog is the most intense. The default value is 0. Applicable only when heightEnabled is set to true.
Note: By default the value is smaller than leastIntenseY. As long as this is true, the fog is rendered top to bottom. When this value is larger than leastIntenseY, the fog will render bottom to top.
tansmitCurve : float |
Intensity of the light transmission effect. The default value is 1.0. Applicable only when transmitEnabled is set to true.
transmitEnabled : bool |
Controls if the fog has a light transmission effect. The default value is false.
© 2023 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.