Unigine.LightEnvironmentProbe Class
Inherits from: | Light |
This class allows creating and managing environment probes.
LightEnvironmentProbe Class
Enums
GRAB_DYNAMIC_FACES_PER_FRAME#
GRAB_SUPERSAMPLING#
Name | Description |
---|---|
MODE_1 = 0 | One sample per pixel. |
MODE_2 = 1 | Two samples per pixel. |
MODE_4 = 2 | Four samples per pixel. |
MODE_8 = 3 | Eight samples per pixel. |
GRAB_RESOLUTION#
GRAB_MODE#
Name | Description |
---|---|
BAKED = 0 | Reflections are static (the cubemap is pre-baked). |
DYNAMIC = 1 | Reflections are updated in realtime (the cubemap is generated dynamically). |
SPECULAR_BRDF_MODE#
Name | Description |
---|---|
BLINN = 0 | Blinn-Phong reflection model. |
GGX = 1 | GGX light distribution model. |
PROJECTION_MODE#
Name | Description |
---|---|
SPHERE = 0 | The spherical shape of projection. |
BOX = 1 | The box shape of projection. |
RAYMARCHING = 2 | The raymarching mode used to calculate reflections from the surrounding surfaces. |
LAST_STEP_MODE#
Name | Description |
---|---|
ENVIRONMENT_PROBE = 0 | |
ONLY_SKY = 1 |
Properties
LightEnvironmentProbe.GRAB_MODE GrabMode#
The grabbing mode for the environment probe. One of the GRAB_MODE values.
string TexturePath#
The path to the reflection cube texture used for the environment probe.
float AmbientContrast#
The ambient contrast value for the environment probe.
bool AmbientEnabled#
The value indicating if ambient lighting for the environment probe is enabled.
bool SpecularEnabled#
The value indicating if specular reflections for the environment probe are enabled.
float SphereReflectionParallax#
The parallax correction value for reflection cubemaps projected by the environment probe. by the minimum value of 0 reflection cubemaps are simply projected onto objects, and do not follow the viewer's perspective. This causes an unrealistic-looking reflection for most surfaces. Parallax correction enables to take camera's position into account.
Notice
Parallax correction is not available for reflections on transparent objects.
float GrabZFar#
The distance to the far clipping plane used for image grabbing (available only when the Grab Mode is set to BAKED).
float GrabZNear#
The distance to the near clipping plane used for image grabbing (available only when the Grab Mode is set to BAKED).
int GrabViewportMask#
The mask that specifies materials for which reflections are to be rendered in the viewport.
Notice
The reflection viewport mask can be specified only for dynamic reflections (when the Grab Mode is set to DYNAMIC).
Render.GGX_MIPMAPS_QUALITY GrabGGXMipmapsQuality#
The quality of GGX mipmaps, one of the GGX_MIPMAPS_QUALITYvalues.
LightEnvironmentProbe.GRAB_SUPERSAMPLING GrabSupersampling#
The supersampling mode for image grabbing (available only when the Grab Mode is set to BAKED).
LightEnvironmentProbe.GRAB_RESOLUTION GrabResolution#
The resolution of the reflection mask in pixels (available only when the Grab Mode is set to BAKED).
LightEnvironmentProbe.GRAB_DYNAMIC_FACES_PER_FRAME GrabDynamicFacesPerFrame#
The update interval set for the cube texture used for dynamic reflections.
vec3 BoxSize#
The box size for the environment probe (available only when the Projection Mode is set to Box).
float BoxGlossCorners#
The value of the coefficient that controls glossiness of reflections in the corners of box projection.
Notice
Available only when the Projection Mode is set to Box.
float BoxAmbientParallax#
The ambient parallax factor for box projection.
Notice
Available only when the Projection Mode is set to Box.
bool LocalSpace#
The value indicating if local space (local coordinates) for the environment probe is enabled. Can be used for scenes with moving objects.
bool CutoutByShadow#
The value indicating if clipping of reflections occluded by obstacles is enabled. this feature uses the depth texture grabbed for the environment probe to determine reflections that should be visible.
bool SkyCutout#
The value indicating if sky cutout for image grabbing is enabled (available only when the Grab Mode is set to BAKED).
bool AdditiveBlending#
The value indicating if additive blending is enabled for the environment probe. this option offers more flexibility in reflections control. you can use it to blend reflections of several environment probes together and control them separately.
bool MultiplyBySkyColor#
The value indicating if sun color modulation for the environment probe is enabled. this parameter can be used for outdoor-baked environment probes.
LightEnvironmentProbe.PROJECTION_MODE ProjectionMode#
The projection mode to be used for the environment probe. One of the PROJECTION_MODE values.
bool GrabByBakeLighting#
The value indicating whether the cubemap texture is to be modified by the Bake Lighting Tool.
float GrabDistanceScale#
The distance scale for the reflection.
vec3 AttenuationDistance#
The distance from the light source shape, at which the light source doesn't illuminate anything.
bool GrabBakeVisibilityLightmap#
The value indicating if baking of lightmapped surfaces to the environment probe is enabled.
bool GrabBakeVisibilityVoxelProbe#
The value indicating if other voxel probe light sources are to be baked to the voxel probe. you can use this option together with additive blending to provide more flexibility in light baking. Thus, you can make voxel probes independent of each other and combine them to produce some sort of dynamic GI effect.
bool GrabBakeVisibilityEnvironmentProbe#
The value indicating if environment probe light sources are to be baked to the environment probe. you can use this option together with additive blending to provide more flexibility in light baking. Thus, you can make voxel probes independent of each other and combine them to produce some sort of dynamic GI effect.
bool GrabBakeVisibilityLightProj#
The value indicating if projected light sources are to be baked to the environment probe. You can use this option together with additive blending to provide more flexibility in light baking. Thus, you can make environment probes independent of each other and combine them to produce some sort of dynamic GI effect.
bool GrabBakeVisibilityLightOmni#
The value indicating if omni light sources are to be baked to the environment probe. You can use this option together with additive blending to provide more flexibility in light baking. Thus, you can make environment probes independent of each other and combine them to produce some sort of dynamic GI effect.
bool GrabBakeVisibilityLightWorld#
The value indicating if world light sources are to be baked to the environment probe. You can use this option together with additive blending to provide more flexibility in light baking. Thus, you can make environment probes independent of each other and combine them to produce some sort of dynamic GI effect.
bool GrabBakeVisibilitySky#
The value indicating if lighting from the sky is to be baked to the environment probe. You can use this option together with additive blending to provide more flexibility in light baking. Thus, you can make environment probes independent of each other and combine them to produce some sort of dynamic GI effect.
bool GrabBakeVisibilityEmission#
The value indicating if emission light sources are to be baked to the environment probe. You can use this option together with additive blending to provide more flexibility in light baking. Thus, you can make environment probes independent of each other and combine them to produce some sort of dynamic GI effect.
LightEnvironmentProbe.SPECULAR_BRDF_MODE RaymarchingSpecularBRDF#
The light distribution model for matte surfaces, one of the SPECULAR_BRDF_MODE values. GGX is more realistic, though increases noise and slightly reduces performance.
float RaymarchingSpecularReplaceWithDiffuseRoughnessThreshold#
The rougness value starting from which Indirect Specular stops being calculated and is replaced with Indirect Diffuse. This setting is used to optimize matte reflections.
float RaymarchingSpecularInformationLostRaysMultiplier#
The multiplier for the number of rays (Num Rays) for the indirect specular in the areas where the ghosting effect usually occurs. Increasing this value reduces the ghosting, but the more ghosting cases are, the more it affects performance.
float RaymarchingSpecularMipOffset#
The mipmap offset for the cubemap that is used for the specular reflections calculation. Increasing the value affects performance, lighting turns to be less detailed and realistic, small objects on the cubemap may be lost. The 0 value provides the most visually credible result, but more rays are required to eliminate the noise.
float RaymarchingSpecularThresholdOcclusion#
The value that limits imitation of environment cubemap occlusion for the specular reflections in areas where information can't be obtained. Higher values make the effect less pronounced. This parameter is mainly used for indoor environment to correct false reflections on occluded areas (false reflections are replaced with black color). For outdoor environment, higher values of this parameter are recommended.
float RaymarchingSpecularThreshold#
The threshold used for the specular reflectionst calculation to limit imitation of specular in areas where information can't be obtained. Higher values make the effect less pronounced.
float RaymarchingSpecularNumStepsRoughnessThreshold#
The roughness value at which the number of steps (SpecularNumSteps) equals to 1. This is required for optimization, as calculating matte reflections as correctly as possible may be unnecessary.
int RaymarchingSpecularNumSteps#
The number of steps per ray that are used for trace calculation. The number of steps defines accuracy of indirect specular reflections and causes a reasonable performance impact. The higher the value, the more accurate obstacles between objects are taken into account.
int RaymarchingSpecularNumRays#
The number of rays per pixel that are used to calculate specular reflections from rough surfaces. Using more rays provides more precise reflection roughness calculation, however, it is more expensive.
float RaymarchingSpecularStepSize#
The size of the trace step used for the indirect specular reflection calculation. Higher values result in longer traces (however, tiny objects may become missing), lower values produce more detailed reflections of tiny objects.
float RaymarchingDiffuseTranslucenceAnisotropy#
The value defining the extent of the light penetration through transparent surfaces. The example values have the following effect:
- 0 — light does not penetrate through surfaces.
- 0.5 — light is distributed equally on both sides of the surface (along the ray direction and towards the light source)
- 1.0 — all light passes through the surface along the ray direction.
float RaymarchingDiffuseInformationLostRaysMultiplier#
The multiplier for the number of rays (Num Rays) for the indirect diffuse in the areas where the ghosting effect usually occurs. Increasing this value reduces the ghosting, but the more ghosting cases are, the more it affects performance.
float RaymarchingDiffuseMipOffset#
The mipmap offset for the cubemap that is used for the diffuse light calculation. Increasing the value affects performance, lighting turns to be less detailed and realistic, small objects on the cubemap may be lost. The 0 value provides the most visually credible result, but more rays are required to eliminate the noise.
float RaymarchingDiffuseThresholdOcclusion#
The value that limits imitation of environment cubemap occlusion for the diffuse light in areas where information can't be obtained. Higher values make the effect less pronounced. This parameter is mainly used for indoor environment to correct false reflections on occluded areas (false reflections are replaced with black color). For outdoor environment, higher values of this parameter are recommended.
float RaymarchingDiffuseThreshold#
The threshold used for the diffuse light calculation to limit imitation of diffuse light in areas where information can't be obtained. Higher values make the effect less pronounced.
int RaymarchingDiffuseNumSteps#
The number of steps per ray that are used for trace calculation. The number of steps defines accuracy of indirect diffuse light and causes a reasonable performance impact. The higher the value, the more accurate obstacles between objects are taken into account.
int RaymarchingDiffuseNumRays#
The number of rays per pixel that are used to calculate diffuse reflections from rough surfaces.
float RaymarchingDiffuseStepSize#
The Size of the trace step used for the indirect diffuse light calculation.
int RaymarchingNoiseFramesNumber#
The Number of variations of the noise pattern, which is changed every frame.
float GrabEnvironmentReflectionIntensity#
The
float GrabEnvironmentAmbientIntensity#
The
float RaymarchingSpecularNonLinearStepSize#
The
float RaymarchingSpecularPerspectiveCompensation#
The
int RaymarchingSpecularReconstructionSamples#
The
float RaymarchingSpecularThresholdBinarySearch#
The
float RaymarchingDiffuseNonLinearStepSize#
The
float RaymarchingDiffusePerspectiveCompensation#
The
int RaymarchingDiffuseReconstructionSamples#
The
float RaymarchingDiffuseThresholdBinarySearch#
The
float RaymarchingAmbientOcclusionRadius#
The
float RaymarchingAmbientOcclusionIntensity#
The
LightEnvironmentProbe.LAST_STEP_MODE RaymarchingLastStepMode#
The
Members
LightEnvironmentProbe ( vec4 color, vec3 attenuation_distance, string name = 0 ) #
Constructor. Creates a new environment probe with cubemap modulation based on given parameters.Arguments
- vec4 color - Color of the environment probe.
- vec3 attenuation_distance - Radii of the environment probe.
- string name - Path to a cube texture of the environment probe.
static int type ( ) #
Returns the type of the node.Return value
LightEnvironmentProbe type identifier.void SetRaymarchingLastStepMode ( LightEnvironmentProbe.LAST_STEP_MODE mode ) #
Arguments
LightEnvironmentProbe.LAST_STEP_MODE GetRaymarchingLastStepMode ( ) #
void SetRaymarchingAmbientOcclusionIntensity ( float intensity ) #
Arguments
- float intensity
float GetRaymarchingAmbientOcclusionIntensity ( ) #
void SetRaymarchingAmbientOcclusionRadius ( float radius ) #
Arguments
- float radius
float GetRaymarchingAmbientOcclusionRadius ( ) #
void SetRaymarchingDiffuseThresholdBinarySearch ( float search ) #
Arguments
- float search
float GetRaymarchingDiffuseThresholdBinarySearch ( ) #
void SetRaymarchingDiffuseReconstructionSamples ( int samples ) #
Arguments
- int samples
int GetRaymarchingDiffuseReconstructionSamples ( ) #
void SetRaymarchingDiffusePerspectiveCompensation ( float compensation ) #
Arguments
- float compensation
float GetRaymarchingDiffusePerspectiveCompensation ( ) #
void SetRaymarchingDiffuseNonLinearStepSize ( float size ) #
Arguments
- float size
float GetRaymarchingDiffuseNonLinearStepSize ( ) #
void SetRaymarchingSpecularThresholdBinarySearch ( float search ) #
Arguments
- float search
float GetRaymarchingSpecularThresholdBinarySearch ( ) #
void SetRaymarchingSpecularReconstructionSamples ( int samples ) #
Arguments
- int samples
int GetRaymarchingSpecularReconstructionSamples ( ) #
void SetRaymarchingSpecularPerspectiveCompensation ( float compensation ) #
Arguments
- float compensation
float GetRaymarchingSpecularPerspectiveCompensation ( ) #
void SetRaymarchingSpecularNonLinearStepSize ( float size ) #
Arguments
- float size
float GetRaymarchingSpecularNonLinearStepSize ( ) #
void SetGrabEnvironmentAmbientIntensity ( float intensity ) #
Arguments
- float intensity
float GetGrabEnvironmentAmbientIntensity ( ) #
void SetGrabEnvironmentReflectionIntensity ( float intensity ) #
Arguments
- float intensity
float GetGrabEnvironmentReflectionIntensity ( ) #
Last update:
2023-12-19
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)