This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine.LightEnvironmentProbe Class

Inherits: Light

This class allows creating and managing environment probes.

LightEnvironmentProbe Class

Properties

Texture Texture#

Grabs the cube texture (RGBA16F) containing the rendered environment probe and saves it into the given Texture instance.
set
Sets the given texture as the cube texture of the environment probe. If you need to set the cube texture for all environment probes in the scene, set the dynamic flag to 1.
set value - Cube texture to set.

string TexturePath#

The path to the reflection cube texture used for the environment probe.
set
Sets a path to a cube texture.
set value - Path to a cube texture.

float AmbientContrast#

The current ambient contrast value for the environment probe.
set
Sets the ambient contrast value for the environment probe.
set value - Ambient contrast value within the [0.0f, 1.0f] range. The default value is 1.0f.

vec4 AmbientColor#

Ambient color value of the lightenvironment probe.
set
Sets given ambient color to the LightEnvironment Probe.
set value - Ambient color value.

float AmbientIntensity#

Ambient intensity of the lightenvironment probe.
set
Sets given ambient intensity value to the LightEnvironment Probe. If ambient intensity is set to 1 and reflection intensity is set to 0, the Probe will be pure Light Probe.
set value - Ambient intensity value within the [0.0f, 1.0f] range. The default value is 1.0f.

bool IsAmbientEnabled#

A value indicating if ambient lighting for the environment probe is enabled.
set
Enables or disables ambient lighting for the environment probe.
set value - 1 to enable ambient lighting for the environment probe; 0 to disable it.

float Parallax#

The current 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.
set
Sets 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.
set value - Parallax correction value to be set for reflection cubemaps projected by the environment probe in the range [0;1]:
  • By the minimum value of 0 parallax correction is disabled (reflections will look like objects are infinitely distant).
  • By the maximum value of 1 parallax correction is enabled (reflections will look like objects are at the distance close to the radius of the environment probe).
  • Values in-between represent a linear interpolation factor for parallax correction and are to be set when the environment probe is used to fit a medium or small object into the environment for additional correction.

vec4 ReflectionColor#

A reflection color of the lightenvironment probe.
set
Sets given reflection color to the LightEnvironment Probe. If reflection intensity is set to 1 and ambient intensity is set to 0, the Probe will be pure Reflection Probe.
set value - Color value.

float ReflectionIntensity#

The reflection intensity of the lightenvironment probe.
set
Sets given reflection intensity value to the LightEnvironemt Probe.
set value - Reflection intensity value.

float ZFar#

The distance to the far clipping plane used for image grabbing (available only when the Dynamic flag is set to 0).
set
Sets the distance to the far clipping plane for image grabbing (available only when the Dynamic flag is set to 0).
set value - Distance to the far clipping plane.

float ZNear#

The distance to the near clipping plane used for image grabbing (available only when the Dynamic flag is set to 0).
set
Sets the distance to the near clipping plane for image grabbing (available only when the Dynamic flag is set to 0).
set value - Distance to the near clipping plane.

int ReflectionViewportMask#

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 Dynamic flag is set to 1).
set
Sets a 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 Dynamic flag is set to 1).
set value - Reflection viewport mask (integer, each bit of which is used to represent a mask).

int Supersampling#

A value indicating if supersampling for image grabbing is enabled (available only when the Dynamic flag is set to 0).
set
Enables or disables supersampling for image grabbing (available only when the Dynamic flag is set to 0).
set value - 1 to enable supersampling, 0 to disable it. The default value is 0.

int Resolution#

The current resolution of the reflection mask in pixels (available only when the Dynamic flag is set to 0).
set
Sets the resolution of the reflection mask in pixels (available only when the Dynamic flag is set to 0).
set value - Resolution of the reflection mask in pixels.

int RenderFacesPerFrame#

The current update interval set for the cube texture used for dynamic reflections.
set
Sets the update interval for the cube texture used for dynamic reflections.
set value - Update interval for the dynamic cube texture. The available values are:
  • 1 - refresh only one face each frame.
  • 2 - refresh 2 faces each frame.
  • 3 - refresh 3 faces each frame.
  • 4 - refresh 4 faces each frame.
  • 5 - refresh 5 faces each frame.
  • 6 - refresh 6 faces each frame.

vec3 BoxSize#

The current box size for the environment probe (available only when the Box projection flag is set to 1).
set
Sets the box size for the environment probe (available only when the Box projection flag is set to 1).
set value - Box size along X, Y and Z axes.

float BoxGlossCorners#

The current value of the coefficient that controls glossiness of reflections in the corners of box projection.
Notice
Available only when the Box projection flag is set to 1.
set
Sets the coefficient that controls glossiness of reflections in the corners of box projection.
Notice
Available only when the Box projection flag is set to 1.
set value - New value of the glossiness coefficient for reflections in the corners of box projection. The default value is 1.

float BoxGI#

The current gi factor for box projection.
Notice
Available only when the Box projection flag is set to 1.
set
Sets the current GI factor for box projection.
Notice
Available only when the Box projection flag is set to 1.
set value - GI factor.

bool IsLocalSpace#

set
set value -

bool IsCutoutByShadow#

A 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.
set
Returns a value indicating if reflections occluded by obstacles should be clipped or not. This feature uses the depth texture grabbed for the environment probe to determine reflections that should be visible.
set value - 1 to enable clipping of reflections occluded by obstacles, 0 to disable it. The default value is 0.

bool IsSkyCutout#

A value indicating if sky cutout for image grabbing is enabled (available only when the Dynamic flag is set to 0).
set
Enables or disables sky cutout for image grabbing (available only when the Dynamic flag is set to 0).
set value - 1 to enable sky cutout, 0 to disable it. The default value is 0.

bool IsAdditiveBlending#

A 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.
set
Enables or disables additive blending mode 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 .
set value - 1 to enable additive blending mode for the environment probe, 0 to disable it. The default value is 0.

bool IsUseSunColor#

A value indicating if sun color modulation for the environment probe is enabled. this parameter can be used for outdoor-baked environment probes.
set
Enables or disables sun color modulation for the environment probe (the light of the environment probe changes as the sun color changes). This parameter can be used for outdoor-baked environment probes.
set value - 1 to enable sun color modulation for the environment probe, 0 to disable it. The default value is 0.

bool IsBoxProjection#

A value indicating if box projection is enabled for the environment probe.
set
Enables or disables box projection for the environment probe.
set value - 1 to enable box projection for the environment probe, 0 to disable it. The default value is 0.

bool IsGrabByBakeLighting#

A value indicating whether the cubemap texture is to be modified by the Bake Lighting Tool.
set
Sets a value indicating whether the cubemap texture is to be modified by the Bake Lighting Tool.
set value - 1 to enable grabbing the cubemap texture with the Bake Lighting Tool; 0 - to disable it.

bool IsDynamic#

The value indicating if reflections are dynamic (the cubemap is generated dynamically).
set
Sets the value indicating if reflections are dynamic (the cubemap is generated dynamically).
set value - 1 to enable dynamic reflections; 0 to use a reflection cubemap.

vec3 AttenuationDistance#

The distance from the light source shape, at which the light source doesn't illuminate anything.
set
Sets the distance from the light source shape, at which the light source doesn't illuminate anything.
set value - Distance from the light source shape, at which the light source doesn't illuminate anything.

Render.CORRECT_ROUGHNESS DynamicCorrectRoughness#

Returns the value indicating the correction mode set for dynamic environment reflections on rough surfaces. Correction modes differ in the number of rays used to create a reflection on a rough surface.
set
Enables one of correction modes for dynamic environment reflections on rough surfaces or disables correction. Correction modes differ in the number of rays used to create a reflection on a rough surface.
set value - One of the CORRECT_ROUGHNESS_* modes.

Members


static 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 LightEnvironmentProbe Cast ( Node node ) #

Casts a LightEnvironmentProbe out of the Node instance.

Arguments

  • Node node - Node instance.

Return value

LightEnvironmentProbe instance.

static LightEnvironmentProbe Cast ( Light base ) #

Casts a LightEnvironmentProbe out of the Light instance.

Arguments

  • Light base - Light instance.

Return value

LightEnvironmentProbe instance.

int SetTextureImage ( Image image, bool dynamic = 0 ) #

Sets the given image as the cube texture of the environment probe. If you need to set the cube texture for all environment probes in the scene, set the dynamic flag to 1.

Arguments

  • Image image - Cube texture to set.
  • bool dynamic - Dynamic texture flag:
    • If set to 0, changing the cube texture of the current environment probe will also affect all environment probes in the scene.
    • If set to 1, a cube texture will be successfully set only for the current environment probe.

Return value

1 if the cube texture is set successfully; otherwise, 0.

int GetTextureImage ( Image image ) #

Grabs the cube texture (RGBA16F) containing the rendered environment probe and saves it into the given Image instance.

Arguments

  • Image image - Image into which the texture is saved.

Return value

1 if the cube texture has been grabbed successfully; otherwise, 0.

static int type ( ) #

Returns the type of the node.

Return value

LightEnvironmentProbe type identifier.

void SetDynamicCorrectRoughness ( Render.CORRECT_ROUGHNESS roughness ) #

Enables one of correction modes for dynamic environment reflections on rough surfaces or disables correction. Correction modes differ in the number of rays used to create a reflection on a rough surface.

Arguments

Render.CORRECT_ROUGHNESS GetDynamicCorrectRoughness ( ) #

Returns the value indicating the correction mode set for dynamic environment reflections on rough surfaces. Correction modes differ in the number of rays used to create a reflection on a rough surface.

Return value

One of the CORRECT_ROUGHNESS_* modes.
Last update: 2019-08-16
Build: ()