ProceduralSkyTextureData QML Type

生成 HDR 天幕立方体贴图。更多

Import Statement: import QtQuick3D.Helpers
Inherits:

TextureData

属性

详细说明

该辅助类型为生成 HDR 格式的光源探针/天空盒纹理提供了一种简便的方法。需要注意的是,生成光线探测器是一个昂贵的过程,在嵌入式硬件上可能会耗费大量时间。

生成的立方体贴图由三个元素组成:天空、地面和太阳。天空和地面覆盖上下两个半球。太阳的位置可通过设置sunLatitudesunLongitude 来指定。

View3D {
    environment: SceneEnvironment {
        backgroundMode: SceneEnvironment.SkyBox
        lightProbe: Texture {
            textureData: ProceduralSkyTextureData {
            }
        }
    }
}

另请参见 SceneEnvironment

属性文档

groundBottomColor : color

指定天空框底部的地面颜色。天空框的下半部分具有从groundHorizonColorgroundBottomColor 的渐变色。


groundCurve : real

修改地面渐变的曲线。


groundEnergy : real

指定天空框下半部分的强度。地面渐变将乘以该系数。


groundHorizonColor : color

指定地平线处的地面颜色。天空框的下半部分具有从groundHorizonColorgroundBottomColor 的梯度。


skyCurve : real

修改天空渐变的曲线。


skyEnergy : real

指定天空框上半部分的强度。天空渐变将乘以该系数。


skyHorizonColor : color

指定地平线处的天空颜色。天空框的上半部分具有从skyHorizonColorskyTopColor 的梯度。


skyTopColor : color

指定天空框顶部的天空颜色。天空框的上半部分具有从skyHorizonColorskyTopColor 的渐变。


sunAngleMax : real

指定从太阳中心到太阳完全消失的角度。


sunAngleMin : real

指定从太阳中心到太阳开始变暗的角度。


sunColor : color

指定太阳的颜色。


sunCurve : real

修改太阳渐变的曲线。


sunEnergy : real

指定太阳的强度。


sunLatitude : real

指定地平线与太阳位置之间的角度。


sunLongitude : real

指定前进方向与太阳位置之间的角度。


textureQuality : SkyTextureQuality

此属性设置天空纹理的质量。支持的值有

常数说明
ProceduralSkyTextureData.SkyTextureQualityLow生成 512x512 纹理
ProceduralSkyTextureData.SkyTextureQualityMedium生成 1024x1024 纹理
ProceduralSkyTextureData.SkyTextureQualityHigh生成 2048x2048 纹理
ProceduralSkyTextureData.SkyTextureQualityVeryHigh生成 4096x4096 纹理

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