.. _stdlib_hd_sky_component: ===== HDSky ===== .. das:module:: hd_sky_component ++++++++++++ Enumerations ++++++++++++ .. _enum-public_components-HDCloudsRenderMode: .. das:attribute:: HDCloudsRenderMode :Values: * **Panorama** = 0 - The sky will be pre-rendered into a panorama. Applying it each frame is much cheaper than performing full volumetric rendering. It's a good option when the camera in your game isn't going to fly through the clouds or at large distances. This is the default mode. * **Volumetric** = 1 - Full volumetric rendering of the clouds. It's a good but costly option for when the clouds are part of your scene and not only background. .. _enum-public_components-HDStrataCloudsType: .. das:attribute:: HDStrataCloudsType :Values: * **Simple** = 0 - Simple stratosphere clouds. * **FeatherSparse** = 1 - Feather-shaped sparse stratosphere clouds. * **FeatherDense** = 2 - Feather-shaped dense stratosphere clouds. ++++++++++ Structures ++++++++++ .. _struct-hd_sky_component-HDSky_clouds_handle: .. das:attribute:: HDSky_clouds_handle struct HDSky_clouds_handle :Properties: .. _function-hd_sky_component__dot__rq_seed_HDSky_clouds_handle: .. das:operator:: HDSky_clouds_handle.seed() : int .. _function-hd_sky_component__dot__rq_seed_rq_clone_HDSky_clouds_handle_int: .. das:operator:: HDSky_clouds_handle.seed =(value: int) Random seed for the clouds pattern. By default it's -1, which means the seed is generated randomly for each game launch. :Arguments: * **value** : int .. _function-hd_sky_component__dot__rq_renderMode_HDSky_clouds_handle: .. das:operator:: HDSky_clouds_handle.renderMode() : HDCloudsRenderMode .. _function-hd_sky_component__dot__rq_renderMode_rq_clone_HDSky_clouds_handle_HDCloudsRenderMode: .. das:operator:: HDSky_clouds_handle.renderMode =(value: HDCloudsRenderMode) Rendering mode for volumetric clouds. See HDCloudsRenderMode enum description for details. :Arguments: * **value** : :ref:`HDCloudsRenderMode ` .. _function-hd_sky_component__dot__rq_layers_HDSky_clouds_handle: .. das:operator:: HDSky_clouds_handle.layers() : HDSky_clouds_layers_handle .. _function-hd_sky_component__dot__rq_form_HDSky_clouds_handle: .. das:operator:: HDSky_clouds_handle.form() : HDSky_clouds_form_handle .. _function-hd_sky_component__dot__rq_lighting_HDSky_clouds_handle: .. das:operator:: HDSky_clouds_handle.lighting() : HDSky_clouds_lighting_handle .. _struct-hd_sky_component-HDSky_clouds_layers_handle: .. das:attribute:: HDSky_clouds_layers_handle struct HDSky_clouds_layers_handle .. _function-hd_sky_component_HDSky_clouds_layers_handle_rq_length_HDSky_clouds_layers_handle: .. das:function:: HDSky_clouds_layers_handle.length() : int def length : function<(self:hd_sky_component::HDSky_clouds_layers_handle const):int const> .. _function-hd_sky_component_HDSky_clouds_layers_handle_rq_push_HDSky_clouds_layers_handle: .. das:function:: HDSky_clouds_layers_handle.push() : HDSky_clouds_layers_elem_handle def push : function<(var self:hd_sky_component::HDSky_clouds_layers_handle):hd_sky_component::HDSky_clouds_layers_elem_handle> .. _function-hd_sky_component_HDSky_clouds_layers_handle_rq_pop_HDSky_clouds_layers_handle: .. das:function:: HDSky_clouds_layers_handle.pop() def pop : function<(var self:hd_sky_component::HDSky_clouds_layers_handle):void> .. _function-hd_sky_component_HDSky_clouds_layers_handle_rq_clear_HDSky_clouds_layers_handle: .. das:function:: HDSky_clouds_layers_handle.clear() def clear : function<(var self:hd_sky_component::HDSky_clouds_layers_handle):void> .. _function-hd_sky_component_HDSky_clouds_layers_handle_rq_insert_HDSky_clouds_layers_handle_int: .. das:function:: HDSky_clouds_layers_handle.insert(pos: int) : HDSky_clouds_layers_elem_handle def insert : function<(var self:hd_sky_component::HDSky_clouds_layers_handle;pos:int const):hd_sky_component::HDSky_clouds_layers_elem_handle> :Arguments: * **pos** : int .. _function-hd_sky_component_HDSky_clouds_layers_handle_rq_erase_HDSky_clouds_layers_handle_int: .. das:function:: HDSky_clouds_layers_handle.erase(pos: int) def erase : function<(var self:hd_sky_component::HDSky_clouds_layers_handle;pos:int const):void> :Arguments: * **pos** : int .. _function-hd_sky_component__lb__rb__HDSky_clouds_layers_handle_int: .. das:function:: HDSky_clouds_layers_handle.[](index: int) : HDSky_clouds_layers_elem_handle def HDSky_clouds_layers_handle.[] :Arguments: * **index** : int .. _struct-hd_sky_component-HDSky_clouds_layers_elem_handle: .. das:attribute:: HDSky_clouds_layers_elem_handle struct HDSky_clouds_layers_elem_handle :Properties: .. _function-hd_sky_component__dot__rq_startHeight_HDSky_clouds_layers_elem_handle: .. das:operator:: HDSky_clouds_layers_elem_handle.startHeight() : float .. _function-hd_sky_component__dot__rq_startHeight_rq_clone_HDSky_clouds_layers_elem_handle_float: .. das:operator:: HDSky_clouds_layers_elem_handle.startHeight =(value: float) Altitude in kilometers at which the cloud layer begins. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_thickness_HDSky_clouds_layers_elem_handle: .. das:operator:: HDSky_clouds_layers_elem_handle.thickness() : float .. _function-hd_sky_component__dot__rq_thickness_rq_clone_HDSky_clouds_layers_elem_handle_float: .. das:operator:: HDSky_clouds_layers_elem_handle.thickness =(value: float) Vertical extent of the cloud layer in kilometers. It works as a scaling factor and as a height extent for clouds volumetric textures. The actual thickness of clouds highly depends on other parameters provided in here. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_density_HDSky_clouds_layers_elem_handle: .. das:operator:: HDSky_clouds_layers_elem_handle.density() : float .. _function-hd_sky_component__dot__rq_density_rq_clone_HDSky_clouds_layers_elem_handle_float: .. das:operator:: HDSky_clouds_layers_elem_handle.density =(value: float) Optical density of the clouds in range [0, 1]. Higher values produce thicker, more opaque clouds with sharper light gradients. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_coverage_HDSky_clouds_layers_elem_handle: .. das:operator:: HDSky_clouds_layers_elem_handle.coverage() : float .. _function-hd_sky_component__dot__rq_coverage_rq_clone_HDSky_clouds_layers_elem_handle_float: .. das:operator:: HDSky_clouds_layers_elem_handle.coverage =(value: float) Fraction of the sky covered by clouds in range [0, 1]. At 0 the sky is clear; at 1 clouds fill the entire layer. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_volume_HDSky_clouds_layers_elem_handle: .. das:operator:: HDSky_clouds_layers_elem_handle.volume() : float .. _function-hd_sky_component__dot__rq_volume_rq_clone_HDSky_clouds_layers_elem_handle_float: .. das:operator:: HDSky_clouds_layers_elem_handle.volume =(value: float) Cloud shape type in range [0, 1]. Low values produce thin, wispy clouds; high values produce tall, dense cumuliform clouds. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_volumeVariance_HDSky_clouds_layers_elem_handle: .. das:operator:: HDSky_clouds_layers_elem_handle.volumeVariance() : float .. _function-hd_sky_component__dot__rq_volumeVariance_rq_clone_HDSky_clouds_layers_elem_handle_float: .. das:operator:: HDSky_clouds_layers_elem_handle.volumeVariance =(value: float) Spatial variation in cloud shape type across the layer in range [0, 1]. Higher values mix thin and dense cloud forms within the same layer. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_frequency_HDSky_clouds_layers_elem_handle: .. das:operator:: HDSky_clouds_layers_elem_handle.frequency() : float .. _function-hd_sky_component__dot__rq_frequency_rq_clone_HDSky_clouds_layers_elem_handle_float: .. das:operator:: HDSky_clouds_layers_elem_handle.frequency =(value: float) Horizontal spatial frequency of cloud cells. Lower values produce larger, widely-spaced clouds; higher values produce smaller, denser patterns. :Arguments: * **value** : float .. _struct-hd_sky_component-HDSky_clouds_form_handle: .. das:attribute:: HDSky_clouds_form_handle struct HDSky_clouds_form_handle :Properties: .. _function-hd_sky_component__dot__rq_extinction_HDSky_clouds_form_handle: .. das:operator:: HDSky_clouds_form_handle.extinction() : float .. _function-hd_sky_component__dot__rq_extinction_rq_clone_HDSky_clouds_form_handle_float: .. das:operator:: HDSky_clouds_form_handle.extinction =(value: float) Extinction coefficient controlling how opaque cloud matter is in range [0, 1]. Lower values let more light pass through, producing thin translucent clouds. Higher values create dense, shadowed interiors. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_shapeNoiseScale_HDSky_clouds_form_handle: .. das:operator:: HDSky_clouds_form_handle.shapeNoiseScale() : float .. _function-hd_sky_component__dot__rq_shapeNoiseScale_rq_clone_HDSky_clouds_form_handle_float: .. das:operator:: HDSky_clouds_form_handle.shapeNoiseScale =(value: float) Base scale of the 3D noise used to shape cloud boundaries. Higher values produce more detailed, fine-grained cloud edges. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_erosionNoiseScale_HDSky_clouds_form_handle: .. das:operator:: HDSky_clouds_form_handle.erosionNoiseScale() : float .. _function-hd_sky_component__dot__rq_erosionNoiseScale_rq_clone_HDSky_clouds_form_handle_float: .. das:operator:: HDSky_clouds_form_handle.erosionNoiseScale =(value: float) Scale of the high-frequency detail noise that erodes cloud boundaries. Higher values produce finer erosion. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_epicness_HDSky_clouds_form_handle: .. das:operator:: HDSky_clouds_form_handle.epicness() : float .. _function-hd_sky_component__dot__rq_epicness_rq_clone_HDSky_clouds_form_handle_float: .. das:operator:: HDSky_clouds_form_handle.epicness =(value: float) Controls the vertical development and drama of cloud shapes in range [0, 1]. At 0 clouds are flat and uniform; at 1 they develop pronounced vertical towers and anvil structures. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_worldSize_HDSky_clouds_form_handle: .. das:operator:: HDSky_clouds_form_handle.worldSize() : float .. _function-hd_sky_component__dot__rq_worldSize_rq_clone_HDSky_clouds_form_handle_float: .. das:operator:: HDSky_clouds_form_handle.worldSize =(value: float) Scale of the repeating weather pattern that determines where clouds form. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_turbulenceStrength_HDSky_clouds_form_handle: .. das:operator:: HDSky_clouds_form_handle.turbulenceStrength() : float .. _function-hd_sky_component__dot__rq_turbulenceStrength_rq_clone_HDSky_clouds_form_handle_float: .. das:operator:: HDSky_clouds_form_handle.turbulenceStrength =(value: float) Strength of wind turbulence applied to cloud shapes. You can set negative values to invert the swirling direction. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_turbulenceFrequency_HDSky_clouds_form_handle: .. das:operator:: HDSky_clouds_form_handle.turbulenceFrequency() : float .. _function-hd_sky_component__dot__rq_turbulenceFrequency_rq_clone_HDSky_clouds_form_handle_float: .. das:operator:: HDSky_clouds_form_handle.turbulenceFrequency =(value: float) Spatial frequency of the turbulence pattern. Higher values produce finer, more rapid swirling distortions. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_cumulonimbusShapeScale_HDSky_clouds_form_handle: .. das:operator:: HDSky_clouds_form_handle.cumulonimbusShapeScale() : float .. _function-hd_sky_component__dot__rq_cumulonimbusShapeScale_rq_clone_HDSky_clouds_form_handle_float: .. das:operator:: HDSky_clouds_form_handle.cumulonimbusShapeScale =(value: float) Shape noise scale used specifically for cumulonimbus (thunderstorm) clouds. Higher values produce more detailed storm cell structures. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_cumulonimbusCoverage_HDSky_clouds_form_handle: .. das:operator:: HDSky_clouds_form_handle.cumulonimbusCoverage() : float .. _function-hd_sky_component__dot__rq_cumulonimbusCoverage_rq_clone_HDSky_clouds_form_handle_float: .. das:operator:: HDSky_clouds_form_handle.cumulonimbusCoverage =(value: float) Fraction of the sky covered by cumulonimbus (thunderstorm) clouds in range [0, 1]. These are tall, anvil-shaped storm clouds added on top of the regular cloud layers. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_strataAmount_HDSky_clouds_form_handle: .. das:operator:: HDSky_clouds_form_handle.strataAmount() : float .. _function-hd_sky_component__dot__rq_strataAmount_rq_clone_HDSky_clouds_form_handle_float: .. das:operator:: HDSky_clouds_form_handle.strataAmount =(value: float) Density of the high-altitude strata cloud layer in range [0, 1]. Strata clouds are thin, sheet-like clouds at high altitude that add a subtle haze layer above the volumetric clouds. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_strataAltitude_HDSky_clouds_form_handle: .. das:operator:: HDSky_clouds_form_handle.strataAltitude() : float .. _function-hd_sky_component__dot__rq_strataAltitude_rq_clone_HDSky_clouds_form_handle_float: .. das:operator:: HDSky_clouds_form_handle.strataAltitude =(value: float) Altitude in kilometers of the strata cloud layer. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_strataType_HDSky_clouds_form_handle: .. das:operator:: HDSky_clouds_form_handle.strataType() : HDStrataCloudsType .. _function-hd_sky_component__dot__rq_strataType_rq_clone_HDSky_clouds_form_handle_HDStrataCloudsType: .. das:operator:: HDSky_clouds_form_handle.strataType =(value: HDStrataCloudsType) Visual style of the strata cloud texture. See HDStrataCloudsType enum description for details. :Arguments: * **value** : :ref:`HDStrataCloudsType ` .. _struct-hd_sky_component-HDSky_clouds_lighting_handle: .. das:attribute:: HDSky_clouds_lighting_handle struct HDSky_clouds_lighting_handle :Properties: .. _function-hd_sky_component__dot__rq_ambientDesaturation_HDSky_clouds_lighting_handle: .. das:operator:: HDSky_clouds_lighting_handle.ambientDesaturation() : float .. _function-hd_sky_component__dot__rq_ambientDesaturation_rq_clone_HDSky_clouds_lighting_handle_float: .. das:operator:: HDSky_clouds_lighting_handle.ambientDesaturation =(value: float) Amount of desaturation applied to ambient light inside clouds in range [0, 1]. Reduces the colored-sky tint visible in shaded cloud interiors. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_msContribution_HDSky_clouds_lighting_handle: .. das:operator:: HDSky_clouds_lighting_handle.msContribution() : float .. _function-hd_sky_component__dot__rq_msContribution_rq_clone_HDSky_clouds_lighting_handle_float: .. das:operator:: HDSky_clouds_lighting_handle.msContribution =(value: float) Relative weight of higher-order multiple scattering bounces in range [0, 1]. Higher values brighten the overall cloud volume more uniformly, including lit faces. Lower values produce darker, more contrast-heavy clouds. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_msAttenuation_HDSky_clouds_lighting_handle: .. das:operator:: HDSky_clouds_lighting_handle.msAttenuation() : float .. _function-hd_sky_component__dot__rq_msAttenuation_rq_clone_HDSky_clouds_lighting_handle_float: .. das:operator:: HDSky_clouds_lighting_handle.msAttenuation =(value: float) Controls how quickly extinction decreases for successive scattering orders in range [0, 1]. Lower values allow multiply-scattered light to penetrate deeper into the cloud, brightening shadowed interiors and giving clouds a softer, more translucent appearance. Higher values keep the interior darker. :Arguments: * **value** : float .. _struct-hd_sky_component-HDSky_atmosphere_handle: .. das:attribute:: HDSky_atmosphere_handle struct HDSky_atmosphere_handle :Properties: .. _function-hd_sky_component__dot__rq_groundColor_HDSky_atmosphere_handle: .. das:operator:: HDSky_atmosphere_handle.groundColor() : float3 .. _function-hd_sky_component__dot__rq_groundColor_rq_clone_HDSky_atmosphere_handle_float3: .. das:operator:: HDSky_atmosphere_handle.groundColor =(value: float3) Average color (albedo) of the ground surface. Affects the color of light reflected from the ground back into the sky, visually affecting shadowed areas of the clouds and atmospheric fog. :Arguments: * **value** : float3 .. _function-hd_sky_component__dot__rq_mediaTint_HDSky_atmosphere_handle: .. das:operator:: HDSky_atmosphere_handle.mediaTint() : float3 .. _function-hd_sky_component__dot__rq_mediaTint_rq_clone_HDSky_atmosphere_handle_float3: .. das:operator:: HDSky_atmosphere_handle.mediaTint =(value: float3) Color tint of the aerosol medium (dust, moisture, pollution particles). :Arguments: * **value** : float3 .. _function-hd_sky_component__dot__rq_mediaDensity_HDSky_atmosphere_handle: .. das:operator:: HDSky_atmosphere_handle.mediaDensity() : float .. _function-hd_sky_component__dot__rq_mediaDensity_rq_clone_HDSky_atmosphere_handle_float: .. das:operator:: HDSky_atmosphere_handle.mediaDensity =(value: float) Density of aerosol particles in the atmosphere. Controls overall haziness: higher values produce thicker haze, stronger sun glow, and more attenuation of distant objects. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_mediaAbsorption_HDSky_atmosphere_handle: .. das:operator:: HDSky_atmosphere_handle.mediaAbsorption() : float .. _function-hd_sky_component__dot__rq_mediaAbsorption_rq_clone_HDSky_atmosphere_handle_float: .. das:operator:: HDSky_atmosphere_handle.mediaAbsorption =(value: float) How much the aerosol particles absorb light rather than scatter it. At 0 all attenuated light is scattered (bright milky haze). Higher values add absorption that darkens the medium without adding glow, and also reduces the directional sharpness of the sun halo. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_mediaHeight_HDSky_atmosphere_handle: .. das:operator:: HDSky_atmosphere_handle.mediaHeight() : float .. _function-hd_sky_component__dot__rq_mediaHeight_rq_clone_HDSky_atmosphere_handle_float: .. das:operator:: HDSky_atmosphere_handle.mediaHeight =(value: float) Controls how quickly aerosol density falls off with altitude. Lower values concentrate haze near the ground; higher values spread it higher up. The final value is additionally multiplied by ``atmosphereHeight``. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_atmosphereTint_HDSky_atmosphere_handle: .. das:operator:: HDSky_atmosphere_handle.atmosphereTint() : float3 .. _function-hd_sky_component__dot__rq_atmosphereTint_rq_clone_HDSky_atmosphere_handle_float3: .. das:operator:: HDSky_atmosphere_handle.atmosphereTint =(value: float3) Color tint of the Rayleigh scattering medium (air molecules). Controls the color of the clear sky. Default white produces the natural blue sky. :Arguments: * **value** : float3 .. _function-hd_sky_component__dot__rq_atmosphereDensity_HDSky_atmosphere_handle: .. das:operator:: HDSky_atmosphere_handle.atmosphereDensity() : float .. _function-hd_sky_component__dot__rq_atmosphereDensity_rq_clone_HDSky_atmosphere_handle_float: .. das:operator:: HDSky_atmosphere_handle.atmosphereDensity =(value: float) Density of the Rayleigh scattering medium. Higher values produce a denser sky with more aerial perspective; lower values make it thinner and darker, approaching a space-like look. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_atmosphereHeight_HDSky_atmosphere_handle: .. das:operator:: HDSky_atmosphere_handle.atmosphereHeight() : float .. _function-hd_sky_component__dot__rq_atmosphereHeight_rq_clone_HDSky_atmosphere_handle_float: .. das:operator:: HDSky_atmosphere_handle.atmosphereHeight =(value: float) Controls how quickly atmosphere density falls off with altitude similar to the aerosol medium layer. Also multiplies ``mediaHeight``. :Arguments: * **value** : float .. _function-hd_sky_component__dot__rq_ozoneImpact_HDSky_atmosphere_handle: .. das:operator:: HDSky_atmosphere_handle.ozoneImpact() : float .. _function-hd_sky_component__dot__rq_ozoneImpact_rq_clone_HDSky_atmosphere_handle_float: .. das:operator:: HDSky_atmosphere_handle.ozoneImpact =(value: float) Influence of the ozone layer on sky color in range [0, 1]. The ozone layer absorbs yellow-green wavelengths, so higher values make the sky appear bluer at twilight. :Arguments: * **value** : float +++++++ Classes +++++++ .. _struct-hd_sky_component-HDSky: .. das:attribute:: HDSky : NativeComponent This component provides control over sky properties in :ref:`HD Renderer `. The sky in HD Renderer simulates planetary atmosphere and clouds based on Earth atmosphere properties. So the default settings represent a clear day with a blue sky and some clouds, although they can be tweaked to get broad range of different looks. Read field descriptions for details. You can use a node with :ref:`HD Renderer ` component in it to set the panorama center or an offset for clouds. To use this component, add the following line to your project file:: require engine.core_components.hd_sky_component // or require engine.core Usage example:: let renderSettings = create_render_settings() add_component(renderSettings, new HDSky()) get_component(renderSettings) $(var sky : HDSky?) { sky.atmosphere.mediaDensity = 0.3 sky.atmosphere.atmosphereTint = float3(0.7, 0.85, 1.0) sky.clouds.layers[0].startHeight = 0.5 let secondLayerHandle = sky.clouds.layers.push() secondLayerHandle.startHeight = 1.5 secondLayerHandle.thickness = 6.0 secondLayerHandle.coverage = 0.5 } :Properties: .. _function-hd_sky_component__dot__rq_clouds_HDSky: .. das:operator:: HDSky.clouds() : HDSky_clouds_handle .. _function-hd_sky_component__dot__rq_atmosphere_HDSky: .. das:operator:: HDSky.atmosphere() : HDSky_atmosphere_handle .. _function-hd_sky_component__dot__rq_customSky_HDSky: .. das:operator:: HDSky.customSky() : MaterialId .. _function-hd_sky_component__dot__rq_customSky_rq_clone_HDSky_MaterialId: .. das:operator:: HDSky.customSky =(value: MaterialId) Allows setting a custom material as a sky source. :Arguments: * **value** : :ref:`MaterialId `