EnvironmentΒΆ
Inherits: Resource < RefCounted < Object
Resource for environment nodes (like WorldEnvironment) that define multiple rendering options.
DescriptionΒΆ
Resource for environment nodes (like WorldEnvironment) that define multiple environment operations (such as background Sky or 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
Glow
Tonemap (Auto Exposure)
Adjustments
TutorialsΒΆ
PropertiesΒΆ
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
MethodsΒΆ
get_glow_level ( int idx ) const |
|
void |
set_glow_level ( int idx, float intensity ) |
EnumerationsΒΆ
enum BGMode:
BG_CLEAR_COLOR = 0 --- Clears the background using the clear color defined in ProjectSettings.rendering/environment/defaults/default_clear_color.
BG_COLOR = 1 --- Clears the background using a custom clear color.
BG_SKY = 2 --- Displays a user-defined sky in the background.
BG_CANVAS = 3 --- Displays a CanvasLayer in the background.
BG_KEEP = 4 --- Keeps on screen every pixel drawn in the background. This is the fastest background mode, but it can only be safely used in fully-interior scenes (no visible sky or sky reflections). If enabled in a scene where the background is visible, "ghost trail" artifacts will be visible when moving the camera.
BG_CAMERA_FEED = 5 --- Displays a camera feed in the background.
BG_MAX = 6 --- Represents the size of the BGMode enum.
enum AmbientSource:
AMBIENT_SOURCE_BG = 0 --- Gather ambient light from whichever source is specified as the background.
AMBIENT_SOURCE_DISABLED = 1 --- Disable ambient light.
AMBIENT_SOURCE_COLOR = 2 --- Specify a specific Color for ambient light.
AMBIENT_SOURCE_SKY = 3 --- Gather ambient light from the Sky regardless of what the background is.
enum ReflectionSource:
REFLECTION_SOURCE_BG = 0 --- Use the background for reflections.
REFLECTION_SOURCE_DISABLED = 1 --- Disable reflections.
REFLECTION_SOURCE_SKY = 2 --- Use the Sky for reflections regardless of what the background is.
enum ToneMapper:
TONE_MAPPER_LINEAR = 0 --- Linear tonemapper operator. Reads the linear data and passes it on unmodified.
TONE_MAPPER_REINHARDT = 1 --- Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula:
color = color / (1 + color)
.TONE_MAPPER_FILMIC = 2 --- Filmic tonemapper operator.
TONE_MAPPER_ACES = 3 --- Academy Color Encoding System tonemapper operator.
enum GlowBlendMode:
GLOW_BLEND_MODE_ADDITIVE = 0 --- Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources.
GLOW_BLEND_MODE_SCREEN = 1 --- Screen glow blending mode. Increases brightness, used frequently with bloom.
GLOW_BLEND_MODE_SOFTLIGHT = 2 --- Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom).
GLOW_BLEND_MODE_REPLACE = 3 --- Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness.
GLOW_BLEND_MODE_MIX = 4 --- Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect.
enum SDFGIYScale:
SDFGI_Y_SCALE_50_PERCENT = 0
SDFGI_Y_SCALE_75_PERCENT = 1
SDFGI_Y_SCALE_100_PERCENT = 2
Property DescriptionsΒΆ
float adjustment_brightness
Default |
|
Setter |
set_adjustment_brightness(value) |
Getter |
get_adjustment_brightness() |
The global brightness value of the rendered scene. Effective only if adjustment_enabled
is true
.
Texture adjustment_color_correction
Setter |
set_adjustment_color_correction(value) |
Getter |
get_adjustment_color_correction() |
The Texture2D or Texture3D lookup table (LUT) to use for the built-in post-process color grading. Can use a GradientTexture1D for a 1-dimensional LUT, or a Texture3D for a more complex LUT. Effective only if adjustment_enabled
is true
.
float adjustment_contrast
Default |
|
Setter |
set_adjustment_contrast(value) |
Getter |
get_adjustment_contrast() |
The global contrast value of the rendered scene (default value is 1). Effective only if adjustment_enabled
is true
.
bool adjustment_enabled
Default |
|
Setter |
set_adjustment_enabled(value) |
Getter |
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.
float adjustment_saturation
Default |
|
Setter |
set_adjustment_saturation(value) |
Getter |
get_adjustment_saturation() |
The global color saturation value of the rendered scene (default value is 1). Effective only if adjustment_enabled
is true
.
Color ambient_light_color
Default |
|
Setter |
set_ambient_light_color(value) |
Getter |
get_ambient_light_color() |
The ambient light's Color.
float ambient_light_energy
Default |
|
Setter |
set_ambient_light_energy(value) |
Getter |
get_ambient_light_energy() |
The ambient light's energy. The higher the value, the stronger the light.
float ambient_light_sky_contribution
Default |
|
Setter |
set_ambient_light_sky_contribution(value) |
Getter |
get_ambient_light_sky_contribution() |
Defines the amount of light that the sky brings on the scene. A value of 0.0
means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of 1.0
means that all the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene.
Note: ambient_light_sky_contribution is internally clamped between 0.0
and 1.0
(inclusive).
AmbientSource ambient_light_source
Default |
|
Setter |
set_ambient_source(value) |
Getter |
get_ambient_source() |
bool auto_exposure_enabled
Default |
|
Setter |
set_tonemap_auto_exposure_enabled(value) |
Getter |
is_tonemap_auto_exposure_enabled() |
If true
, enables the tonemapping auto exposure mode of the scene renderer. If true
, the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light.
float auto_exposure_max_luma
Default |
|
Setter |
set_tonemap_auto_exposure_max(value) |
Getter |
get_tonemap_auto_exposure_max() |
The maximum luminance value for the auto exposure.
float auto_exposure_min_luma
Default |
|
Setter |
set_tonemap_auto_exposure_min(value) |
Getter |
get_tonemap_auto_exposure_min() |
The minimum luminance value for the auto exposure.
float auto_exposure_scale
Default |
|
Setter |
set_tonemap_auto_exposure_grey(value) |
Getter |
get_tonemap_auto_exposure_grey() |
The scale of the auto exposure effect. Affects the intensity of auto exposure.
float auto_exposure_speed
Default |
|
Setter |
set_tonemap_auto_exposure_speed(value) |
Getter |
get_tonemap_auto_exposure_speed() |
The speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure.
int background_camera_feed_id
Default |
|
Setter |
set_camera_feed_id(value) |
Getter |
get_camera_feed_id() |
The ID of the camera feed to show in the background.
int background_canvas_max_layer
Default |
|
Setter |
set_canvas_max_layer(value) |
Getter |
get_canvas_max_layer() |
The maximum layer ID to display. Only effective when using the BG_CANVAS background mode.
Color background_color
Default |
|
Setter |
set_bg_color(value) |
Getter |
get_bg_color() |
The Color displayed for clear areas of the scene. Only effective when using the BG_COLOR background mode.
float background_energy
Default |
|
Setter |
set_bg_energy(value) |
Getter |
get_bg_energy() |
The power of the light emitted by the background.
BGMode background_mode
Default |
|
Setter |
set_background(value) |
Getter |
get_background() |
The background mode. See BGMode for possible values.
float fog_aerial_perspective
Default |
|
Setter |
set_fog_aerial_perspective(value) |
Getter |
get_fog_aerial_perspective() |
Blend factor between the fog's color and the color of the background Sky. Must have background_mode set to BG_SKY.
This is useful to simulate 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 Sky. If set to 0.0
, aerial perspective is disabled.
float fog_density
Default |
|
Setter |
set_fog_density(value) |
Getter |
get_fog_density() |
bool fog_enabled
Default |
|
Setter |
set_fog_enabled(value) |
Getter |
is_fog_enabled() |
If true
, fog effects are enabled.
float fog_height
Default |
|
Setter |
set_fog_height(value) |
Getter |
get_fog_height() |
The height at which the height fog effect begins.
float fog_height_density
Default |
|
Setter |
set_fog_height_density(value) |
Getter |
get_fog_height_density() |
The density used to increase fog as height decreases. To make fog increase as height increases, use a negative value.
Color fog_light_color
Default |
|
Setter |
set_fog_light_color(value) |
Getter |
get_fog_light_color() |
float fog_light_energy
Default |
|
Setter |
set_fog_light_energy(value) |
Getter |
get_fog_light_energy() |
float fog_sun_scatter
Default |
|
Setter |
set_fog_sun_scatter(value) |
Getter |
get_fog_sun_scatter() |
GlowBlendMode glow_blend_mode
Default |
|
Setter |
set_glow_blend_mode(value) |
Getter |
get_glow_blend_mode() |
The glow blending mode.
float glow_bloom
Default |
|
Setter |
set_glow_bloom(value) |
Getter |
get_glow_bloom() |
The bloom's intensity. If set to a value higher than 0
, this will make glow visible in areas darker than the glow_hdr_threshold.
bool glow_enabled
Default |
|
Setter |
set_glow_enabled(value) |
Getter |
is_glow_enabled() |
If true
, the glow effect is enabled.
float glow_hdr_luminance_cap
Default |
|
Setter |
set_glow_hdr_luminance_cap(value) |
Getter |
get_glow_hdr_luminance_cap() |
The higher threshold of the HDR glow. Areas brighter than this threshold will be clamped for the purposes of the glow effect.
float glow_hdr_scale
Default |
|
Setter |
set_glow_hdr_bleed_scale(value) |
Getter |
get_glow_hdr_bleed_scale() |
The bleed scale of the HDR glow.
float glow_hdr_threshold
Default |
|
Setter |
set_glow_hdr_bleed_threshold(value) |
Getter |
get_glow_hdr_bleed_threshold() |
The lower threshold of the HDR glow. When using the OpenGL renderer (which doesn't support HDR), this needs to be below 1.0
for glow to be visible. A value of 0.9
works well in this case.
float glow_intensity
Default |
|
Setter |
set_glow_intensity(value) |
Getter |
get_glow_intensity() |
The overall brightness multiplier of the glow effect. When using the OpenGL renderer, this should be increased to 1.5 to compensate for the lack of HDR rendering.
float glow_levels/1
Default |
|
Setter |
set_glow_level(value) |
Getter |
get_glow_level() |
The intensity of the 1st level of glow. This is the most "local" level (least blurry).
float glow_levels/2
Default |
|
Setter |
set_glow_level(value) |
Getter |
get_glow_level() |
The intensity of the 2nd level of glow.
float glow_levels/3
Default |
|
Setter |
set_glow_level(value) |
Getter |
get_glow_level() |
The intensity of the 3rd level of glow.
float glow_levels/4
Default |
|
Setter |
set_glow_level(value) |
Getter |
get_glow_level() |
The intensity of the 4th level of glow.
float glow_levels/5
Default |
|
Setter |
set_glow_level(value) |
Getter |
get_glow_level() |
The intensity of the 5th level of glow.
float glow_levels/6
Default |
|
Setter |
set_glow_level(value) |
Getter |
get_glow_level() |
The intensity of the 6th level of glow.
float glow_levels/7
Default |
|
Setter |
set_glow_level(value) |
Getter |
get_glow_level() |
The intensity of the 7th level of glow. This is the most "global" level (blurriest).
Texture glow_map
Setter |
set_glow_map(value) |
Getter |
get_glow_map() |
The texture that should be used as a glow map to multiply the resulting glow color according to 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).
float glow_map_strength
Default |
|
Setter |
set_glow_map_strength(value) |
Getter |
get_glow_map_strength() |
How strong of an impact the glow_map should have on the overall glow effect. A strength of 0.0
means the glow map has no effect on the overall glow effect. A strength of 1.0
means the glow has a full effect on the overall glow effect (and can turn off glow entirely in specific areas of the screen if the glow map has black areas).
float glow_mix
Default |
|
Setter |
set_glow_mix(value) |
Getter |
get_glow_mix() |
bool glow_normalized
Default |
|
Setter |
set_glow_normalized(value) |
Getter |
is_glow_normalized() |
If true
, glow levels will be normalized so that summed together their intensities equal 1.0
.
float glow_strength
Default |
|
Setter |
set_glow_strength(value) |
Getter |
get_glow_strength() |
The strength of the glow effect. This applies as the glow is blurred across the screen and increases the distance and intensity of the blur. When using the OpenGL renderer, this should be increased to 1.3 to compensate for the lack of HDR rendering.
ReflectionSource reflected_light_source
Default |
|
Setter |
set_reflection_source(value) |
Getter |
get_reflection_source() |
float sdfgi_bounce_feedback
Default |
|
Setter |
set_sdfgi_bounce_feedback(value) |
Getter |
get_sdfgi_bounce_feedback() |
float sdfgi_cascade0_distance
Default |
|
Setter |
set_sdfgi_cascade0_distance(value) |
Getter |
get_sdfgi_cascade0_distance() |
int sdfgi_cascades
Default |
|
Setter |
set_sdfgi_cascades(value) |
Getter |
get_sdfgi_cascades() |
The number of cascades to use for SDFGI (between 1 and 8). A higher number of cascades allows displaying SDFGI further away while preserving detail up close, at the cost of performance. When using SDFGI on small-scale levels, sdfgi_cascades can often be decreased between 1
and 4
to improve performance.
bool sdfgi_enabled
Default |
|
Setter |
set_sdfgi_enabled(value) |
Getter |
is_sdfgi_enabled() |
If true
, enables signed distance field global illumination for meshes that have their GeometryInstance3D.gi_mode set to GeometryInstance3D.GI_MODE_STATIC. SDFGI is a real-time global illumination technique that works well with procedurally generated and user-built levels, including in situations where geometry is created during gameplay. The signed distance field is automatically generated around the camera as it moves. Dynamic lights are supported, but dynamic occluders and emissive surfaces are not.
Performance: SDFGI is relatively demanding on the GPU and is not suited to low-end hardware such as integrated graphics (consider LightmapGI instead). To improve SDFGI performance, enable ProjectSettings.rendering/global_illumination/gi/use_half_resolution in the Project Settings.
Note: Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh.
float sdfgi_energy
Default |
|
Setter |
set_sdfgi_energy(value) |
Getter |
get_sdfgi_energy() |
float sdfgi_max_distance
Default |
|
Setter |
set_sdfgi_max_distance(value) |
Getter |
get_sdfgi_max_distance() |
float sdfgi_min_cell_size
Default |
|
Setter |
set_sdfgi_min_cell_size(value) |
Getter |
get_sdfgi_min_cell_size() |
float sdfgi_normal_bias
Default |
|
Setter |
set_sdfgi_normal_bias(value) |
Getter |
get_sdfgi_normal_bias() |
float sdfgi_probe_bias
Default |
|
Setter |
set_sdfgi_probe_bias(value) |
Getter |
get_sdfgi_probe_bias() |
bool sdfgi_read_sky_light
Default |
|
Setter |
set_sdfgi_read_sky_light(value) |
Getter |
is_sdfgi_reading_sky_light() |
bool sdfgi_use_occlusion
Default |
|
Setter |
set_sdfgi_use_occlusion(value) |
Getter |
is_sdfgi_using_occlusion() |
SDFGIYScale sdfgi_y_scale
Default |
|
Setter |
set_sdfgi_y_scale(value) |
Getter |
get_sdfgi_y_scale() |
Sky sky
Setter |
set_sky(value) |
Getter |
get_sky() |
The Sky resource used for this Environment
.
float sky_custom_fov
Default |
|
Setter |
set_sky_custom_fov(value) |
Getter |
get_sky_custom_fov() |
Vector3 sky_rotation
Default |
|
Setter |
set_sky_rotation(value) |
Getter |
get_sky_rotation() |
float ss_reflections_depth_tolerance
Default |
|
Setter |
set_ssr_depth_tolerance(value) |
Getter |
get_ssr_depth_tolerance() |
The depth tolerance for screen-space reflections.
bool ss_reflections_enabled
Default |
|
Setter |
set_ssr_enabled(value) |
Getter |
is_ssr_enabled() |
If true
, screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from VoxelGIs or ReflectionProbes, but are slower and can't reflect surfaces occluded by others.
float ss_reflections_fade_in
Default |
|
Setter |
set_ssr_fade_in(value) |
Getter |
get_ssr_fade_in() |
The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection). Only positive values are valid (negative values will be clamped to 0.0
).
float ss_reflections_fade_out
Default |
|
Setter |
set_ssr_fade_out(value) |
Getter |
get_ssr_fade_out() |
The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the "global" reflection. Only positive values are valid (negative values will be clamped to 0.0
).
int ss_reflections_max_steps
Default |
|
Setter |
set_ssr_max_steps(value) |
Getter |
get_ssr_max_steps() |
The maximum number of steps for screen-space reflections. Higher values are slower.
float ssao_ao_channel_affect
Default |
|
Setter |
set_ssao_ao_channel_affect(value) |
Getter |
get_ssao_ao_channel_affect() |
The screen-space ambient occlusion intensity on materials that have an AO texture defined. Values higher than 0
will make the SSAO effect visible in areas darkened by AO textures.
float ssao_detail
Default |
|
Setter |
set_ssao_detail(value) |
Getter |
get_ssao_detail() |
Sets the strength of the additional level of detail for the screen-space ambient occlusion effect. A high value makes the detail pass more prominent, but it may contribute to aliasing in your final image.
bool ssao_enabled
Default |
|
Setter |
set_ssao_enabled(value) |
Getter |
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.
float ssao_horizon
Default |
|
Setter |
set_ssao_horizon(value) |
Getter |
get_ssao_horizon() |
The threshold for considering whether a given point on a surface is occluded or not represented as an angle from the horizon mapped into the 0.0-1.0
range. A value of 1.0
results in no occlusion.
float ssao_intensity
Default |
|
Setter |
set_ssao_intensity(value) |
Getter |
get_ssao_intensity() |
The primary screen-space ambient occlusion intensity. Acts as a multiplier for the screen-space ambient occlusion effect. A higher value results in darker occlusion.
float ssao_light_affect
Default |
|
Setter |
set_ssao_direct_light_affect(value) |
Getter |
get_ssao_direct_light_affect() |
The screen-space ambient occlusion intensity in direct light. In real life, ambient occlusion only applies to indirect light, which means its effects can't be seen in direct light. Values higher than 0
will make the SSAO effect visible in direct light.
float ssao_power
Default |
|
Setter |
set_ssao_power(value) |
Getter |
get_ssao_power() |
The distribution of occlusion. A higher value results in darker occlusion, similar to ssao_intensity, but with a sharper falloff.
float ssao_radius
Default |
|
Setter |
set_ssao_radius(value) |
Getter |
get_ssao_radius() |
The distance at which objects can occlude each other when calculating screen-space ambient occlusion. Higher values will result in occlusion over a greater distance at the cost of performance and quality.
float ssao_sharpness
Default |
|
Setter |
set_ssao_sharpness(value) |
Getter |
get_ssao_sharpness() |
The amount that the screen-space ambient occlusion effect is allowed to blur over the edges of objects. Setting too high will result in aliasing around the edges of objects. Setting too low will make object edges appear blurry.
bool ssil_enabled
Default |
|
Setter |
set_ssil_enabled(value) |
Getter |
is_ssil_enabled() |
If true
, the screen-space indirect lighting effect is enabled. Screen space indirect lighting is a form of indirect lighting that allows diffuse light to bounce between nearby objects. Screen-space indirect lighting works very similarly to screen-space ambient occlusion, in that it only affects a limited range. It is intended to be used along with a form of proper global illumination like SDFGI or VoxelGI. Screen-space indirect lighting is not affected by individual light's Light3D.light_indirect_energy.
float ssil_intensity
Default |
|
Setter |
set_ssil_intensity(value) |
Getter |
get_ssil_intensity() |
The brightness multiplier for the screen-space indirect lighting effect. A higher value will result in brighter light.
float ssil_normal_rejection
Default |
|
Setter |
set_ssil_normal_rejection(value) |
Getter |
get_ssil_normal_rejection() |
Amount of normal rejection used when calculating screen-space indirect lighting. Normal rejection uses the normal of a given sample point to reject samples that are facing away from the current pixel. Normal rejection is necessary to avoid light leaking when only one side of an object is illuminated. However, normal rejection can be disabled if light leaking is desirable, such as when the scene mostly contains emissive objects that emit light from faces that cannot be seen from the camera.
float ssil_radius
Default |
|
Setter |
set_ssil_radius(value) |
Getter |
get_ssil_radius() |
The distance that bounced lighting can travel when using the screen space indirect lighting effect. A larger value will result in light bouncing further in a scene, but may result in under-sampling artifacts which look like long spikes surrounding light sources.
float ssil_sharpness
Default |
|
Setter |
set_ssil_sharpness(value) |
Getter |
get_ssil_sharpness() |
The amount that the screen-space indirect lighting effect is allowed to blur over the edges of objects. Setting too high will result in aliasing around the edges of objects. Setting too low will make object edges appear blurry.
float tonemap_exposure
Default |
|
Setter |
set_tonemap_exposure(value) |
Getter |
get_tonemap_exposure() |
The default exposure used for tonemapping.
ToneMapper tonemap_mode
Default |
|
Setter |
set_tonemapper(value) |
Getter |
get_tonemapper() |
The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on a LDR display. (Godot doesn't support rendering on HDR displays yet.)
float tonemap_white
Default |
|
Setter |
set_tonemap_white(value) |
Getter |
get_tonemap_white() |
The white reference value for tonemapping. Only effective if the tonemap_mode isn't set to TONE_MAPPER_LINEAR.
Color volumetric_fog_albedo
Default |
|
Setter |
set_volumetric_fog_albedo(value) |
Getter |
get_volumetric_fog_albedo() |
The Color of the volumetric fog when interacting with lights. Mist and fog have an albedo close to Color(1, 1, 1, 1)
while smoke has a darker albedo.
float volumetric_fog_ambient_inject
Default |
|
Setter |
set_volumetric_fog_ambient_inject(value) |
Getter |
get_volumetric_fog_ambient_inject() |
Scales the strength of ambient light used in the volumetric fog. A value of 0
means that ambient light will not impact the volumetric fog.
float volumetric_fog_anisotropy
Default |
|
Setter |
set_volumetric_fog_anisotropy(value) |
Getter |
get_volumetric_fog_anisotropy() |
The direction of scattered light as it goes through the volumetric fog. A value close 1
means almost all light is scattered forward. A value close to 0
means light is scattered equally in all directions. A value close to -1
means light is scattered mostly backward. Fog and mist scatter light slightly forward, while smoke scatters light equally in all directions.
float volumetric_fog_density
Default |
|
Setter |
set_volumetric_fog_density(value) |
Getter |
get_volumetric_fog_density() |
The base density of the volumetric fog. Set this to the lowest density you want to have globally.
float volumetric_fog_detail_spread
Default |
|
Setter |
set_volumetric_fog_detail_spread(value) |
Getter |
get_volumetric_fog_detail_spread() |
The distribution of size down the length of the froxel buffer. A higher value compresses the froxels closer to the camera and places more detail closer to the camera.
Color volumetric_fog_emission
Default |
|
Setter |
set_volumetric_fog_emission(value) |
Getter |
get_volumetric_fog_emission() |
The emitted light from the volumetric fog. Even with emission, volumetric fog will not cast light onto other surfaces. Emission is useful to establish an ambient color. As the volumetric fog effect uses single-scattering only, fog tends to need a little bit of emission to soften the harsh shadows.
float volumetric_fog_emission_energy
Default |
|
Setter |
set_volumetric_fog_emission_energy(value) |
Getter |
get_volumetric_fog_emission_energy() |
The brightness of the emitted light from the volumetric fog.
bool volumetric_fog_enabled
Default |
|
Setter |
set_volumetric_fog_enabled(value) |
Getter |
is_volumetric_fog_enabled() |
Enables the volumetric fog effect. Volumetric fog uses a screen-aligned froxel buffer to calculate accurate volumetric scattering in the short to medium range. Volumetric fog interacts with FogVolumes and lights to calculate localized and global fog. Volumetric fog uses a PBR single-scattering model based on extinction, scattering, and emission which it exposes to users as density, albedo, and emission.
float volumetric_fog_gi_inject
Default |
|
Setter |
set_volumetric_fog_gi_inject(value) |
Getter |
get_volumetric_fog_gi_inject() |
Scales the strength of Global Illumination used in the volumetric fog. A value of 0
means that Global Illumination will not impact the volumetric fog.
float volumetric_fog_length
Default |
|
Setter |
set_volumetric_fog_length(value) |
Getter |
get_volumetric_fog_length() |
The distance over which the volumetric fog is computed. Increase to compute fog over a greater range, decrease to add more detail when a long range is not needed. For best quality fog, keep this as low as possible.
float volumetric_fog_temporal_reprojection_amount
Default |
|
Setter |
set_volumetric_fog_temporal_reprojection_amount(value) |
Getter |
get_volumetric_fog_temporal_reprojection_amount() |
The amount by which to blend the last frame with the current frame. A higher number results in smoother volumetric fog, but makes "ghosting" much worse. A lower value reduces ghosting but can result in the per-frame temporal jitter becoming visible.
bool volumetric_fog_temporal_reprojection_enabled
Default |
|
Setter |
set_volumetric_fog_temporal_reprojection_enabled(value) |
Getter |
is_volumetric_fog_temporal_reprojection_enabled() |
Enables temporal reprojection in the volumetric fog. Temporal reprojection blends the current frame's volumetric fog with the last frame's volumetric fog to smooth out jagged edges. The performance cost is minimal, however it does lead to moving FogVolumes and Light3Ds "ghosting" and leaving a trail behind them. When temporal reprojection is enabled, try to avoid moving FogVolumes or Light3Ds too fast.
Method DescriptionsΒΆ
Returns the intensity of the glow level idx
.
Sets the intensity of the glow level idx
. A value above 0.0
enables the level. Each level relies on the previous level. This means that enabling higher glow levels will slow down the glow effect rendering, even if previous levels aren't enabled.