mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-04 10:09:56 +03:00
2408 lines
134 KiB
ReStructuredText
2408 lines
134 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_Environment:
|
||
|
||
Environment
|
||
===========
|
||
|
||
**繼承:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||
|
||
定義算繪選項的資源,用於環境節點(例如 :ref:`WorldEnvironment<class_WorldEnvironment>`\ )。
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
說明
|
||
----
|
||
|
||
Resource for environment nodes (like :ref:`WorldEnvironment<class_WorldEnvironment>`) that define multiple environment operations (such as background :ref:`Sky<class_Sky>` or :ref:`Color<class_Color>`, ambient light, fog, depth-of-field...). These parameters affect the final render of the scene. The order of these operations is:
|
||
|
||
- Depth of Field Blur
|
||
|
||
- Auto Exposure
|
||
|
||
- Glow
|
||
|
||
- Tonemap
|
||
|
||
- Adjustments
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
教學
|
||
----
|
||
|
||
- :doc:`環境和後期處理 <../tutorials/3d/environment_and_post_processing>`
|
||
|
||
- :doc:`高動態範圍光照 <../tutorials/3d/high_dynamic_range>`
|
||
|
||
- `3D 材質測試演示 <https://godotengine.org/asset-library/asset/2742>`__
|
||
|
||
- `第三人稱射擊(TPS)示範 <https://godotengine.org/asset-library/asset/2710>`__
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
屬性
|
||
----
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`adjustment_brightness<class_Environment_property_adjustment_brightness>` | ``1.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`Texture<class_Texture>` | :ref:`adjustment_color_correction<class_Environment_property_adjustment_color_correction>` | |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`adjustment_contrast<class_Environment_property_adjustment_contrast>` | ``1.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`adjustment_enabled<class_Environment_property_adjustment_enabled>` | ``false`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`adjustment_saturation<class_Environment_property_adjustment_saturation>` | ``1.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`ambient_light_color<class_Environment_property_ambient_light_color>` | ``Color(0, 0, 0, 1)`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`ambient_light_energy<class_Environment_property_ambient_light_energy>` | ``1.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`ambient_light_sky_contribution<class_Environment_property_ambient_light_sky_contribution>` | ``1.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`AmbientSource<enum_Environment_AmbientSource>` | :ref:`ambient_light_source<class_Environment_property_ambient_light_source>` | ``0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`background_camera_feed_id<class_Environment_property_background_camera_feed_id>` | ``1`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`background_canvas_max_layer<class_Environment_property_background_canvas_max_layer>` | ``0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`background_color<class_Environment_property_background_color>` | ``Color(0, 0, 0, 1)`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`background_energy_multiplier<class_Environment_property_background_energy_multiplier>` | ``1.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`background_intensity<class_Environment_property_background_intensity>` | ``30000.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`BGMode<enum_Environment_BGMode>` | :ref:`background_mode<class_Environment_property_background_mode>` | ``0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`fog_aerial_perspective<class_Environment_property_fog_aerial_perspective>` | ``0.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`fog_density<class_Environment_property_fog_density>` | ``0.01`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`fog_depth_begin<class_Environment_property_fog_depth_begin>` | ``10.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`fog_depth_curve<class_Environment_property_fog_depth_curve>` | ``1.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`fog_depth_end<class_Environment_property_fog_depth_end>` | ``100.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`fog_enabled<class_Environment_property_fog_enabled>` | ``false`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`fog_height<class_Environment_property_fog_height>` | ``0.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`fog_height_density<class_Environment_property_fog_height_density>` | ``0.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`fog_light_color<class_Environment_property_fog_light_color>` | ``Color(0.518, 0.553, 0.608, 1)`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`fog_light_energy<class_Environment_property_fog_light_energy>` | ``1.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`FogMode<enum_Environment_FogMode>` | :ref:`fog_mode<class_Environment_property_fog_mode>` | ``0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`fog_sky_affect<class_Environment_property_fog_sky_affect>` | ``1.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`fog_sun_scatter<class_Environment_property_fog_sun_scatter>` | ``0.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` | :ref:`glow_blend_mode<class_Environment_property_glow_blend_mode>` | ``1`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`glow_bloom<class_Environment_property_glow_bloom>` | ``0.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`glow_enabled<class_Environment_property_glow_enabled>` | ``false`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`glow_hdr_luminance_cap<class_Environment_property_glow_hdr_luminance_cap>` | ``12.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`glow_hdr_scale<class_Environment_property_glow_hdr_scale>` | ``2.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`glow_hdr_threshold<class_Environment_property_glow_hdr_threshold>` | ``1.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`glow_intensity<class_Environment_property_glow_intensity>` | ``0.3`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`glow_levels/1<class_Environment_property_glow_levels/1>` | ``0.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`glow_levels/2<class_Environment_property_glow_levels/2>` | ``0.8`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`glow_levels/3<class_Environment_property_glow_levels/3>` | ``0.4`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`glow_levels/4<class_Environment_property_glow_levels/4>` | ``0.1`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`glow_levels/5<class_Environment_property_glow_levels/5>` | ``0.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`glow_levels/6<class_Environment_property_glow_levels/6>` | ``0.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`glow_levels/7<class_Environment_property_glow_levels/7>` | ``0.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`Texture<class_Texture>` | :ref:`glow_map<class_Environment_property_glow_map>` | |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`glow_map_strength<class_Environment_property_glow_map_strength>` | ``0.8`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`glow_mix<class_Environment_property_glow_mix>` | ``0.05`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`glow_normalized<class_Environment_property_glow_normalized>` | ``false`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`glow_strength<class_Environment_property_glow_strength>` | ``1.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`ReflectionSource<enum_Environment_ReflectionSource>` | :ref:`reflected_light_source<class_Environment_property_reflected_light_source>` | ``0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`sdfgi_bounce_feedback<class_Environment_property_sdfgi_bounce_feedback>` | ``0.5`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`sdfgi_cascade0_distance<class_Environment_property_sdfgi_cascade0_distance>` | ``12.8`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`sdfgi_cascades<class_Environment_property_sdfgi_cascades>` | ``4`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`sdfgi_enabled<class_Environment_property_sdfgi_enabled>` | ``false`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`sdfgi_energy<class_Environment_property_sdfgi_energy>` | ``1.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`sdfgi_max_distance<class_Environment_property_sdfgi_max_distance>` | ``204.8`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`sdfgi_min_cell_size<class_Environment_property_sdfgi_min_cell_size>` | ``0.2`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`sdfgi_normal_bias<class_Environment_property_sdfgi_normal_bias>` | ``1.1`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`sdfgi_probe_bias<class_Environment_property_sdfgi_probe_bias>` | ``1.1`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`sdfgi_read_sky_light<class_Environment_property_sdfgi_read_sky_light>` | ``true`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`sdfgi_use_occlusion<class_Environment_property_sdfgi_use_occlusion>` | ``false`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` | :ref:`sdfgi_y_scale<class_Environment_property_sdfgi_y_scale>` | ``1`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`Sky<class_Sky>` | :ref:`sky<class_Environment_property_sky>` | |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`sky_custom_fov<class_Environment_property_sky_custom_fov>` | ``0.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`Vector3<class_Vector3>` | :ref:`sky_rotation<class_Environment_property_sky_rotation>` | ``Vector3(0, 0, 0)`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`ssao_ao_channel_affect<class_Environment_property_ssao_ao_channel_affect>` | ``0.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`ssao_detail<class_Environment_property_ssao_detail>` | ``0.5`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`ssao_enabled<class_Environment_property_ssao_enabled>` | ``false`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`ssao_horizon<class_Environment_property_ssao_horizon>` | ``0.06`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`ssao_intensity<class_Environment_property_ssao_intensity>` | ``2.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`ssao_light_affect<class_Environment_property_ssao_light_affect>` | ``0.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`ssao_power<class_Environment_property_ssao_power>` | ``1.5`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`ssao_radius<class_Environment_property_ssao_radius>` | ``1.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`ssao_sharpness<class_Environment_property_ssao_sharpness>` | ``0.98`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`ssil_enabled<class_Environment_property_ssil_enabled>` | ``false`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`ssil_intensity<class_Environment_property_ssil_intensity>` | ``1.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`ssil_normal_rejection<class_Environment_property_ssil_normal_rejection>` | ``1.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`ssil_radius<class_Environment_property_ssil_radius>` | ``5.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`ssil_sharpness<class_Environment_property_ssil_sharpness>` | ``0.98`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`ssr_depth_tolerance<class_Environment_property_ssr_depth_tolerance>` | ``0.5`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`ssr_enabled<class_Environment_property_ssr_enabled>` | ``false`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`ssr_fade_in<class_Environment_property_ssr_fade_in>` | ``0.15`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`ssr_fade_out<class_Environment_property_ssr_fade_out>` | ``2.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`ssr_max_steps<class_Environment_property_ssr_max_steps>` | ``64`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`tonemap_agx_contrast<class_Environment_property_tonemap_agx_contrast>` | ``1.25`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`tonemap_agx_white<class_Environment_property_tonemap_agx_white>` | ``16.29`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`tonemap_exposure<class_Environment_property_tonemap_exposure>` | ``1.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`ToneMapper<enum_Environment_ToneMapper>` | :ref:`tonemap_mode<class_Environment_property_tonemap_mode>` | ``0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`tonemap_white<class_Environment_property_tonemap_white>` | ``1.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`volumetric_fog_albedo<class_Environment_property_volumetric_fog_albedo>` | ``Color(1, 1, 1, 1)`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`volumetric_fog_ambient_inject<class_Environment_property_volumetric_fog_ambient_inject>` | ``0.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`volumetric_fog_anisotropy<class_Environment_property_volumetric_fog_anisotropy>` | ``0.2`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`volumetric_fog_density<class_Environment_property_volumetric_fog_density>` | ``0.05`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`volumetric_fog_detail_spread<class_Environment_property_volumetric_fog_detail_spread>` | ``2.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`volumetric_fog_emission<class_Environment_property_volumetric_fog_emission>` | ``Color(0, 0, 0, 1)`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`volumetric_fog_emission_energy<class_Environment_property_volumetric_fog_emission_energy>` | ``1.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`volumetric_fog_enabled<class_Environment_property_volumetric_fog_enabled>` | ``false`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`volumetric_fog_gi_inject<class_Environment_property_volumetric_fog_gi_inject>` | ``1.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`volumetric_fog_length<class_Environment_property_volumetric_fog_length>` | ``64.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`volumetric_fog_sky_affect<class_Environment_property_volumetric_fog_sky_affect>` | ``1.0`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`volumetric_fog_temporal_reprojection_amount<class_Environment_property_volumetric_fog_temporal_reprojection_amount>` | ``0.9`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`volumetric_fog_temporal_reprojection_enabled<class_Environment_property_volumetric_fog_temporal_reprojection_enabled>` | ``true`` |
|
||
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
方法
|
||
----
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`get_glow_level<class_Environment_method_get_glow_level>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_glow_level<class_Environment_method_set_glow_level>`\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ ) |
|
||
+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
列舉
|
||
----
|
||
|
||
.. _enum_Environment_BGMode:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **BGMode**: :ref:`🔗<enum_Environment_BGMode>`
|
||
|
||
.. _class_Environment_constant_BG_CLEAR_COLOR:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`BGMode<enum_Environment_BGMode>` **BG_CLEAR_COLOR** = ``0``
|
||
|
||
使用 :ref:`ProjectSettings.rendering/environment/defaults/default_clear_color<class_ProjectSettings_property_rendering/environment/defaults/default_clear_color>` 中定義的清除顏色來清除背景。
|
||
|
||
.. _class_Environment_constant_BG_COLOR:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`BGMode<enum_Environment_BGMode>` **BG_COLOR** = ``1``
|
||
|
||
使用自訂的清除顏色來清除背景。
|
||
|
||
.. _class_Environment_constant_BG_SKY:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`BGMode<enum_Environment_BGMode>` **BG_SKY** = ``2``
|
||
|
||
在背景中顯示使用者自訂的天空。
|
||
|
||
.. _class_Environment_constant_BG_CANVAS:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`BGMode<enum_Environment_BGMode>` **BG_CANVAS** = ``3``
|
||
|
||
在背景中顯示 :ref:`CanvasLayer<class_CanvasLayer>`\ 。
|
||
|
||
.. _class_Environment_constant_BG_KEEP:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`BGMode<enum_Environment_BGMode>` **BG_KEEP** = ``4``
|
||
|
||
在螢幕上保留在背景中繪製的每個圖元。這是最快的背景模式,但它只能安全地用在完全室內的場景(沒有可見的天空或天空反射)。如果在背景可見的場景中啟用,則移動相機時,將看到“鬼影蹤跡”偽影。
|
||
|
||
.. _class_Environment_constant_BG_CAMERA_FEED:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`BGMode<enum_Environment_BGMode>` **BG_CAMERA_FEED** = ``5``
|
||
|
||
在背景中顯示相機源。
|
||
|
||
.. _class_Environment_constant_BG_MAX:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`BGMode<enum_Environment_BGMode>` **BG_MAX** = ``6``
|
||
|
||
代表 :ref:`BGMode<enum_Environment_BGMode>` 列舉的大小。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_Environment_AmbientSource:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **AmbientSource**: :ref:`🔗<enum_Environment_AmbientSource>`
|
||
|
||
.. _class_Environment_constant_AMBIENT_SOURCE_BG:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`AmbientSource<enum_Environment_AmbientSource>` **AMBIENT_SOURCE_BG** = ``0``
|
||
|
||
從指定為背景的任何來源收集環境光。
|
||
|
||
.. _class_Environment_constant_AMBIENT_SOURCE_DISABLED:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`AmbientSource<enum_Environment_AmbientSource>` **AMBIENT_SOURCE_DISABLED** = ``1``
|
||
|
||
禁用環境光。這比 :ref:`AMBIENT_SOURCE_SKY<class_Environment_constant_AMBIENT_SOURCE_SKY>` 提供了輕微的性能提升。
|
||
|
||
.. _class_Environment_constant_AMBIENT_SOURCE_COLOR:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`AmbientSource<enum_Environment_AmbientSource>` **AMBIENT_SOURCE_COLOR** = ``2``
|
||
|
||
為環境光指定特定的 :ref:`Color<class_Color>`\ 。與 :ref:`AMBIENT_SOURCE_SKY<class_Environment_constant_AMBIENT_SOURCE_SKY>` 相比,這提供了輕微的性能提升。
|
||
|
||
.. _class_Environment_constant_AMBIENT_SOURCE_SKY:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`AmbientSource<enum_Environment_AmbientSource>` **AMBIENT_SOURCE_SKY** = ``3``
|
||
|
||
無論背景如何,都從 :ref:`Sky<class_Sky>` 收集環境光。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_Environment_ReflectionSource:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **ReflectionSource**: :ref:`🔗<enum_Environment_ReflectionSource>`
|
||
|
||
.. _class_Environment_constant_REFLECTION_SOURCE_BG:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`ReflectionSource<enum_Environment_ReflectionSource>` **REFLECTION_SOURCE_BG** = ``0``
|
||
|
||
使用背景進行反射。
|
||
|
||
.. _class_Environment_constant_REFLECTION_SOURCE_DISABLED:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`ReflectionSource<enum_Environment_ReflectionSource>` **REFLECTION_SOURCE_DISABLED** = ``1``
|
||
|
||
禁用反射。與其他選項相比,這提供了輕微的性能提升。
|
||
|
||
.. _class_Environment_constant_REFLECTION_SOURCE_SKY:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`ReflectionSource<enum_Environment_ReflectionSource>` **REFLECTION_SOURCE_SKY** = ``2``
|
||
|
||
無論背景如何,都使用 :ref:`Sky<class_Sky>` 進行反射。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_Environment_ToneMapper:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **ToneMapper**: :ref:`🔗<enum_Environment_ToneMapper>`
|
||
|
||
.. _class_Environment_constant_TONE_MAPPER_LINEAR:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`ToneMapper<enum_Environment_ToneMapper>` **TONE_MAPPER_LINEAR** = ``0``
|
||
|
||
Does not modify color data, resulting in a linear tonemapping curve which unnaturally clips bright values, causing bright lighting to look blown out. The simplest and fastest tonemapper.
|
||
|
||
.. _class_Environment_constant_TONE_MAPPER_REINHARDT:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`ToneMapper<enum_Environment_ToneMapper>` **TONE_MAPPER_REINHARDT** = ``1``
|
||
|
||
A simple tonemapping curve that rolls off bright values to prevent clipping. This results in an image that can appear dull and low contrast. Slower than :ref:`TONE_MAPPER_LINEAR<class_Environment_constant_TONE_MAPPER_LINEAR>`.
|
||
|
||
\ **Note:** When :ref:`tonemap_white<class_Environment_property_tonemap_white>` is left at the default value of ``1.0``, :ref:`TONE_MAPPER_REINHARDT<class_Environment_constant_TONE_MAPPER_REINHARDT>` produces an identical image to :ref:`TONE_MAPPER_LINEAR<class_Environment_constant_TONE_MAPPER_LINEAR>`.
|
||
|
||
.. _class_Environment_constant_TONE_MAPPER_FILMIC:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`ToneMapper<enum_Environment_ToneMapper>` **TONE_MAPPER_FILMIC** = ``2``
|
||
|
||
Uses a film-like tonemapping curve to prevent clipping of bright values and provide better contrast than :ref:`TONE_MAPPER_REINHARDT<class_Environment_constant_TONE_MAPPER_REINHARDT>`. Slightly slower than :ref:`TONE_MAPPER_REINHARDT<class_Environment_constant_TONE_MAPPER_REINHARDT>`.
|
||
|
||
.. _class_Environment_constant_TONE_MAPPER_ACES:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`ToneMapper<enum_Environment_ToneMapper>` **TONE_MAPPER_ACES** = ``3``
|
||
|
||
Uses a high-contrast film-like tonemapping curve and desaturates bright values for a more realistic appearance. Slightly slower than :ref:`TONE_MAPPER_FILMIC<class_Environment_constant_TONE_MAPPER_FILMIC>`.
|
||
|
||
\ **Note:** This tonemapping operator is called "ACES Fitted" in Godot 3.x.
|
||
|
||
.. _class_Environment_constant_TONE_MAPPER_AGX:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`ToneMapper<enum_Environment_ToneMapper>` **TONE_MAPPER_AGX** = ``4``
|
||
|
||
Uses an adjustable film-like tonemapping curve and desaturates bright values for a more realistic appearance. Better than other tonemappers at maintaining the hue of colors as they become brighter. The slowest tonemapping option.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_Environment_GlowBlendMode:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **GlowBlendMode**: :ref:`🔗<enum_Environment_GlowBlendMode>`
|
||
|
||
.. _class_Environment_constant_GLOW_BLEND_MODE_ADDITIVE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **GLOW_BLEND_MODE_ADDITIVE** = ``0``
|
||
|
||
Adds the glow effect to the scene.
|
||
|
||
.. _class_Environment_constant_GLOW_BLEND_MODE_SCREEN:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **GLOW_BLEND_MODE_SCREEN** = ``1``
|
||
|
||
Adds the glow effect to the scene after modifying the glow influence based on the scene value; dark values will be highly influenced by glow and bright values will not be influenced by glow. This approach avoids bright values becoming overly bright from the glow effect. :ref:`tonemap_white<class_Environment_property_tonemap_white>` is used to determine the maximum scene value where the glow should have no influence. When :ref:`tonemap_mode<class_Environment_property_tonemap_mode>` is set to :ref:`TONE_MAPPER_LINEAR<class_Environment_constant_TONE_MAPPER_LINEAR>`, a value of ``1.0`` will be used as the maximum scene value.
|
||
|
||
.. _class_Environment_constant_GLOW_BLEND_MODE_SOFTLIGHT:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **GLOW_BLEND_MODE_SOFTLIGHT** = ``2``
|
||
|
||
Adds the glow effect to the tonemapped image after modifying the glow influence based on the image value; dark values and bright values will not be influenced by glow and mid-range values will be highly influenced by glow. This approach avoids bright values becoming overly bright from the glow effect. The glow will have the largest influence on image values of ``0.25`` and will have no influence when applied to image values greater than ``1.0``.
|
||
|
||
.. _class_Environment_constant_GLOW_BLEND_MODE_REPLACE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **GLOW_BLEND_MODE_REPLACE** = ``3``
|
||
|
||
Replaces all pixels' color by the glow effect. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness or to preview glow configuration in the editor.
|
||
|
||
.. _class_Environment_constant_GLOW_BLEND_MODE_MIX:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **GLOW_BLEND_MODE_MIX** = ``4``
|
||
|
||
Mixes the glow image with the scene image. Best used with :ref:`glow_bloom<class_Environment_property_glow_bloom>` to avoid darkening the scene.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_Environment_FogMode:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **FogMode**: :ref:`🔗<enum_Environment_FogMode>`
|
||
|
||
.. _class_Environment_constant_FOG_MODE_EXPONENTIAL:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`FogMode<enum_Environment_FogMode>` **FOG_MODE_EXPONENTIAL** = ``0``
|
||
|
||
Use a physically-based fog model defined primarily by fog density.
|
||
|
||
.. _class_Environment_constant_FOG_MODE_DEPTH:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`FogMode<enum_Environment_FogMode>` **FOG_MODE_DEPTH** = ``1``
|
||
|
||
Use a simple fog model defined by start and end positions and a custom curve. While not physically accurate, this model can be useful when you need more artistic control.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_Environment_SDFGIYScale:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **SDFGIYScale**: :ref:`🔗<enum_Environment_SDFGIYScale>`
|
||
|
||
.. _class_Environment_constant_SDFGI_Y_SCALE_50_PERCENT:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **SDFGI_Y_SCALE_50_PERCENT** = ``0``
|
||
|
||
在 Y(垂直)軸上對 SDFGI 使用 50% 的縮放。SDFGI 儲存格將比它們的寬度短兩倍。這允許提供更多的 GI 細節,並減少薄地板和天花板的漏光。這通常是垂直度不高的場景的最佳選擇。
|
||
|
||
.. _class_Environment_constant_SDFGI_Y_SCALE_75_PERCENT:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **SDFGI_Y_SCALE_75_PERCENT** = ``1``
|
||
|
||
在 Y(垂直)軸上為 SDFGI 使用 75% 的縮放。這是 50% 和 100% SDFGI Y 縮放之間的平衡。
|
||
|
||
.. _class_Environment_constant_SDFGI_Y_SCALE_100_PERCENT:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **SDFGI_Y_SCALE_100_PERCENT** = ``2``
|
||
|
||
在 Y(垂直)軸上為 SDFGI 使用 100% 的縮放。SDFGI 儲存格將與寬度一樣高。這通常是高度垂直場景的最佳選擇。不利之處在於,薄地板和天花板可能會導致漏光更加明顯。
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
屬性說明
|
||
--------
|
||
|
||
.. _class_Environment_property_adjustment_brightness:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **adjustment_brightness** = ``1.0`` :ref:`🔗<class_Environment_property_adjustment_brightness>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_adjustment_brightness**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_adjustment_brightness**\ (\ )
|
||
|
||
Applies a simple brightness adjustment to the rendered image after tonemaping. To adjust scene brightness use :ref:`tonemap_exposure<class_Environment_property_tonemap_exposure>` instead, which is applied before tonemapping and thus less prone to issues with bright colors. Effective only if :ref:`adjustment_enabled<class_Environment_property_adjustment_enabled>` is ``true``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_adjustment_color_correction:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Texture<class_Texture>` **adjustment_color_correction** :ref:`🔗<class_Environment_property_adjustment_color_correction>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_adjustment_color_correction**\ (\ value\: :ref:`Texture<class_Texture>`\ )
|
||
- :ref:`Texture<class_Texture>` **get_adjustment_color_correction**\ (\ )
|
||
|
||
The :ref:`Texture2D<class_Texture2D>` or :ref:`Texture3D<class_Texture3D>` lookup table (LUT) to use for the built-in post-process color grading. Can use a :ref:`GradientTexture1D<class_GradientTexture1D>` for a 1-dimensional LUT, or a :ref:`Texture3D<class_Texture3D>` for a more complex LUT. Effective only if :ref:`adjustment_enabled<class_Environment_property_adjustment_enabled>` is ``true``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_adjustment_contrast:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **adjustment_contrast** = ``1.0`` :ref:`🔗<class_Environment_property_adjustment_contrast>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_adjustment_contrast**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_adjustment_contrast**\ (\ )
|
||
|
||
Increasing :ref:`adjustment_contrast<class_Environment_property_adjustment_contrast>` will make dark values darker and bright values brighter. This simple adjustment is applied to the rendered image after tonemaping. When set to a value greater than ``1.0``, :ref:`adjustment_contrast<class_Environment_property_adjustment_contrast>` is prone to clipping colors that become too bright or too dark. Effective only if :ref:`adjustment_enabled<class_Environment_property_adjustment_enabled>` is ``true``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_adjustment_enabled:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **adjustment_enabled** = ``false`` :ref:`🔗<class_Environment_property_adjustment_enabled>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_adjustment_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_adjustment_enabled**\ (\ )
|
||
|
||
If ``true``, enables the ``adjustment_*`` properties provided by this resource. If ``false``, modifications to the ``adjustment_*`` properties will have no effect on the rendered scene.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_adjustment_saturation:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **adjustment_saturation** = ``1.0`` :ref:`🔗<class_Environment_property_adjustment_saturation>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_adjustment_saturation**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_adjustment_saturation**\ (\ )
|
||
|
||
Applies a simple saturation adjustment to the rendered image after tonemaping. When :ref:`adjustment_saturation<class_Environment_property_adjustment_saturation>` is set to ``0.0``, the rendered image will be fully converted to a grayscale image. Effective only if :ref:`adjustment_enabled<class_Environment_property_adjustment_enabled>` is ``true``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_ambient_light_color:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Color<class_Color>` **ambient_light_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_Environment_property_ambient_light_color>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ambient_light_color**\ (\ value\: :ref:`Color<class_Color>`\ )
|
||
- :ref:`Color<class_Color>` **get_ambient_light_color**\ (\ )
|
||
|
||
環境光的 :ref:`Color<class_Color>`\ 。僅當 :ref:`ambient_light_sky_contribution<class_Environment_property_ambient_light_sky_contribution>` 低於 ``1.0``\ (不包括)時,才有效。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_ambient_light_energy:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **ambient_light_energy** = ``1.0`` :ref:`🔗<class_Environment_property_ambient_light_energy>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ambient_light_energy**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_ambient_light_energy**\ (\ )
|
||
|
||
環境光的能量。值越高,光線越強。僅當 :ref:`ambient_light_sky_contribution<class_Environment_property_ambient_light_sky_contribution>` 低於 ``1.0``\ (不包括)時,才有效。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_ambient_light_sky_contribution:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **ambient_light_sky_contribution** = ``1.0`` :ref:`🔗<class_Environment_property_ambient_light_sky_contribution>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ambient_light_sky_contribution**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_ambient_light_sky_contribution**\ (\ )
|
||
|
||
定義天空給場景帶來的光照量。值為 ``0.0`` 表示天空的發光對場景照明沒有影響,因此所有的環境照明都由環境光提供。相反,值為 ``1.0`` 表示\ *所有*\ 影響場景的光線都由天空提供,因此環境光參數對場景沒有影響。
|
||
|
||
\ **注意:**\ 內部會將 :ref:`ambient_light_sky_contribution<class_Environment_property_ambient_light_sky_contribution>` 限制在 ``0.0`` 到 ``1.0`` 之間(閉區間)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_ambient_light_source:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`AmbientSource<enum_Environment_AmbientSource>` **ambient_light_source** = ``0`` :ref:`🔗<class_Environment_property_ambient_light_source>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ambient_source**\ (\ value\: :ref:`AmbientSource<enum_Environment_AmbientSource>`\ )
|
||
- :ref:`AmbientSource<enum_Environment_AmbientSource>` **get_ambient_source**\ (\ )
|
||
|
||
環境光源,用於算繪材質和全域照明。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_background_camera_feed_id:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **background_camera_feed_id** = ``1`` :ref:`🔗<class_Environment_property_background_camera_feed_id>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_camera_feed_id**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_camera_feed_id**\ (\ )
|
||
|
||
在背景中顯示的相機源的 ID。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_background_canvas_max_layer:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **background_canvas_max_layer** = ``0`` :ref:`🔗<class_Environment_property_background_canvas_max_layer>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_canvas_max_layer**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_canvas_max_layer**\ (\ )
|
||
|
||
要顯示的最大圖層 ID。只有在使用 :ref:`BG_CANVAS<class_Environment_constant_BG_CANVAS>` 背景模式時有效。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_background_color:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Color<class_Color>` **background_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_Environment_property_background_color>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_bg_color**\ (\ value\: :ref:`Color<class_Color>`\ )
|
||
- :ref:`Color<class_Color>` **get_bg_color**\ (\ )
|
||
|
||
場景中清除區域顯示的 :ref:`Color<class_Color>`\ 。僅在使用 :ref:`BG_COLOR<class_Environment_constant_BG_COLOR>` 背景模式時有效。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_background_energy_multiplier:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **background_energy_multiplier** = ``1.0`` :ref:`🔗<class_Environment_property_background_energy_multiplier>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_bg_energy_multiplier**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_bg_energy_multiplier**\ (\ )
|
||
|
||
背景能量的倍數。增加可以使背景更亮,減少可以使背景更暗。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_background_intensity:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **background_intensity** = ``30000.0`` :ref:`🔗<class_Environment_property_background_intensity>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_bg_intensity**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_bg_intensity**\ (\ )
|
||
|
||
背景的亮度,單位是尼特(坎德拉/平方米)。僅當啟用 :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units<class_ProjectSettings_property_rendering/lights_and_shadows/use_physical_light_units>` 時使用。預設值大致相當於正午時分的天空。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_background_mode:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`BGMode<enum_Environment_BGMode>` **background_mode** = ``0`` :ref:`🔗<class_Environment_property_background_mode>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_background**\ (\ value\: :ref:`BGMode<enum_Environment_BGMode>`\ )
|
||
- :ref:`BGMode<enum_Environment_BGMode>` **get_background**\ (\ )
|
||
|
||
The background mode.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_fog_aerial_perspective:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **fog_aerial_perspective** = ``0.0`` :ref:`🔗<class_Environment_property_fog_aerial_perspective>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_fog_aerial_perspective**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_fog_aerial_perspective**\ (\ )
|
||
|
||
If set above ``0.0`` (exclusive), blends between the fog's color and the color of the background :ref:`Sky<class_Sky>`, as read from the radiance cubemap. This has a small performance cost when set above ``0.0``. Must have :ref:`background_mode<class_Environment_property_background_mode>` set to :ref:`BG_SKY<class_Environment_constant_BG_SKY>`.
|
||
|
||
This is useful to simulate `aerial perspective <https://en.wikipedia.org/wiki/Aerial_perspective>`__ in large scenes with low density fog. However, it is not very useful for high-density fog, as the sky will shine through. When set to ``1.0``, the fog color comes completely from the :ref:`Sky<class_Sky>`. If set to ``0.0``, aerial perspective is disabled.
|
||
|
||
Notice that this does not sample the :ref:`Sky<class_Sky>` directly, but rather the radiance cubemap. The cubemap is sampled at a mipmap level depending on the depth of the rendered pixel; the farther away, the higher the resolution of the sampled mipmap. This results in the actual color being a blurred version of the sky, with more blur closer to the camera. The highest mipmap resolution is used at a depth of :ref:`Camera3D.far<class_Camera3D_property_far>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_fog_density:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **fog_density** = ``0.01`` :ref:`🔗<class_Environment_property_fog_density>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_fog_density**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_fog_density**\ (\ )
|
||
|
||
The fog density to be used. This is demonstrated in different ways depending on the :ref:`fog_mode<class_Environment_property_fog_mode>` mode chosen:
|
||
|
||
\ **Exponential Fog Mode:** Higher values result in denser fog. The fog rendering is exponential like in real life.
|
||
|
||
\ **Depth Fog mode:** The maximum intensity of the deep fog, effect will appear in the distance (relative to the camera). At ``1.0`` the fog will fully obscure the scene, at ``0.0`` the fog will not be visible.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_fog_depth_begin:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **fog_depth_begin** = ``10.0`` :ref:`🔗<class_Environment_property_fog_depth_begin>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_fog_depth_begin**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_fog_depth_begin**\ (\ )
|
||
|
||
The fog's depth starting distance from the camera. Only available when :ref:`fog_mode<class_Environment_property_fog_mode>` is set to :ref:`FOG_MODE_DEPTH<class_Environment_constant_FOG_MODE_DEPTH>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_fog_depth_curve:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **fog_depth_curve** = ``1.0`` :ref:`🔗<class_Environment_property_fog_depth_curve>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_fog_depth_curve**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_fog_depth_curve**\ (\ )
|
||
|
||
The fog depth's intensity curve. A number of presets are available in the Inspector by right-clicking the curve. Only available when :ref:`fog_mode<class_Environment_property_fog_mode>` is set to :ref:`FOG_MODE_DEPTH<class_Environment_constant_FOG_MODE_DEPTH>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_fog_depth_end:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **fog_depth_end** = ``100.0`` :ref:`🔗<class_Environment_property_fog_depth_end>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_fog_depth_end**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_fog_depth_end**\ (\ )
|
||
|
||
The fog's depth end distance from the camera. If this value is set to ``0``, it will be equal to the current camera's :ref:`Camera3D.far<class_Camera3D_property_far>` value. Only available when :ref:`fog_mode<class_Environment_property_fog_mode>` is set to :ref:`FOG_MODE_DEPTH<class_Environment_constant_FOG_MODE_DEPTH>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_fog_enabled:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **fog_enabled** = ``false`` :ref:`🔗<class_Environment_property_fog_enabled>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_fog_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_fog_enabled**\ (\ )
|
||
|
||
如果為 ``true``\ ,則啟用霧效果。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_fog_height:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **fog_height** = ``0.0`` :ref:`🔗<class_Environment_property_fog_height>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_fog_height**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_fog_height**\ (\ )
|
||
|
||
高度霧效果開始的高度。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_fog_height_density:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **fog_height_density** = ``0.0`` :ref:`🔗<class_Environment_property_fog_height_density>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_fog_height_density**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_fog_height_density**\ (\ )
|
||
|
||
用於隨著高度降低而增加霧的密度。要使霧隨著高度增加而增加,請使用負值。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_fog_light_color:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Color<class_Color>` **fog_light_color** = ``Color(0.518, 0.553, 0.608, 1)`` :ref:`🔗<class_Environment_property_fog_light_color>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_fog_light_color**\ (\ value\: :ref:`Color<class_Color>`\ )
|
||
- :ref:`Color<class_Color>` **get_fog_light_color**\ (\ )
|
||
|
||
霧的顏色。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_fog_light_energy:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **fog_light_energy** = ``1.0`` :ref:`🔗<class_Environment_property_fog_light_energy>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_fog_light_energy**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_fog_light_energy**\ (\ )
|
||
|
||
霧的亮度。值越高,霧越亮。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_fog_mode:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`FogMode<enum_Environment_FogMode>` **fog_mode** = ``0`` :ref:`🔗<class_Environment_property_fog_mode>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_fog_mode**\ (\ value\: :ref:`FogMode<enum_Environment_FogMode>`\ )
|
||
- :ref:`FogMode<enum_Environment_FogMode>` **get_fog_mode**\ (\ )
|
||
|
||
The fog mode.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_fog_sky_affect:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **fog_sky_affect** = ``1.0`` :ref:`🔗<class_Environment_property_fog_sky_affect>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_fog_sky_affect**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_fog_sky_affect**\ (\ )
|
||
|
||
非體積霧影響天空時使用的係數。\ ``1.0`` 表示霧可以完全遮蔽天空。較低的值會減少霧對天空算繪的影響,\ ``0.0`` 完全不影響天空的算繪。
|
||
|
||
\ **注意:**\ 如果 :ref:`fog_aerial_perspective<class_Environment_property_fog_aerial_perspective>` 為 ``1.0``\ ,\ :ref:`fog_sky_affect<class_Environment_property_fog_sky_affect>` 不會有視覺效果。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_fog_sun_scatter:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **fog_sun_scatter** = ``0.0`` :ref:`🔗<class_Environment_property_fog_sun_scatter>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_fog_sun_scatter**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_fog_sun_scatter**\ (\ )
|
||
|
||
如果設定為 ``0.0`` 以上,則根據視角以霧色算繪場景的定向光。這可以用來給人一種太陽正在“穿透”霧的印象。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_glow_blend_mode:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **glow_blend_mode** = ``1`` :ref:`🔗<class_Environment_property_glow_blend_mode>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_glow_blend_mode**\ (\ value\: :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>`\ )
|
||
- :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **get_glow_blend_mode**\ (\ )
|
||
|
||
The glow blending mode.
|
||
|
||
\ **Note:** The Compatibility renderer always uses :ref:`GLOW_BLEND_MODE_SCREEN<class_Environment_constant_GLOW_BLEND_MODE_SCREEN>` and :ref:`glow_blend_mode<class_Environment_property_glow_blend_mode>` will have no effect.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_glow_bloom:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **glow_bloom** = ``0.0`` :ref:`🔗<class_Environment_property_glow_bloom>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_glow_bloom**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_glow_bloom**\ (\ )
|
||
|
||
泛光的強度。如果設定為大於 ``0`` 的值,則將在比 :ref:`glow_hdr_threshold<class_Environment_property_glow_hdr_threshold>` 成員更暗的區域中顯示輝光。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_glow_enabled:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **glow_enabled** = ``false`` :ref:`🔗<class_Environment_property_glow_enabled>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_glow_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_glow_enabled**\ (\ )
|
||
|
||
If ``true``, the glow effect is enabled. This simulates real world atmosphere and eye/camera behavior by causing bright pixels to bleed onto surrounding pixels.
|
||
|
||
\ **Note:** When using the Mobile rendering method, glow looks different due to the lower dynamic range available in the Mobile rendering method.
|
||
|
||
\ **Note:** When using the Compatibility rendering method, glow uses a different implementation with some properties being unavailable and hidden from the inspector: ``glow_levels/*``, :ref:`glow_normalized<class_Environment_property_glow_normalized>`, :ref:`glow_strength<class_Environment_property_glow_strength>`, :ref:`glow_blend_mode<class_Environment_property_glow_blend_mode>`, :ref:`glow_mix<class_Environment_property_glow_mix>`, :ref:`glow_map<class_Environment_property_glow_map>`, and :ref:`glow_map_strength<class_Environment_property_glow_map_strength>`. This implementation is optimized to run on low-end devices and is less flexible as a result.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_glow_hdr_luminance_cap:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **glow_hdr_luminance_cap** = ``12.0`` :ref:`🔗<class_Environment_property_glow_hdr_luminance_cap>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_glow_hdr_luminance_cap**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_glow_hdr_luminance_cap**\ (\ )
|
||
|
||
HDR 輝光的較高閾值。比這個閾值更亮的區域將被限制,以達到輝光效果的目的。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_glow_hdr_scale:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **glow_hdr_scale** = ``2.0`` :ref:`🔗<class_Environment_property_glow_hdr_scale>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_glow_hdr_bleed_scale**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_glow_hdr_bleed_scale**\ (\ )
|
||
|
||
Smooths the transition between values that are below and above :ref:`glow_hdr_threshold<class_Environment_property_glow_hdr_threshold>` by reducing the amount of glow generated by values that are close to :ref:`glow_hdr_threshold<class_Environment_property_glow_hdr_threshold>`. Values above ``glow_hdr_threshold + glow_hdr_scale`` will not have glow reduced in this way.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_glow_hdr_threshold:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **glow_hdr_threshold** = ``1.0`` :ref:`🔗<class_Environment_property_glow_hdr_threshold>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_glow_hdr_bleed_threshold**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_glow_hdr_bleed_threshold**\ (\ )
|
||
|
||
HDR 輝光的下限閾值。當使用 Mobile 算繪方法時(僅支援較低的動態範圍,最大為 ``2.0``\ ),需要低於 ``1.0`` 才能看到輝光。在這種情況下取 ``0.9`` 可以達到不錯的效果。在 2D 中使用輝光時也需要降低到 ``1.0`` 以下,因為 2D 算繪使用 SDR。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_glow_intensity:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **glow_intensity** = ``0.3`` :ref:`🔗<class_Environment_property_glow_intensity>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_glow_intensity**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_glow_intensity**\ (\ )
|
||
|
||
The overall brightness multiplier that is applied to the glow effect just before it is blended with the scene. When using the Mobile rendering method (which only supports a lower dynamic range up to ``2.0``), this should be increased to ``1.5`` to compensate.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_glow_levels/1:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **glow_levels/1** = ``0.0`` :ref:`🔗<class_Environment_property_glow_levels/1>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const|
|
||
|
||
The intensity of the 1st level of glow. This is the most "local" level (least blurry).
|
||
|
||
\ **Note:** :ref:`glow_levels/1<class_Environment_property_glow_levels/1>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_glow_levels/2:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **glow_levels/2** = ``0.8`` :ref:`🔗<class_Environment_property_glow_levels/2>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const|
|
||
|
||
The intensity of the 2nd level of glow.
|
||
|
||
\ **Note:** :ref:`glow_levels/2<class_Environment_property_glow_levels/2>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_glow_levels/3:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **glow_levels/3** = ``0.4`` :ref:`🔗<class_Environment_property_glow_levels/3>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const|
|
||
|
||
The intensity of the 3rd level of glow.
|
||
|
||
\ **Note:** :ref:`glow_levels/3<class_Environment_property_glow_levels/3>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_glow_levels/4:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **glow_levels/4** = ``0.1`` :ref:`🔗<class_Environment_property_glow_levels/4>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const|
|
||
|
||
The intensity of the 4th level of glow.
|
||
|
||
\ **Note:** :ref:`glow_levels/4<class_Environment_property_glow_levels/4>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_glow_levels/5:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **glow_levels/5** = ``0.0`` :ref:`🔗<class_Environment_property_glow_levels/5>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const|
|
||
|
||
The intensity of the 5th level of glow.
|
||
|
||
\ **Note:** :ref:`glow_levels/5<class_Environment_property_glow_levels/5>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_glow_levels/6:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **glow_levels/6** = ``0.0`` :ref:`🔗<class_Environment_property_glow_levels/6>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const|
|
||
|
||
The intensity of the 6th level of glow.
|
||
|
||
\ **Note:** :ref:`glow_levels/6<class_Environment_property_glow_levels/6>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_glow_levels/7:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **glow_levels/7** = ``0.0`` :ref:`🔗<class_Environment_property_glow_levels/7>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const|
|
||
|
||
The intensity of the 7th level of glow. This is the most "global" level (blurriest).
|
||
|
||
\ **Note:** :ref:`glow_levels/7<class_Environment_property_glow_levels/7>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_glow_map:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Texture<class_Texture>` **glow_map** :ref:`🔗<class_Environment_property_glow_map>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_glow_map**\ (\ value\: :ref:`Texture<class_Texture>`\ )
|
||
- :ref:`Texture<class_Texture>` **get_glow_map**\ (\ )
|
||
|
||
The texture that should be used as a glow map to *multiply* the resulting glow color according to :ref:`glow_map_strength<class_Environment_property_glow_map_strength>`. This can be used to create a "lens dirt" effect. The texture's RGB color channels are used for modulation, but the alpha channel is ignored.
|
||
|
||
\ **Note:** The texture will be stretched to fit the screen. Therefore, it's recommended to use a texture with an aspect ratio that matches your project's base aspect ratio (typically 16:9).
|
||
|
||
\ **Note:** :ref:`glow_map<class_Environment_property_glow_map>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_glow_map_strength:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **glow_map_strength** = ``0.8`` :ref:`🔗<class_Environment_property_glow_map_strength>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_glow_map_strength**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_glow_map_strength**\ (\ )
|
||
|
||
How strong of an influence the :ref:`glow_map<class_Environment_property_glow_map>` should have on the overall glow effect. A strength of ``0.0`` means the glow map has no influence, while a strength of ``1.0`` means the glow map has full influence.
|
||
|
||
\ **Note:** If the glow map has black areas, a value of ``1.0`` can also turn off the glow effect entirely in specific areas of the screen.
|
||
|
||
\ **Note:** :ref:`glow_map_strength<class_Environment_property_glow_map_strength>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_glow_mix:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **glow_mix** = ``0.05`` :ref:`🔗<class_Environment_property_glow_mix>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_glow_mix**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_glow_mix**\ (\ )
|
||
|
||
When using the :ref:`GLOW_BLEND_MODE_MIX<class_Environment_constant_GLOW_BLEND_MODE_MIX>` :ref:`glow_blend_mode<class_Environment_property_glow_blend_mode>`, this controls how much the source image is blended with the glow layer. A value of ``0.0`` makes the glow rendering invisible, while a value of ``1.0`` is equivalent to :ref:`GLOW_BLEND_MODE_REPLACE<class_Environment_constant_GLOW_BLEND_MODE_REPLACE>`.
|
||
|
||
\ **Note:** :ref:`glow_mix<class_Environment_property_glow_mix>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_glow_normalized:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **glow_normalized** = ``false`` :ref:`🔗<class_Environment_property_glow_normalized>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_glow_normalized**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_glow_normalized**\ (\ )
|
||
|
||
If ``true``, glow levels will be normalized so that summed together their intensities equal ``1.0``.
|
||
|
||
\ **Note:** :ref:`glow_normalized<class_Environment_property_glow_normalized>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_glow_strength:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **glow_strength** = ``1.0`` :ref:`🔗<class_Environment_property_glow_strength>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_glow_strength**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_glow_strength**\ (\ )
|
||
|
||
The strength that is used when blurring across the screen to generate the glow effect. This affects the distance and intensity of the blur. When using the Mobile rendering method, this should be increased to compensate for the lower dynamic range.
|
||
|
||
\ **Note:** :ref:`glow_strength<class_Environment_property_glow_strength>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_reflected_light_source:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`ReflectionSource<enum_Environment_ReflectionSource>` **reflected_light_source** = ``0`` :ref:`🔗<class_Environment_property_reflected_light_source>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_reflection_source**\ (\ value\: :ref:`ReflectionSource<enum_Environment_ReflectionSource>`\ )
|
||
- :ref:`ReflectionSource<enum_Environment_ReflectionSource>` **get_reflection_source**\ (\ )
|
||
|
||
反射(鏡面反射)光源。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_sdfgi_bounce_feedback:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **sdfgi_bounce_feedback** = ``0.5`` :ref:`🔗<class_Environment_property_sdfgi_bounce_feedback>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_sdfgi_bounce_feedback**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_sdfgi_bounce_feedback**\ (\ )
|
||
|
||
使用 SDFGI 時,每次從表面反彈時套用於光的能量倍增器。大於 ``0.0`` 的值將模擬多次反彈,從而產生更逼真的外觀。增加 :ref:`sdfgi_bounce_feedback<class_Environment_property_sdfgi_bounce_feedback>` 通常對性能沒有影響。另見 :ref:`sdfgi_energy<class_Environment_property_sdfgi_energy>`\ 。
|
||
|
||
\ **注意:**\ 大於 ``0.5`` 的值會導致無限的回饋迴圈,應避免在具有明亮材質的場景中使用。
|
||
|
||
\ **注意:**\ 如果 :ref:`sdfgi_bounce_feedback<class_Environment_property_sdfgi_bounce_feedback>` 為 ``0.0``\ ,間接照明會在反射中表現出來,因為光只會反彈一次。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_sdfgi_cascade0_distance:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **sdfgi_cascade0_distance** = ``12.8`` :ref:`🔗<class_Environment_property_sdfgi_cascade0_distance>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_sdfgi_cascade0_distance**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_sdfgi_cascade0_distance**\ (\ )
|
||
|
||
**注意:**\ 該屬性被連結到 :ref:`sdfgi_min_cell_size<class_Environment_property_sdfgi_min_cell_size>` 和 :ref:`sdfgi_max_distance<class_Environment_property_sdfgi_max_distance>`\ 。更改其值也會自動更改這些屬性。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_sdfgi_cascades:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **sdfgi_cascades** = ``4`` :ref:`🔗<class_Environment_property_sdfgi_cascades>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_sdfgi_cascades**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_sdfgi_cascades**\ (\ )
|
||
|
||
用於 SDFGI 的級聯數(1 到 8 之間)。更高的級聯數會以性能為代價,允許在更遠的地方顯示 SDFGI,同時保持近距離的細節。在小型關卡上使用 SDFGI 時,通常 :ref:`sdfgi_cascades<class_Environment_property_sdfgi_cascades>` 可以被降低到 ``1`` 和 ``4`` 之間以提高性能。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_sdfgi_enabled:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **sdfgi_enabled** = ``false`` :ref:`🔗<class_Environment_property_sdfgi_enabled>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_sdfgi_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_sdfgi_enabled**\ (\ )
|
||
|
||
如果為 ``true``\ ,則為將 :ref:`GeometryInstance3D.gi_mode<class_GeometryInstance3D_property_gi_mode>` 設定為 :ref:`GeometryInstance3D.GI_MODE_STATIC<class_GeometryInstance3D_constant_GI_MODE_STATIC>` 的網格,啟用有符號距離場全域照明(即 SDFGI)。SDFGI 是一種即時全域照明技術,適用於程式生成和使用者建構的關卡,包括在遊戲過程中建立幾何體的情況。有符號距離場會在相機移動時自動圍繞相機生成。支援動態光,但不支援動態遮擋物和自發光表面。
|
||
|
||
\ **注意:**\ SDFGI 只支援 Forward+ 算繪方式,不支援 Mobile 或 Compatibility。
|
||
|
||
\ **性能:**\ SDFGI 對 GPU 的要求比較高,不適合集成顯卡等低端硬體(可以考慮 :ref:`LightmapGI<class_LightmapGI>`\ )。要提高 SDFGI 性能,請在專案設定中啟用 :ref:`ProjectSettings.rendering/global_illumination/gi/use_half_resolution<class_ProjectSettings_property_rendering/global_illumination/gi/use_half_resolution>`\ 。
|
||
|
||
\ **注意:**\ 網格應該有足夠厚的壁以避免漏光(避免單面壁)。對於內部關卡,將關卡幾何體放入一個足夠大的盒子中,並橋接迴圈邊以閉合網格。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_sdfgi_energy:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **sdfgi_energy** = ``1.0`` :ref:`🔗<class_Environment_property_sdfgi_energy>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_sdfgi_energy**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_sdfgi_energy**\ (\ )
|
||
|
||
用於 SDFGI 的能量乘數。較高的值將導致更亮的間接照明和反射。另見 :ref:`sdfgi_bounce_feedback<class_Environment_property_sdfgi_bounce_feedback>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_sdfgi_max_distance:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **sdfgi_max_distance** = ``204.8`` :ref:`🔗<class_Environment_property_sdfgi_max_distance>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_sdfgi_max_distance**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_sdfgi_max_distance**\ (\ )
|
||
|
||
SDFGI 可見的最大距離。超出該距離,環境照明或其他 GI 來源(例如 :ref:`ReflectionProbe<class_ReflectionProbe>`\ )將用作後備。
|
||
|
||
\ **注意:**\ 該屬性被連結到 :ref:`sdfgi_min_cell_size<class_Environment_property_sdfgi_min_cell_size>` 和 :ref:`sdfgi_cascade0_distance<class_Environment_property_sdfgi_cascade0_distance>`\ 。更改其值,也會自動更改這些屬性。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_sdfgi_min_cell_size:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **sdfgi_min_cell_size** = ``0.2`` :ref:`🔗<class_Environment_property_sdfgi_min_cell_size>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_sdfgi_min_cell_size**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_sdfgi_min_cell_size**\ (\ )
|
||
|
||
用於最接近的 SDFGI 級聯的像元大小(以 3D 單位表示)。較低的值允許 SDFGI 近距離更精確,但代價是 SDFGI 更新要求更高。當相機快速移動時,這可能會導致卡頓。較高的值允許 SDFGI 覆蓋更多的範圍,同時也降低了 SDFGI 更新對性能的影響。
|
||
|
||
\ **注意:**\ 該屬性被連結到 :ref:`sdfgi_max_distance<class_Environment_property_sdfgi_max_distance>` 和 :ref:`sdfgi_cascade0_distance<class_Environment_property_sdfgi_cascade0_distance>`\ 。更改其值也會自動更改這些屬性。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_sdfgi_normal_bias:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **sdfgi_normal_bias** = ``1.1`` :ref:`🔗<class_Environment_property_sdfgi_normal_bias>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_sdfgi_normal_bias**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_sdfgi_normal_bias**\ (\ )
|
||
|
||
用於 SDFGI 探查的正常偏差。增加此值可以減少傾斜表面上的可見條紋偽影,但會增加漏光。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_sdfgi_probe_bias:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **sdfgi_probe_bias** = ``1.1`` :ref:`🔗<class_Environment_property_sdfgi_probe_bias>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_sdfgi_probe_bias**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_sdfgi_probe_bias**\ (\ )
|
||
|
||
用於 SDFGI 探查的恒定偏差。增加此值可以減少傾斜表面上的可見條紋偽影,但會增加漏光。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_sdfgi_read_sky_light:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **sdfgi_read_sky_light** = ``true`` :ref:`🔗<class_Environment_property_sdfgi_read_sky_light>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_sdfgi_read_sky_light**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_sdfgi_reading_sky_light**\ (\ )
|
||
|
||
如果為 ``true``\ ,則 SDFGI 會考慮環境光照。對於室內場景,這應該被設定為 ``false``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_sdfgi_use_occlusion:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **sdfgi_use_occlusion** = ``false`` :ref:`🔗<class_Environment_property_sdfgi_use_occlusion>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_sdfgi_use_occlusion**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_sdfgi_using_occlusion**\ (\ )
|
||
|
||
如果為 ``true``\ ,SDFGI 使用遮擋偵測方法來減少漏光。然而,遮擋可能會在某些位置引入暗斑,這在大多數戶外場景中可能是不希望的。\ :ref:`sdfgi_use_occlusion<class_Environment_property_sdfgi_use_occlusion>` 對性能有影響,只應在需要時啟用。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_sdfgi_y_scale:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **sdfgi_y_scale** = ``1`` :ref:`🔗<class_Environment_property_sdfgi_y_scale>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_sdfgi_y_scale**\ (\ value\: :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>`\ )
|
||
- :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **get_sdfgi_y_scale**\ (\ )
|
||
|
||
用於 SDFGI 儲存格的 Y 縮放。較低的值將導致 SDFGI 儲存格在 Y 軸上更緊密地堆積在一起。這用於在品質和覆蓋大量垂直地面之間取得平衡。\ :ref:`sdfgi_y_scale<class_Environment_property_sdfgi_y_scale>` 應該根據場景的垂直程度(以及相機在 Y 軸上移動的速度)來設定。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_sky:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Sky<class_Sky>` **sky** :ref:`🔗<class_Environment_property_sky>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_sky**\ (\ value\: :ref:`Sky<class_Sky>`\ )
|
||
- :ref:`Sky<class_Sky>` **get_sky**\ (\ )
|
||
|
||
該 **Environment** 所使用的 :ref:`Sky<class_Sky>` 資源。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_sky_custom_fov:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **sky_custom_fov** = ``0.0`` :ref:`🔗<class_Environment_property_sky_custom_fov>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_sky_custom_fov**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_sky_custom_fov**\ (\ )
|
||
|
||
如果被設定為大於 ``0.0`` 的值,則會覆蓋用於天空算繪的視野。如果被設置為 ``0.0``\ ,則使用與目前 :ref:`Camera3D<class_Camera3D>` 相同的 FOV 進行天空算繪。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_sky_rotation:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Vector3<class_Vector3>` **sky_rotation** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_Environment_property_sky_rotation>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_sky_rotation**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
|
||
- :ref:`Vector3<class_Vector3>` **get_sky_rotation**\ (\ )
|
||
|
||
用於天空算繪的旋轉。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_ssao_ao_channel_affect:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **ssao_ao_channel_affect** = ``0.0`` :ref:`🔗<class_Environment_property_ssao_ao_channel_affect>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ssao_ao_channel_affect**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_ssao_ao_channel_affect**\ (\ )
|
||
|
||
定義了AO紋理的材質的螢幕空間環境遮擋強度。高於\ ``0``\ 的值將使SSAO效果在AO紋理變暗的區域可見。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_ssao_detail:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **ssao_detail** = ``0.5`` :ref:`🔗<class_Environment_property_ssao_detail>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ssao_detail**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_ssao_detail**\ (\ )
|
||
|
||
設定螢幕空間環境遮蔽效果的附加細節級別的強度。高的值會使細節傳遞更加突出,但它可能會導致最終圖像中出現鋸齒。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_ssao_enabled:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **ssao_enabled** = ``false`` :ref:`🔗<class_Environment_property_ssao_enabled>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ssao_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_ssao_enabled**\ (\ )
|
||
|
||
If ``true``, the screen-space ambient occlusion effect is enabled. This darkens objects' corners and cavities to simulate ambient light not reaching the entire object as in real life. This works well for small, dynamic objects, but baked lighting or ambient occlusion textures will do a better job at displaying ambient occlusion on large static objects. Godot uses a form of SSAO called Adaptive Screen Space Ambient Occlusion which is itself a form of Horizon Based Ambient Occlusion.
|
||
|
||
\ **Note:** SSAO is only supported in the Forward+ and Compatibility rendering methods, not Mobile.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_ssao_horizon:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **ssao_horizon** = ``0.06`` :ref:`🔗<class_Environment_property_ssao_horizon>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ssao_horizon**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_ssao_horizon**\ (\ )
|
||
|
||
用於考慮表面上給定點是否被遮擋的閾值,表示為與地平線的角度,對應到 ``0.0-1.0`` 範圍。\ ``1.0`` 的值不會導致遮蔽。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_ssao_intensity:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **ssao_intensity** = ``2.0`` :ref:`🔗<class_Environment_property_ssao_intensity>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ssao_intensity**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_ssao_intensity**\ (\ )
|
||
|
||
主要螢幕空間的環境光遮蔽強度。用作螢幕空間環境光遮蔽效果的乘數。較高的值會導致較暗的遮蔽。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_ssao_light_affect:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **ssao_light_affect** = ``0.0`` :ref:`🔗<class_Environment_property_ssao_light_affect>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ssao_direct_light_affect**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_ssao_direct_light_affect**\ (\ )
|
||
|
||
直射光下的螢幕空間環境光遮蔽強度。在現實生活中,環境遮擋只適用於間接光,也就是說在直射光下無法看到其效果。高於\ ``0``\ 的數值將使SSAO效果在直射光下可見。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_ssao_power:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **ssao_power** = ``1.5`` :ref:`🔗<class_Environment_property_ssao_power>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ssao_power**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_ssao_power**\ (\ )
|
||
|
||
光遮蔽的分佈。更高的值會導致更暗的光遮蔽,類似於 :ref:`ssao_intensity<class_Environment_property_ssao_intensity>`\ ,但衰減更劇烈。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_ssao_radius:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **ssao_radius** = ``1.0`` :ref:`🔗<class_Environment_property_ssao_radius>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ssao_radius**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_ssao_radius**\ (\ )
|
||
|
||
計算螢幕空間環境光遮蔽時,物件可以相互遮蔽的距離。較高的值將導致以性能和品質為代價的更遠距離的光遮蔽。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_ssao_sharpness:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **ssao_sharpness** = ``0.98`` :ref:`🔗<class_Environment_property_ssao_sharpness>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ssao_sharpness**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_ssao_sharpness**\ (\ )
|
||
|
||
允許螢幕空間環境光遮蔽效果,在物件邊緣上模糊的量。設定太高,會導致對象邊緣出現鋸齒。設定太低,會使對象邊緣顯得模糊。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_ssil_enabled:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **ssil_enabled** = ``false`` :ref:`🔗<class_Environment_property_ssil_enabled>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ssil_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_ssil_enabled**\ (\ )
|
||
|
||
如果為 ``true``\ ,則啟用螢幕空間間接照明效果。螢幕空間間接照明是一種間接照明形式,它允許漫射光在附近的物體之間反射。螢幕空間間接照明與螢幕空間環境光遮蔽的工作方式非常相似,因為它只影響有限的範圍。它旨在與 SDFGI 或 :ref:`VoxelGI<class_VoxelGI>` 等適當的全域照明形式一起使用。螢幕空間間接光照不受單個光源 :ref:`Light3D.light_indirect_energy<class_Light3D_property_light_indirect_energy>` 的影響。
|
||
|
||
\ **注意:**\ SSIL 只支援 Forward+ 算繪方式,不支援 Mobile 或 Compatibility。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_ssil_intensity:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **ssil_intensity** = ``1.0`` :ref:`🔗<class_Environment_property_ssil_intensity>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ssil_intensity**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_ssil_intensity**\ (\ )
|
||
|
||
螢幕空間間接照明效果的亮度倍增器。更高的值會產生更亮的光。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_ssil_normal_rejection:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **ssil_normal_rejection** = ``1.0`` :ref:`🔗<class_Environment_property_ssil_normal_rejection>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ssil_normal_rejection**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_ssil_normal_rejection**\ (\ )
|
||
|
||
計算螢幕空間間接照明時,使用的法線拋棄量。法線拋棄使用給定樣本點的法線,來拋棄遠離目前圖元的樣本。當只有物體的一側被照亮時,為了避免漏光法線拋棄是必要的。但是,如果需要漏光,則可以禁用法線拋棄,例如當場景主要包含自發光對象,且其發光面從相機無法看到時。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_ssil_radius:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **ssil_radius** = ``5.0`` :ref:`🔗<class_Environment_property_ssil_radius>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ssil_radius**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_ssil_radius**\ (\ )
|
||
|
||
使用螢幕空間間接照明效果時,反射光可以傳播的距離。較大的值,會導致光線在場景中進一步反彈,但可能會導致取樣不足的偽影,看起來像光源周圍的長尖峰。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_ssil_sharpness:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **ssil_sharpness** = ``0.98`` :ref:`🔗<class_Environment_property_ssil_sharpness>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ssil_sharpness**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_ssil_sharpness**\ (\ )
|
||
|
||
允許螢幕空間間接照明效果,在物件邊緣上模糊的量。設定太高,會導致物件邊緣出現鋸齒。設定太低,會使對象邊緣顯得模糊。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_ssr_depth_tolerance:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **ssr_depth_tolerance** = ``0.5`` :ref:`🔗<class_Environment_property_ssr_depth_tolerance>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ssr_depth_tolerance**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_ssr_depth_tolerance**\ (\ )
|
||
|
||
螢幕空間反射的深度公差。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_ssr_enabled:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **ssr_enabled** = ``false`` :ref:`🔗<class_Environment_property_ssr_enabled>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ssr_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_ssr_enabled**\ (\ )
|
||
|
||
如果 ``true``\ ,則啟用螢幕空間反射。螢幕空間反射比體素全域光照 (VoxelGI) 或反射探針 (ReflectionProbe) 的反射更精確,但速度較慢,且無法反射被其他物體遮蔽的表面。
|
||
|
||
\ **注意:** 螢幕空間反射僅在 Forward+ 渲染模式下受支持,不支援行動端或相容模式。
|
||
|
||
\ **注意:** 螢幕空間反射不支援具有透明背景的視窗(\ :ref:`Viewport.transparent_bg<class_Viewport_property_transparent_bg>` 為 ``true``\ )。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_ssr_fade_in:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **ssr_fade_in** = ``0.15`` :ref:`🔗<class_Environment_property_ssr_fade_in>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ssr_fade_in**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_ssr_fade_in**\ (\ )
|
||
|
||
螢幕空間反射的淡入距離。影響從反射材質到螢幕空間反射的區域。只有正值有效(負值將被鉗制為 ``0.0``\ )。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_ssr_fade_out:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **ssr_fade_out** = ``2.0`` :ref:`🔗<class_Environment_property_ssr_fade_out>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ssr_fade_out**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_ssr_fade_out**\ (\ )
|
||
|
||
螢幕空間反射的淡出距離。影響從螢幕空間反射到“全域”反射的區域。只有正值有效(負值將被鉗制為 ``0.0``\ )。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_ssr_max_steps:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **ssr_max_steps** = ``64`` :ref:`🔗<class_Environment_property_ssr_max_steps>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ssr_max_steps**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_ssr_max_steps**\ (\ )
|
||
|
||
螢幕空間反射的最大步數。數值越高,速度越慢。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_tonemap_agx_contrast:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **tonemap_agx_contrast** = ``1.25`` :ref:`🔗<class_Environment_property_tonemap_agx_contrast>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_tonemap_agx_contrast**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_tonemap_agx_contrast**\ (\ )
|
||
|
||
Increasing :ref:`tonemap_agx_contrast<class_Environment_property_tonemap_agx_contrast>` will make dark values darker and bright values brighter. Produces a higher quality result than :ref:`adjustment_contrast<class_Environment_property_adjustment_contrast>` without any additional performance cost, but is only available when using the :ref:`TONE_MAPPER_AGX<class_Environment_constant_TONE_MAPPER_AGX>` tonemapper.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_tonemap_agx_white:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **tonemap_agx_white** = ``16.29`` :ref:`🔗<class_Environment_property_tonemap_agx_white>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_tonemap_agx_white**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_tonemap_agx_white**\ (\ )
|
||
|
||
The white reference value for tonemapping, which indicates where bright white is located in the scale of values provided to the tonemapper. For photorealistic lighting, it is recommended to set :ref:`tonemap_agx_white<class_Environment_property_tonemap_agx_white>` to at least ``6.0``. Higher values result in less blown out highlights, but may make the scene appear lower contrast. :ref:`tonemap_agx_white<class_Environment_property_tonemap_agx_white>` is the same as :ref:`tonemap_white<class_Environment_property_tonemap_white>`, but is only effective with the :ref:`TONE_MAPPER_AGX<class_Environment_constant_TONE_MAPPER_AGX>` tonemapper. See also :ref:`tonemap_exposure<class_Environment_property_tonemap_exposure>`.
|
||
|
||
\ **Note:** When using the Mobile renderer with :ref:`Viewport.use_hdr_2d<class_Viewport_property_use_hdr_2d>` disabled, :ref:`tonemap_agx_white<class_Environment_property_tonemap_agx_white>` is ignored and a white value of ``2.0`` will always be used instead.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_tonemap_exposure:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **tonemap_exposure** = ``1.0`` :ref:`🔗<class_Environment_property_tonemap_exposure>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_tonemap_exposure**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_tonemap_exposure**\ (\ )
|
||
|
||
Adjusts the brightness of values before they are provided to the tonemapper. Higher :ref:`tonemap_exposure<class_Environment_property_tonemap_exposure>` values result in a brighter image. See also :ref:`tonemap_white<class_Environment_property_tonemap_white>`.
|
||
|
||
\ **Note:** Values provided to the tonemapper will also be multiplied by ``2.0`` and ``1.8`` for :ref:`TONE_MAPPER_FILMIC<class_Environment_constant_TONE_MAPPER_FILMIC>` and :ref:`TONE_MAPPER_ACES<class_Environment_constant_TONE_MAPPER_ACES>` respectively to produce a similar apparent brightness as :ref:`TONE_MAPPER_LINEAR<class_Environment_constant_TONE_MAPPER_LINEAR>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_tonemap_mode:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`ToneMapper<enum_Environment_ToneMapper>` **tonemap_mode** = ``0`` :ref:`🔗<class_Environment_property_tonemap_mode>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_tonemapper**\ (\ value\: :ref:`ToneMapper<enum_Environment_ToneMapper>`\ )
|
||
- :ref:`ToneMapper<enum_Environment_ToneMapper>` **get_tonemapper**\ (\ )
|
||
|
||
The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on an LDR display. (Godot doesn't support rendering on HDR displays yet.)
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_tonemap_white:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **tonemap_white** = ``1.0`` :ref:`🔗<class_Environment_property_tonemap_white>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_tonemap_white**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_tonemap_white**\ (\ )
|
||
|
||
The white reference value for tonemapping, which indicates where bright white is located in the scale of values provided to the tonemapper. For photorealistic lighting, it is recommended to set :ref:`tonemap_white<class_Environment_property_tonemap_white>` to at least ``6.0``. Higher values result in less blown out highlights, but may make the scene appear lower contrast. :ref:`tonemap_agx_white<class_Environment_property_tonemap_agx_white>` will be used instead when using the :ref:`TONE_MAPPER_AGX<class_Environment_constant_TONE_MAPPER_AGX>` tonemapper. See also :ref:`tonemap_exposure<class_Environment_property_tonemap_exposure>`.
|
||
|
||
\ **Note:** :ref:`tonemap_white<class_Environment_property_tonemap_white>` must be set to ``2.0`` or lower on the Mobile renderer to produce bright images.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_volumetric_fog_albedo:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Color<class_Color>` **volumetric_fog_albedo** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_Environment_property_volumetric_fog_albedo>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_volumetric_fog_albedo**\ (\ value\: :ref:`Color<class_Color>`\ )
|
||
- :ref:`Color<class_Color>` **get_volumetric_fog_albedo**\ (\ )
|
||
|
||
與燈光互動時體積霧的 :ref:`Color<class_Color>`\ 。當煙霧的反照率顏色更暗時,薄霧和霧的反照率顏色接近 ``Color(1, 1, 1, 1)``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_volumetric_fog_ambient_inject:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **volumetric_fog_ambient_inject** = ``0.0`` :ref:`🔗<class_Environment_property_volumetric_fog_ambient_inject>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_volumetric_fog_ambient_inject**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_volumetric_fog_ambient_inject**\ (\ )
|
||
|
||
衡量體積霧中使用的環境光的強度。值為 ``0.0`` ,意味著環境光不會影響體積霧。當 :ref:`volumetric_fog_ambient_inject<class_Environment_property_volumetric_fog_ambient_inject>` 設定高於 ``0.0`` 時,會有一個小的性能成本。
|
||
|
||
\ **注意:**\ 如果 :ref:`volumetric_fog_density<class_Environment_property_volumetric_fog_density>` 為 ``0.0``\ ,或 :ref:`volumetric_fog_albedo<class_Environment_property_volumetric_fog_albedo>` 是全黑的顏色,則該屬性沒有可見效果。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_volumetric_fog_anisotropy:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **volumetric_fog_anisotropy** = ``0.2`` :ref:`🔗<class_Environment_property_volumetric_fog_anisotropy>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_volumetric_fog_anisotropy**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_volumetric_fog_anisotropy**\ (\ )
|
||
|
||
散射光穿過體積霧時的方向。接近 ``1.0`` 的值意味著幾乎所有的光都是向前散射的。接近 ``0.0`` 的值表示光在所有方向上均勻散射。接近 ``-1.0`` 的值表示光主要向後散射。霧和薄霧會稍微向前散射光,而煙霧則向各個方向均勻散射光。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_volumetric_fog_density:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **volumetric_fog_density** = ``0.05`` :ref:`🔗<class_Environment_property_volumetric_fog_density>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_volumetric_fog_density**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_volumetric_fog_density**\ (\ )
|
||
|
||
體積霧的基本\ *指數*\ 密度。將其設定為希望全域擁有的最低密度。\ :ref:`FogVolume<class_FogVolume>` 可用於增加或減少特定區域的密度。霧算繪如同在現實生活中一樣是指數式的。
|
||
|
||
\ ``0.0`` 的值會禁用全域體積霧,同時允許 :ref:`FogVolume<class_FogVolume>` 在特定區域顯示體積霧。
|
||
|
||
要使體積霧作為一種體積\ *照明*\ 解決方案,請將 :ref:`volumetric_fog_density<class_Environment_property_volumetric_fog_density>` 設定為最低的非零值(\ ``0.0001``\ ),然後將燈光的 :ref:`Light3D.light_volumetric_fog_energy<class_Light3D_property_light_volumetric_fog_energy>` 增加到 ``10000`` 和 ``100000`` 之間的值,以補償極低的密度。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_volumetric_fog_detail_spread:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **volumetric_fog_detail_spread** = ``2.0`` :ref:`🔗<class_Environment_property_volumetric_fog_detail_spread>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_volumetric_fog_detail_spread**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_volumetric_fog_detail_spread**\ (\ )
|
||
|
||
視錐體素緩衝區長度的大小分佈。較高的值會壓縮更靠近相機的視錐體素,並將更多細節放置在更靠近相機的位置。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_volumetric_fog_emission:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Color<class_Color>` **volumetric_fog_emission** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_Environment_property_volumetric_fog_emission>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_volumetric_fog_emission**\ (\ value\: :ref:`Color<class_Color>`\ )
|
||
- :ref:`Color<class_Color>` **get_volumetric_fog_emission**\ (\ )
|
||
|
||
從體積霧發出的光。即使有自發光,體積霧也不會將光投射到其他表面上。自發光對於建立環境顏色很有用。由於體積霧效果僅使用單次散射,因此霧往往需要一點點自發光來柔化刺眼的陰影。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_volumetric_fog_emission_energy:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **volumetric_fog_emission_energy** = ``1.0`` :ref:`🔗<class_Environment_property_volumetric_fog_emission_energy>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_volumetric_fog_emission_energy**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_volumetric_fog_emission_energy**\ (\ )
|
||
|
||
從體積霧發出的光的亮度。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_volumetric_fog_enabled:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **volumetric_fog_enabled** = ``false`` :ref:`🔗<class_Environment_property_volumetric_fog_enabled>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_volumetric_fog_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_volumetric_fog_enabled**\ (\ )
|
||
|
||
啟用體積霧效果。體積霧使用與螢幕對齊的視錐體素緩衝區,來計算短至中等範圍內的精確體積散射。體積霧與 :ref:`FogVolume<class_FogVolume>` 和燈光互動,以計算局部和全域的霧。體積霧使用一個基於消光、散射、和自發光的 PBR 單一散射模型,它以密度、反照率、和自發光的形式暴露給使用者。
|
||
|
||
\ **注意:**\ 體積霧只支援 Forward+ 算繪方式,不支援移動和相容模式。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_volumetric_fog_gi_inject:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **volumetric_fog_gi_inject** = ``1.0`` :ref:`🔗<class_Environment_property_volumetric_fog_gi_inject>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_volumetric_fog_gi_inject**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_volumetric_fog_gi_inject**\ (\ )
|
||
|
||
衡量體積霧的反照率顏色中使用的全域照明的強度。值為\ ``0.0`` ,意味著全局照明不會影響體積霧。當 :ref:`volumetric_fog_gi_inject<class_Environment_property_volumetric_fog_gi_inject>` 設定高於\ ``0.0`` 時,會有很小的性能成本。
|
||
|
||
\ **注意:**\ 如果 :ref:`volumetric_fog_density<class_Environment_property_volumetric_fog_density>` 為 ``0.0``\ ,或 :ref:`volumetric_fog_albedo<class_Environment_property_volumetric_fog_albedo>` 是全黑的顏色,則該選項沒有可見效果。
|
||
|
||
\ **注意:**\ 在使用 :ref:`volumetric_fog_gi_inject<class_Environment_property_volumetric_fog_gi_inject>` 時,只有 :ref:`VoxelGI<class_VoxelGI>` 和 SDFGI(\ :ref:`sdfgi_enabled<class_Environment_property_sdfgi_enabled>`\ )會被考慮到。來自 :ref:`LightmapGI<class_LightmapGI>`\ 、\ :ref:`ReflectionProbe<class_ReflectionProbe>` 和 SSIL(參見 :ref:`ssil_enabled<class_Environment_property_ssil_enabled>`\ )的全域照明將被體積霧所忽略。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_volumetric_fog_length:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **volumetric_fog_length** = ``64.0`` :ref:`🔗<class_Environment_property_volumetric_fog_length>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_volumetric_fog_length**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_volumetric_fog_length**\ (\ )
|
||
|
||
計算體積霧的距離。增加以在更大範圍內計算霧,減少以在不需要長範圍時新增更多細節。為了獲得最佳品質的霧,請將其保持在盡可能低的水平。另請參閱 :ref:`ProjectSettings.rendering/environment/volumetric_fog/volume_depth<class_ProjectSettings_property_rendering/environment/volumetric_fog/volume_depth>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_volumetric_fog_sky_affect:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **volumetric_fog_sky_affect** = ``1.0`` :ref:`🔗<class_Environment_property_volumetric_fog_sky_affect>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_volumetric_fog_sky_affect**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_volumetric_fog_sky_affect**\ (\ )
|
||
|
||
使用體積霧影響天空時使用的係數。\ ``1.0``\ 表示體積霧可以完全遮蔽天空。較低的值會減少體積霧對天空算繪的影響,\ ``0.0`` 根本不會影響天空的算繪。
|
||
|
||
\ **注意:**\ 即使 :ref:`volumetric_fog_density<class_Environment_property_volumetric_fog_density>` 為 ``0.0``\ ,\ :ref:`volumetric_fog_sky_affect<class_Environment_property_volumetric_fog_sky_affect>` 也會影響 :ref:`FogVolume<class_FogVolume>`\ 。如果發現 :ref:`FogVolume<class_FogVolume>` 在仰望天空時正在消失,請將 :ref:`volumetric_fog_sky_affect<class_Environment_property_volumetric_fog_sky_affect>` 設置為 ``1.0``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_volumetric_fog_temporal_reprojection_amount:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **volumetric_fog_temporal_reprojection_amount** = ``0.9`` :ref:`🔗<class_Environment_property_volumetric_fog_temporal_reprojection_amount>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_volumetric_fog_temporal_reprojection_amount**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_volumetric_fog_temporal_reprojection_amount**\ (\ )
|
||
|
||
將最後一影格與目前影格混合的量。更高的數值會導致體積霧更平滑,但會使“重影”變得更糟。更低的值會減少重影,但會導致每影格時間抖動變得可見。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_property_volumetric_fog_temporal_reprojection_enabled:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **volumetric_fog_temporal_reprojection_enabled** = ``true`` :ref:`🔗<class_Environment_property_volumetric_fog_temporal_reprojection_enabled>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_volumetric_fog_temporal_reprojection_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_volumetric_fog_temporal_reprojection_enabled**\ (\ )
|
||
|
||
在體積霧中啟用時間重投影。時間重投影將目前影格的體積霧與上一影格的體積霧混合,以平滑鋸齒狀的邊緣。性能成本最小;但是,它會導致移動 :ref:`FogVolume<class_FogVolume>` 和 :ref:`Light3D<class_Light3D>` 時“重影”,並在它們身後留下痕跡。啟用時間重投影時,儘量避免將 :ref:`FogVolume<class_FogVolume>` 或 :ref:`Light3D<class_Light3D>` 移動得太快。短暫的動態光照效果應將 :ref:`Light3D.light_volumetric_fog_energy<class_Light3D_property_light_volumetric_fog_energy>` 設定為 ``0.0`` 以避免重影。
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
方法說明
|
||
--------
|
||
|
||
.. _class_Environment_method_get_glow_level:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Environment_method_get_glow_level>`
|
||
|
||
返回輝光級別 ``idx`` 的強度。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Environment_method_set_glow_level:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Environment_method_set_glow_level>`
|
||
|
||
設定輝光級別 ``idx`` 的強度。大於 ``0.0`` 時啟用該級別。每個級別都依賴於前一個級別。這意味著啟用較高的輝光等級會減慢輝光效果的算繪速度,即使之前的等級沒有啟用。
|
||
|
||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要使用者覆寫才能生效。)`
|
||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||
.. |const| replace:: :abbr:`const (本方法沒有副作用。不會修改該實例的任何成員變數。)`
|
||
.. |vararg| replace:: :abbr:`vararg (本方法除了這裡描述的參數外,還可以接受任意數量的參數。)`
|
||
.. |constructor| replace:: :abbr:`constructor (本方法用於建構一個型別。)`
|
||
.. |static| replace:: :abbr:`static (本方法無需實例即可呼叫,因此可以直接使用類別名稱呼叫。)`
|
||
.. |operator| replace:: :abbr:`operator (本方法描述將本型別作為左運算元時可用的有效運算子。)`
|
||
.. |bitfield| replace:: :abbr:`BitField (此值是由下列旗標組成的位元遮罩整數。)`
|
||
.. |void| replace:: :abbr:`void (無回傳值。)`
|