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 | The cubemap used for the last step is the same as for all previous steps. |
ONLY_SKY = 1 | The cubemap contains the sky and clouds only. |
SECONDARY_BOUNCE_PROJECTION_MODE#
Name | Description |
---|---|
SPHERE = 0 | Sphere projection. |
RAYMARCHING = 1 | Raymarching. |
Properties
LightEnvironmentProbe.GRAB_MODE GrabMode#
The grabbing mode for the environment probe. One of the GRAB_MODE values.
string TextureFilePath#
The path to the reflection cube texture file 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.
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.
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.
Available only when the Projection Mode is set to Box.
float BoxAmbientParallax#
The ambient parallax factor for box projection.
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.
float GrabEnvironmentReflectionIntensity#
The the intensity of the environment reflection.
float GrabEnvironmentAmbientIntensity#
The the intensity of the environment ambient lighting.
LightEnvironmentProbe.SPECULAR_BRDF_MODE RaymarchingSpecularBRDF#
The the light distribution model for matte surfaces. GGX is more realistic, though increases noise and slightly reduces performance.
float RaymarchingSpecularReplaceWithDiffuseRoughnessThreshold#
The 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 the multiplier for the number of rays 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 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 the value that limits imitation of environment cubemap occlusion 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 the threshold used for the specular reflections calculation to limit imitation of reflections in areas where information can't be obtained. Higher values make the effect less pronounced.
float RaymarchingSpecularNumStepsRoughnessThreshold#
The the roughness value at which the number of steps equals to 1. This is required for optimization, as calculating matte reflections as correctly as possible may be unnecessary.
int RaymarchingSpecularNumSteps#
The the number of steps per ray that are used for trace calculation. The number of steps defines accuracy of reflections and causes a reasonable performance impact. The higher the value, the more accurate obstacles between objects are taken into account.
int RaymarchingSpecularNumRays#
The 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 the size of the trace step used for the 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 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 the multiplier for the number of 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 the size of the trace step used for the diffuse reflection calculation. Higher values result in longer traces (however, tiny objects may become missing), lower values produce more detailed reflections of tiny objects.
float RaymarchingDiffuseThresholdOcclusion#
The the value that limits imitation of environment cubemap occlusion 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 the threshold used for the diffuse light calculation to limit imitation of reflections in areas where information can't be obtained. Higher values make the effect less pronounced.
int RaymarchingDiffuseNumSteps#
The the number of steps per ray that are used for trace calculation. The number of steps defines accuracy of indirect light and causes a reasonable performance impact. The higher the value, the more accurate obstacles between objects are taken into account.
int RaymarchingDiffuseNumRays#
The the number of rays per pixel that are used to calculate diffuse reflections from rough surfaces. Using more rays provides more precise reflection roughness calculation, however, it is more expensive.
float RaymarchingDiffuseStepSize#
The the size of the trace step used for the diffuse reflection calculation. Higher values result in longer traces (however, tiny objects may become missing), lower values produce more detailed reflections of tiny objects.
int RaymarchingNoiseFramesNumber#
The the number of variations of the noise pattern, which is changed every frame.
float RaymarchingSpecularNonLinearStepSize#
The the raymarching step size adjustment value. The value of 0 means that the step size is the same for each step, and at the value of 1 each subsequent raymarching step is twice wider than the previous one.
float RaymarchingSpecularPerspectiveCompensation#
The perspective compensation for the raymarching step size. 0 means that the raymarching step size is bound to the World Space, and 1 means that it is bound to the Screen Space. As a result, at the value of 1, the ray length at the distance from the camera will be more than at a closer distance, which makes sense for large objects, but the details on small objects in the distance may will be lost.
int RaymarchingSpecularReconstructionSamples#
The the number of iterations required for a more accurate detection of the screen-space ray-surface intersection for the indirect specular. Higher values define the intersection more precisely, however significantly affect performance.
float RaymarchingSpecularThresholdBinarySearch#
The the threshold value used for the intersection detection that defines the depth of the ray penetration under the surface. Higher values may cause more false intersections, but make the process of intersection detection easier.
float RaymarchingDiffuseNonLinearStepSize#
The the raymarching step size adjustment value. The value of 0 means that the step size is the same for each step, and at the value of 1 each subsequent raymarching step is twice wider than the previous one.
float RaymarchingDiffusePerspectiveCompensation#
The perspective compensation for the raymarching step size. 0 means that the raymarching step size is bound to the World Space, and 1 means that it is bound to the Screen Space. As a result, at the value of 1, the ray length at the distance from the camera will be more than at a closer distance, which makes sense for large objects, but the details on small objects in the distance may will be lost.
int RaymarchingDiffuseReconstructionSamples#
The the number of iterations required for a more accurate detection of the screen-space ray-surface intersection for the indirect diffuse. Higher values define the intersection more precisely, however significantly affect performance.
float RaymarchingDiffuseThresholdBinarySearch#
The the threshold value used for the intersection detection that defines the depth of the ray penetration under the surface. Higher values may cause more false intersections, but make the process of intersection detection easier.
float RaymarchingAmbientOcclusionRadius#
The the radius of sample pixels used in the Ambient Occlusion effect, controlling the extent of the darkened area.
float RaymarchingAmbientOcclusionIntensity#
The the ambient occlusion intensity. Keep in mind that ambient occlusion doesn't exist in the real world, this is a method to imitate shadows between objects. For photorealistic visualization, we recommend keeping this value equal to 0.
LightEnvironmentProbe.LAST_STEP_MODE RaymarchingLastStepMode#
The the cubemap to be used for the last raymarching step.
The following modes are available:
- Environment Probe — the cubemap used for the last step is the same as for all previous steps.
- Only Sky — the cubemap contains the sky and clouds only. This option is designed to fix the incorrect parallax that may occur in reflections due to the infinite length of the last step.
LightEnvironmentProbe.SECONDARY_BOUNCE_PROJECTION_MODE RaymarchingSecondaryBounceProjectionMode#
The the secondary bounce projection mode.
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 ) #
Sets the cubemap to be used for the last raymarching step. The following modes are available:- Environment Probe — the cubemap used for the last step is the same as for all previous steps.
- Only Sky — the cubemap contains the sky and clouds only. This option is designed to fix the incorrect parallax that may occur in reflections due to the infinite length of the last step.
Arguments
- LightEnvironmentProbe.LAST_STEP_MODE mode - The cubemap for the last step. One of the LAST_STEP_MODE values.
LightEnvironmentProbe.LAST_STEP_MODE GetRaymarchingLastStepMode ( ) #
Returns the cubemap used for the last raymarching step. The following modes are available:- Environment Probe — the cubemap used for the last step is the same as for all previous steps.
- Only Sky — the cubemap contains the sky and clouds only. This option is designed to fix the incorrect parallax that may occur in reflections due to the infinite length of the last step.
Return value
The cubemap for the last step. One of the LAST_STEP_MODE values.void SetRaymarchingAmbientOcclusionIntensity ( float intensity ) #
Sets the ambient occlusion intensity. Keep in mind that ambient occlusion doesn't exist in the real world, this is a method to imitate shadows between objects. For photorealistic visualization, we recommend keeping this value equal to 0.Arguments
- float intensity - Ambient occlusion intensity.
float GetRaymarchingAmbientOcclusionIntensity ( ) #
Returns the ambient occlusion intensity. Keep in mind that ambient occlusion doesn't exist in the real world, this is a method to imitate shadows between objects. For photorealistic visualization, we recommend keeping this value equal to 0.Return value
Ambient occlusion intensity.void SetRaymarchingAmbientOcclusionRadius ( float radius ) #
Sets the radius of sample pixels used in the Ambient Occlusion effect, controlling the extent of the darkened area.Arguments
- float radius - Ambient occlusion radius.
float GetRaymarchingAmbientOcclusionRadius ( ) #
Returns the radius of sample pixels used in the Ambient Occlusion effect, controlling the extent of the darkened area.Return value
Ambient occlusion radius.void SetRaymarchingDiffuseThresholdBinarySearch ( float search ) #
Sets the threshold value used for the intersection detection that defines the depth of the ray penetration under the surface. Higher values may cause more false intersections, but make the process of intersection detection easier.Arguments
- float search - Threshold value.
float GetRaymarchingDiffuseThresholdBinarySearch ( ) #
Returns the threshold value used for the intersection detection that defines the depth of the ray penetration under the surface. Higher values may cause more false intersections, but make the process of intersection detection easier.Return value
Threshold value.void SetRaymarchingDiffuseReconstructionSamples ( int samples ) #
Sets the number of iterations required for a more accurate detection of the ray-surface intersection for the indirect diffuse. Higher values define the intersection more precisely, however significantly affect performance.Arguments
- int samples - Number of iterations for the intersection detection.
int GetRaymarchingDiffuseReconstructionSamples ( ) #
Retuns the number of iterations required for a more accurate detection of the screen-space ray-surface intersection for the indirect diffuse. Higher values define the intersection more precisely, however significantly affect performance.Return value
Number of iterations for the intersection detection.void SetRaymarchingDiffusePerspectiveCompensation ( float compensation ) #
Sets the perspective compensation for the raymarching step size. 0 means that the raymarching step size is bound to the World Space, and 1 means that it is bound to the Screen Space. As a result, at the value of 1, the ray length at the distance from the camera will be more than at a closer distance, which makes sense for large objects, but the details on small objects in the distance may will be lost.Arguments
- float compensation - Compensation value.
float GetRaymarchingDiffusePerspectiveCompensation ( ) #
Returns the perspective compensation for the raymarching step size. 0 means that the raymarching step size is bound to the World Space, and 1 means that it is bound to the Screen Space. As a result, at the value of 1, the ray length at the distance from the camera will be more than at a closer distance, which makes sense for large objects, but the details on small objects in the distance may will be lost.Return value
Compensation value.void SetRaymarchingDiffuseNonLinearStepSize ( float size ) #
Sets the raymarching step size adjustment value. The value of 0 means that the step size is the same for each step, and at the value of 1 each subsequent raymarching step is twice wider than the previous one.Arguments
- float size - Step size.
float GetRaymarchingDiffuseNonLinearStepSize ( ) #
Returns the raymarching step size adjustment value. The value of 0 means that the step size is the same for each step, and at the value of 1 each subsequent raymarching step is twice wider than the previous one.Return value
Step size.void SetRaymarchingSpecularThresholdBinarySearch ( float search ) #
Sets the threshold value used for the intersection detection that defines the depth of the ray penetration under the surface. Higher values may cause more false intersections, but make the process of intersection detection easier.Arguments
- float search - Threshold for the intersection detection.
float GetRaymarchingSpecularThresholdBinarySearch ( ) #
Returns the threshold value used for the intersection detection that defines the depth of the ray penetration under the surface. Higher values may cause more false intersections, but make the process of intersection detection easier.Return value
Threshold for the intersection detection.void SetRaymarchingSpecularReconstructionSamples ( int samples ) #
Sets the number of iterations required for a more accurate detection of the ray-surface intersection for the indirect specular. Higher values define the intersection more precisely, however significantly affect performance.Arguments
- int samples - Number of iterations for the intersection detection.
int GetRaymarchingSpecularReconstructionSamples ( ) #
Returns the number of iterations required for a more accurate detection of the ray-surface intersection for the indirect specular. Higher values define the intersection more precisely, however significantly affect performance.Return value
Number of iterations for the intersection detection.void SetRaymarchingSpecularPerspectiveCompensation ( float compensation ) #
Sets the perspective compensation for the raymarching step size. 0 means that the raymarching step size is bound to the World Space, and 1 means that it is bound to the Screen Space. As a result, at the value of 1, the ray length at the distance from the camera will be more than at a closer distance, which makes sense for large objects, but the details on small objects in the distance may will be lost.Arguments
- float compensation - Compensation value.
float GetRaymarchingSpecularPerspectiveCompensation ( ) #
Returns the perspective compensation for the raymarching step size. 0 means that the raymarching step size is bound to the World Space, and 1 means that it is bound to the Screen Space. As a result, at the value of 1, the ray length at the distance from the camera will be more than at a closer distance, which makes sense for large objects, but the details on small objects in the distance may will be lost.Return value
Compensation value.void SetRaymarchingSpecularNonLinearStepSize ( float size ) #
Sets the raymarching step size adjustment value. The value of 0 means that the step size is the same for each step, and at the value of 1 each subsequent raymarching step is twice wider than the previous one.Arguments
- float size - Step size.
float GetRaymarchingSpecularNonLinearStepSize ( ) #
Returns the raymarching step size adjustment value. The value of 0 means that the step size is the same for each step, and at the value of 1 each subsequent raymarching step is twice wider than the previous one.Return value
Step size.void SetRaymarchingSecondaryBounceProjectionMode ( LightEnvironmentProbe.SECONDARY_BOUNCE_PROJECTION_MODE mode ) #
Sets the secondary bounce projection mode.Arguments
- LightEnvironmentProbe.SECONDARY_BOUNCE_PROJECTION_MODE mode - Secondary bounce projection mode. One of the SECONDARY_BOUNCE_PROJECTION_MODE values.
LightEnvironmentProbe.SECONDARY_BOUNCE_PROJECTION_MODE GetRaymarchingSecondaryBounceProjectionMode ( ) #
Returns the secondary bounce projection mode.Return value
Secondary bounce projection mode. One of the SECONDARY_BOUNCE_PROJECTION_MODE values.void SetGrabEnvironmentAmbientIntensity ( float intensity ) #
Sets the intensity of the environment ambient lighting.Arguments
- float intensity - Intensity of the environment ambient lighting.
float GetGrabEnvironmentAmbientIntensity ( ) #
Returns the intensity of the environment ambient lighting.Return value
Intensity of the environment ambient lighting.void SetGrabEnvironmentReflectionIntensity ( float intensity ) #
Sets the intensity of the environment reflection.Arguments
- float intensity - Intensity of the environment reflection.
float GetGrabEnvironmentReflectionIntensity ( ) #
Returns the intensity of the environment reflection.Return value
Intensity of the environment reflection.Last update:
2024-07-26
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)