diff options
Diffstat (limited to 'doc/classes/Light3D.xml')
-rw-r--r-- | doc/classes/Light3D.xml | 70 |
1 files changed, 48 insertions, 22 deletions
diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml index 80ff83ec46..60e20cd97d 100644 --- a/doc/classes/Light3D.xml +++ b/doc/classes/Light3D.xml @@ -11,6 +11,12 @@ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> + <method name="get_correlated_color" qualifiers="const"> + <return type="Color" /> + <description> + Returns the [Color] of an idealized blackbody at the given [member light_temperature]. This value is calculated internally based on the [member light_temperature]. This [Color] is multiplied by [member light_color] before being sent to the [RenderingServer]. + </description> + </method> <method name="get_param" qualifiers="const"> <return type="float" /> <param index="0" name="param" type="int" enum="Light3D.Param" /> @@ -49,6 +55,7 @@ </member> <member name="light_angular_distance" type="float" setter="set_param" getter="get_param" default="0.0"> The light's angular size in degrees. Increasing this will make shadows softer at greater distances. Only available for [DirectionalLight3D]s. For reference, the Sun from the Earth is approximately [code]0.5[/code]. + [b]Note:[/b] [member light_angular_distance] is not affected by [member Node3D.scale] (the light's scale or its parent's scale). </member> <member name="light_bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="Light3D.BakeMode" default="2"> The light's bake mode. This will affect the global illumination techniques that have an effect on the light's rendering. See [enum BakeMode]. @@ -67,6 +74,15 @@ Secondary multiplier used with indirect light (light bounces). Used with [VoxelGI] and SDFGI (see [member Environment.sdfgi_enabled]). [b]Note:[/b] This property is ignored if [member light_energy] is equal to [code]0.0[/code], as the light won't be present at all in the GI shader. </member> + <member name="light_intensity_lumens" type="float" setter="set_param" getter="get_param"> + Used by positional lights ([OmniLight3D] and [SpotLight3D]) when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is [code]true[/code]. Sets the intensity of the light source measured in Lumens. Lumens are a measure of luminous flux, which is the total amount of visible light emitted by a light source per unit of time. + For [SpotLight3D]s, we assume that the area outside the visible cone is surrounded by a perfect light absorbing material. Accordingly, the apparent brightness of the cone area does not change as the cone increases and decreases in size. + A typical household lightbulb can range from around 600 lumens to 1,200 lumens, a candle is about 13 lumens, while a streetlight can be approximately 60,000 lumens. + </member> + <member name="light_intensity_lux" type="float" setter="set_param" getter="get_param"> + Used by [DirectionalLight3D]s when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is [code]true[/code]. Sets the intensity of the light source measured in Lux. Lux is a measure pf luminous flux per unit area, it is equal to one lumen per square metre. Lux is the measure of how much light hits a surface at a given time. + On a clear sunny day a surface in direct sunlight may be approximately 100,000 lux, a typical room in a home may be approximately 50 lux, while the moonlit ground may be approximately 0.1 lux. + </member> <member name="light_negative" type="bool" setter="set_negative" getter="is_negative" default="false"> If [code]true[/code], the light's effect is reversed, darkening areas and casting bright shadows. </member> @@ -76,10 +92,19 @@ </member> <member name="light_size" type="float" setter="set_param" getter="get_param" default="0.0"> The size of the light in Godot units. Only available for [OmniLight3D]s and [SpotLight3D]s. Increasing this value will make the light fade out slower and shadows appear blurrier. This can be used to simulate area lights to an extent. + [b]Note:[/b] [member light_size] is not affected by [member Node3D.scale] (the light's scale or its parent's scale). </member> <member name="light_specular" type="float" setter="set_param" getter="get_param" default="0.5"> The intensity of the specular blob in objects affected by the light. At [code]0[/code], the light becomes a pure diffuse light. When not baking emission, this can be used to avoid unrealistic reflections when placing lights above an emissive surface. </member> + <member name="light_temperature" type="float" setter="set_temperature" getter="get_temperature"> + Sets the color temperature of the light source, measured in Kelvin. This is used to calculate a correlated color temperature which tints the [member light_color]. + The sun on a cloudy day is approximately 6500 Kelvin, on a clear day it is between 5500 to 6000 Kelvin, and on a clear day at sunrise or sunset it ranges to around 1850 Kelvin. + </member> + <member name="light_volumetric_fog_energy" type="float" setter="set_param" getter="get_param" default="1.0"> + Secondary multiplier multiplied with [member light_energy] then used with the [Environment]'s volumetric fog (if enabled). If set to [code]0.0[/code], computing volumetric fog will be skipped for this light, which can improve performance for large amounts of lights when volumetric fog is enabled. + [b]Note:[/b] To prevent short-lived dynamic light effects from poorly interacting with volumetric fog, lights used in those effects should have [member light_volumetric_fog_energy] set to [code]0.0[/code] unless [member Environment.volumetric_fog_temporal_reprojection_enabled] is disabled (or unless the reprojection amount is significantly lowered). + </member> <member name="shadow_bias" type="float" setter="set_param" getter="get_param" default="0.1"> Used to adjust shadow appearance. Too small a value results in self-shadowing ("shadow acne"), while too large a value causes shadows to separate from casters ("peter-panning"). Adjust as needed. </member> @@ -89,8 +114,6 @@ <member name="shadow_enabled" type="bool" setter="set_shadow" getter="has_shadow" default="false"> If [code]true[/code], the light will cast real-time shadows. This has a significant performance cost. Only enable shadow rendering when it makes a noticeable difference in the scene's appearance, and consider using [member distance_fade_enabled] to hide the light when far away from the [Camera3D]. </member> - <member name="shadow_fog_fade" type="float" setter="set_param" getter="get_param" default="0.1"> - </member> <member name="shadow_normal_bias" type="float" setter="set_param" getter="get_param" default="1.0"> Offsets the lookup into the shadow map by the object's normal. This can be used to reduce self-shadowing artifacts without using [member shadow_bias]. In practice, this value should be tweaked along with [member shadow_bias] to reduce artifacts as much as possible. </member> @@ -110,61 +133,64 @@ <constant name="PARAM_INDIRECT_ENERGY" value="1" enum="Param"> Constant for accessing [member light_indirect_energy]. </constant> - <constant name="PARAM_SPECULAR" value="2" enum="Param"> + <constant name="PARAM_VOLUMETRIC_FOG_ENERGY" value="2" enum="Param"> + Constant for accessing [member light_volumetric_fog_energy]. + </constant> + <constant name="PARAM_SPECULAR" value="3" enum="Param"> Constant for accessing [member light_specular]. </constant> - <constant name="PARAM_RANGE" value="3" enum="Param"> + <constant name="PARAM_RANGE" value="4" enum="Param"> Constant for accessing [member OmniLight3D.omni_range] or [member SpotLight3D.spot_range]. </constant> - <constant name="PARAM_SIZE" value="4" enum="Param"> + <constant name="PARAM_SIZE" value="5" enum="Param"> Constant for accessing [member light_size]. </constant> - <constant name="PARAM_ATTENUATION" value="5" enum="Param"> + <constant name="PARAM_ATTENUATION" value="6" enum="Param"> Constant for accessing [member OmniLight3D.omni_attenuation] or [member SpotLight3D.spot_attenuation]. </constant> - <constant name="PARAM_SPOT_ANGLE" value="6" enum="Param"> + <constant name="PARAM_SPOT_ANGLE" value="7" enum="Param"> Constant for accessing [member SpotLight3D.spot_angle]. </constant> - <constant name="PARAM_SPOT_ATTENUATION" value="7" enum="Param"> + <constant name="PARAM_SPOT_ATTENUATION" value="8" enum="Param"> Constant for accessing [member SpotLight3D.spot_angle_attenuation]. </constant> - <constant name="PARAM_SHADOW_MAX_DISTANCE" value="8" enum="Param"> + <constant name="PARAM_SHADOW_MAX_DISTANCE" value="9" enum="Param"> Constant for accessing [member DirectionalLight3D.directional_shadow_max_distance]. </constant> - <constant name="PARAM_SHADOW_SPLIT_1_OFFSET" value="9" enum="Param"> + <constant name="PARAM_SHADOW_SPLIT_1_OFFSET" value="10" enum="Param"> Constant for accessing [member DirectionalLight3D.directional_shadow_split_1]. </constant> - <constant name="PARAM_SHADOW_SPLIT_2_OFFSET" value="10" enum="Param"> + <constant name="PARAM_SHADOW_SPLIT_2_OFFSET" value="11" enum="Param"> Constant for accessing [member DirectionalLight3D.directional_shadow_split_2]. </constant> - <constant name="PARAM_SHADOW_SPLIT_3_OFFSET" value="11" enum="Param"> + <constant name="PARAM_SHADOW_SPLIT_3_OFFSET" value="12" enum="Param"> Constant for accessing [member DirectionalLight3D.directional_shadow_split_3]. </constant> - <constant name="PARAM_SHADOW_FADE_START" value="12" enum="Param"> + <constant name="PARAM_SHADOW_FADE_START" value="13" enum="Param"> Constant for accessing [member DirectionalLight3D.directional_shadow_fade_start]. </constant> - <constant name="PARAM_SHADOW_NORMAL_BIAS" value="13" enum="Param"> + <constant name="PARAM_SHADOW_NORMAL_BIAS" value="14" enum="Param"> Constant for accessing [member shadow_normal_bias]. </constant> - <constant name="PARAM_SHADOW_BIAS" value="14" enum="Param"> + <constant name="PARAM_SHADOW_BIAS" value="15" enum="Param"> Constant for accessing [member shadow_bias]. </constant> - <constant name="PARAM_SHADOW_PANCAKE_SIZE" value="15" enum="Param"> + <constant name="PARAM_SHADOW_PANCAKE_SIZE" value="16" enum="Param"> Constant for accessing [member DirectionalLight3D.directional_shadow_pancake_size]. </constant> - <constant name="PARAM_SHADOW_OPACITY" value="16" enum="Param"> + <constant name="PARAM_SHADOW_OPACITY" value="17" enum="Param"> Constant for accessing [member shadow_opacity]. </constant> - <constant name="PARAM_SHADOW_BLUR" value="17" enum="Param"> + <constant name="PARAM_SHADOW_BLUR" value="18" enum="Param"> Constant for accessing [member shadow_blur]. </constant> - <constant name="PARAM_SHADOW_VOLUMETRIC_FOG_FADE" value="18" enum="Param"> - Constant for accessing [member shadow_fog_fade]. - </constant> <constant name="PARAM_TRANSMITTANCE_BIAS" value="19" enum="Param"> Constant for accessing [member shadow_transmittance_bias]. </constant> - <constant name="PARAM_MAX" value="20" enum="Param"> + <constant name="PARAM_INTENSITY" value="20" enum="Param"> + Constant for accessing [member light_intensity_lumens] and [member light_intensity_lux]. Only used when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is [code]true[/code]. + </constant> + <constant name="PARAM_MAX" value="21" enum="Param"> Represents the size of the [enum Param] enum. </constant> <constant name="BAKE_DISABLED" value="0" enum="BakeMode"> |