Struct Environment

Resource for environment nodes (like WorldEnvironment) that define multiple rendering options.

struct Environment ;

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

Properties

NameTypeDescription
adjustmentBrightness[get, set] doubleThe global brightness value of the rendered scene. Effective only if adjustment_enabled is true.
adjustmentColorCorrection[get, set] TextureApplies the provided Texture resource to affect the global color aspect of the rendered scene. Effective only if adjustment_enabled is true.
adjustmentContrast[get, set] doubleThe global contrast value of the rendered scene (default value is 1). Effective only if adjustment_enabled is true.
adjustmentEnabled[get, set] boolIf true, enables the adjustment_* properties provided by this resource. If false, modifications to the adjustment_* properties will have no effect on the rendered scene.
adjustmentSaturation[get, set] doubleThe global color saturation value of the rendered scene (default value is 1). Effective only if adjustment_enabled is true.
ambientLightColor[get, set] ColorThe ambient light's Color.
ambientLightEnergy[get, set] doubleThe ambient light's energy. The higher the value, the stronger the light.
ambientLightSkyContribution[get, set] doubleDefines the amount of light that the sky brings on the scene. A value of 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 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.
autoExposureEnabled[get, set] boolIf 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.
autoExposureMaxLuma[get, set] doubleThe maximum luminance value for the auto exposure.
autoExposureMinLuma[get, set] doubleThe minimum luminance value for the auto exposure.
autoExposureScale[get, set] doubleThe scale of the auto exposure effect. Affects the intensity of auto exposure.
autoExposureSpeed[get, set] doubleThe speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure.
backgroundCameraFeedId[get, set] longThe ID of the camera feed to show in the background.
backgroundCanvasMaxLayer[get, set] longThe maximum layer ID to display. Only effective when using the constant BG_CANVAS background mode.
backgroundColor[get, set] ColorThe Color displayed for clear areas of the scene. Only effective when using the constant BG_COLOR or constant BG_COLOR_SKY background modes).
backgroundEnergy[get, set] doubleThe power of the light emitted by the background.
backgroundMode[get, set] Environment.BGModeThe background mode. See bgmode for possible values.
backgroundSky[get, set] SkyThe Sky resource defined as background.
backgroundSkyCustomFov[get, set] doubleThe Sky resource's custom field of view.
backgroundSkyOrientation[get, set] BasisThe Sky resource's rotation expressed as a Basis.
backgroundSkyRotation[get, set] Vector3The Sky resource's rotation expressed as Euler angles in radians.
backgroundSkyRotationDegrees[get, set] Vector3The Sky resource's rotation expressed as Euler angles in degrees.
dofBlurFarAmount[get, set] doubleThe amount of far blur for the depth-of-field effect.
dofBlurFarDistance[get, set] doubleThe distance from the camera where the far blur effect affects the rendering.
dofBlurFarEnabled[get, set] boolIf true, enables the depth-of-field far blur effect.
dofBlurFarQuality[get, set] Environment.DOFBlurQualityThe depth-of-field far blur's quality. Higher values can mitigate the visible banding effect seen at higher strengths, but are much slower.
dofBlurFarTransition[get, set] doubleThe length of the transition between the no-blur area and far blur.
dofBlurNearAmount[get, set] doubleThe amount of near blur for the depth-of-field effect.
dofBlurNearDistance[get, set] doubleDistance from the camera where the near blur effect affects the rendering.
dofBlurNearEnabled[get, set] boolIf true, enables the depth-of-field near blur effect.
dofBlurNearQuality[get, set] Environment.DOFBlurQualityThe depth-of-field near blur's quality. Higher values can mitigate the visible banding effect seen at higher strengths, but are much slower.
dofBlurNearTransition[get, set] doubleThe length of the transition between the near blur and no-blur area.
fogColor[get, set] ColorThe fog's Color.
fogDepthBegin[get, set] doubleThe fog's depth starting distance from the camera.
fogDepthCurve[get, set] doubleThe fog depth's intensity curve. A number of presets are available in the Inspector by right-clicking the curve.
fogDepthEnabled[get, set] boolIf true, the depth fog effect is enabled. When enabled, fog will appear in the distance (relative to the camera).
fogDepthEnd[get, set] doubleThe fog's depth end distance from the camera. If this value is set to 0, it will be equal to the current camera's Camera.far value.
fogEnabled[get, set] boolIf true, fog effects are enabled. fogHeightEnabled and/or fogDepthEnabled must be set to true to actually display fog.
fogHeightCurve[get, set] doubleThe height fog's intensity. A number of presets are available in the Inspector by right-clicking the curve.
fogHeightEnabled[get, set] boolIf true, the height fog effect is enabled. When enabled, fog will appear in a defined height range, regardless of the distance from the camera. This can be used to simulate "deep water" effects with a lower performance cost compared to a dedicated shader.
fogHeightMax[get, set] doubleThe Y coordinate where the height fog will be the most intense. If this value is greater than fogHeightMin, fog will be displayed from bottom to top. Otherwise, it will be displayed from top to bottom.
fogHeightMin[get, set] doubleThe Y coordinate where the height fog will be the least intense. If this value is greater than fogHeightMax, fog will be displayed from top to bottom. Otherwise, it will be displayed from bottom to top.
fogSunAmount[get, set] doubleThe intensity of the depth fog color transition when looking towards the sun. The sun's direction is determined automatically using the DirectionalLight node in the scene.
fogSunColor[get, set] ColorThe depth fog's Color when looking towards the sun.
fogTransmitCurve[get, set] doubleThe intensity of the fog light transmittance effect. Amount of light that the fog transmits.
fogTransmitEnabled[get, set] boolEnables fog's light transmission effect. If true, light will be more visible in the fog to simulate light scattering as in real life.
glowBicubicUpscale[get, set] boolSmooths out the blockiness created by sampling higher levels, at the cost of performance. Note: When using the GLES2 renderer, this is only available if the GPU supports the GL_EXT_gpu_shader4 extension.
glowBlendMode[get, set] Environment.GlowBlendModeThe glow blending mode.
glowBloom[get, set] doubleThe bloom's intensity. If set to a value higher than 0, this will make glow visible in areas darker than the glowHdrThreshold.
glowEnabled[get, set] boolIf true, the glow effect is enabled.
glowHdrLuminanceCap[get, set] doubleThe higher threshold of the HDR glow. Areas brighter than this threshold will be clamped for the purposes of the glow effect.
glowHdrScale[get, set] doubleThe bleed scale of the HDR glow.
glowHdrThreshold[get, set] doubleThe lower threshold of the HDR glow. When using the GLES2 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.
glowIntensity[get, set] doubleThe glow intensity. When using the GLES2 renderer, this should be increased to 1.5 to compensate for the lack of HDR rendering.
glowLevels1[get, set] boolIf true, the 1st level of glow is enabled. This is the most "local" level (least blurry).
glowLevels2[get, set] boolIf true, the 2th level of glow is enabled.
glowLevels3[get, set] boolIf true, the 3th level of glow is enabled.
glowLevels4[get, set] boolIf true, the 4th level of glow is enabled.
glowLevels5[get, set] boolIf true, the 5th level of glow is enabled.
glowLevels6[get, set] boolIf true, the 6th level of glow is enabled.
glowLevels7[get, set] boolIf true, the 7th level of glow is enabled. This is the most "global" level (blurriest).
glowStrength[get, set] doubleThe glow strength. When using the GLES2 renderer, this should be increased to 1.3 to compensate for the lack of HDR rendering.
ssaoAoChannelAffect[get, set] doubleThe 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.
ssaoBias[get, set] doubleThe screen-space ambient occlusion bias. This should be kept high enough to prevent "smooth" curves from being affected by ambient occlusion.
ssaoBlur[get, set] Environment.SSAOBlurThe screen-space ambient occlusion blur quality. See ssaoblur for possible values.
ssaoColor[get, set] ColorThe screen-space ambient occlusion color.
ssaoEdgeSharpness[get, set] doubleThe screen-space ambient occlusion edge sharpness.
ssaoEnabled[get, set] boolIf 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. This is a costly effect and should be disabled first when running into performance issues.
ssaoIntensity[get, set] doubleThe primary screen-space ambient occlusion intensity. See also ssaoRadius.
ssaoIntensity2[get, set] doubleThe secondary screen-space ambient occlusion intensity. See also ssaoRadius2.
ssaoLightAffect[get, set] doubleThe 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.
ssaoQuality[get, set] Environment.SSAOQualityThe screen-space ambient occlusion quality. Higher qualities will make better use of small objects for ambient occlusion, but are slower.
ssaoRadius[get, set] doubleThe primary screen-space ambient occlusion radius.
ssaoRadius2[get, set] doubleThe secondary screen-space ambient occlusion radius. If set to a value higher than 0, enables the secondary screen-space ambient occlusion effect which can be used to improve the effect's appearance (at the cost of performance).
ssReflectionsDepthTolerance[get, set] doubleThe depth tolerance for screen-space reflections.
ssReflectionsEnabled[get, set] boolIf true, screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from GIProbes or ReflectionProbes, but are slower and can't reflect surfaces occluded by others.
ssReflectionsFadeIn[get, set] doubleThe fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection).
ssReflectionsFadeOut[get, set] doubleThe fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the "global" reflection.
ssReflectionsMaxSteps[get, set] longThe maximum number of steps for screen-space reflections. Higher values are slower.
ssReflectionsRoughness[get, set] boolIf true, screen-space reflections will take the material roughness into account.
tonemapExposure[get, set] doubleThe default exposure used for tonemapping.
tonemapMode[get, set] Environment.ToneMapperThe 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.)
tonemapWhite[get, set] doubleThe white reference value for tonemapping. Only effective if the tonemapMode isn't set to constant TONE_MAPPER_LINEAR.

Methods

NameDescription
getAdjustmentBrightness
getAdjustmentColorCorrection
getAdjustmentContrast
getAdjustmentSaturation
getAmbientLightColor
getAmbientLightEnergy
getAmbientLightSkyContribution
getBackground
getBgColor
getBgEnergy
getCameraFeedId
getCanvasMaxLayer
getDofBlurFarAmount
getDofBlurFarDistance
getDofBlurFarQuality
getDofBlurFarTransition
getDofBlurNearAmount
getDofBlurNearDistance
getDofBlurNearQuality
getDofBlurNearTransition
getFogColor
getFogDepthBegin
getFogDepthCurve
getFogDepthEnd
getFogHeightCurve
getFogHeightMax
getFogHeightMin
getFogSunAmount
getFogSunColor
getFogTransmitCurve
getGlowBlendMode
getGlowBloom
getGlowHdrBleedScale
getGlowHdrBleedThreshold
getGlowHdrLuminanceCap
getGlowIntensity
getGlowStrength
getSky
getSkyCustomFov
getSkyOrientation
getSkyRotation
getSkyRotationDegrees
getSsaoAoChannelAffect
getSsaoBias
getSsaoBlur
getSsaoColor
getSsaoDirectLightAffect
getSsaoEdgeSharpness
getSsaoIntensity
getSsaoIntensity2
getSsaoQuality
getSsaoRadius
getSsaoRadius2
getSsrDepthTolerance
getSsrFadeIn
getSsrFadeOut
getSsrMaxSteps
getTonemapAutoExposure
getTonemapAutoExposureGrey
getTonemapAutoExposureMax
getTonemapAutoExposureMin
getTonemapAutoExposureSpeed
getTonemapExposure
getTonemapper
getTonemapWhite
isAdjustmentEnabled
isDofBlurFarEnabled
isDofBlurNearEnabled
isFogDepthEnabled
isFogEnabled
isFogHeightEnabled
isFogTransmitEnabled
isGlowBicubicUpscaleEnabled
isGlowEnabled
isGlowLevelEnabled Returns true if the glow level idx is specified, false otherwise.
isSsaoEnabled
isSsrEnabled
isSsrRough
setAdjustmentBrightness
setAdjustmentColorCorrection
setAdjustmentContrast
setAdjustmentEnable
setAdjustmentSaturation
setAmbientLightColor
setAmbientLightEnergy
setAmbientLightSkyContribution
setBackground
setBgColor
setBgEnergy
setCameraFeedId
setCanvasMaxLayer
setDofBlurFarAmount
setDofBlurFarDistance
setDofBlurFarEnabled
setDofBlurFarQuality
setDofBlurFarTransition
setDofBlurNearAmount
setDofBlurNearDistance
setDofBlurNearEnabled
setDofBlurNearQuality
setDofBlurNearTransition
setFogColor
setFogDepthBegin
setFogDepthCurve
setFogDepthEnabled
setFogDepthEnd
setFogEnabled
setFogHeightCurve
setFogHeightEnabled
setFogHeightMax
setFogHeightMin
setFogSunAmount
setFogSunColor
setFogTransmitCurve
setFogTransmitEnabled
setGlowBicubicUpscale
setGlowBlendMode
setGlowBloom
setGlowEnabled
setGlowHdrBleedScale
setGlowHdrBleedThreshold
setGlowHdrLuminanceCap
setGlowIntensity
setGlowLevel Enables or disables the glow level at index idx. 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.
setGlowStrength
setSky
setSkyCustomFov
setSkyOrientation
setSkyRotation
setSkyRotationDegrees
setSsaoAoChannelAffect
setSsaoBias
setSsaoBlur
setSsaoColor
setSsaoDirectLightAffect
setSsaoEdgeSharpness
setSsaoEnabled
setSsaoIntensity
setSsaoIntensity2
setSsaoQuality
setSsaoRadius
setSsaoRadius2
setSsrDepthTolerance
setSsrEnabled
setSsrFadeIn
setSsrFadeOut
setSsrMaxSteps
setSsrRough
setTonemapAutoExposure
setTonemapAutoExposureGrey
setTonemapAutoExposureMax
setTonemapAutoExposureMin
setTonemapAutoExposureSpeed
setTonemapExposure
setTonemapper
setTonemapWhite

Enums

NameDescription
BGMode
Constants
DOFBlurQuality
GlowBlendMode
SSAOBlur
SSAOQuality
ToneMapper