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
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

LightEnvironmentProbe Class

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.

LightEnvironmentProbe cast(Node node)

Casts a LightEnvironmentProbe out of the Node instance.

Arguments

  • Node node - Node instance.

Return value

LightEnvironmentProbe instance.

LightEnvironmentProbe cast(Light base)

Casts a LightEnvironmentProbe out of the Light instance.

Arguments

  • Light base - Light instance.

Return value

LightEnvironmentProbe instance.

void setAmbientEnabled(int enabled)

Enables or disables ambient lighting for the environment probe.

Arguments

  • int enabled - 1 to enable ambient lighting for the environment probe; 0 to disable it.

int isAmbientEnabled()

Returns a value indicating if ambient lighting for the environment probe is enabled.

Return value

1 if ambient lighting for the environment probe is enabled; otherwise, 0.

void setAmbientColor(vec4 color)

Sets given ambient color to the LightEnvironment Probe.

Arguments

  • vec4 color - Ambient color value.

vec4 getAmbientColor()

Returns ambient color value of the LightEnvironment Probe.

Return value

Ambient color value.

void setAmbientContrast(float contrast)

Sets the ambient contrast value for the environment probe.

Arguments

  • float contrast - Ambient contrast value within the [0.0f, 1.0f] range. The default value is 1.0f.

float getAmbientContrast()

Returns the current ambient contrast value for the environment probe.

Return value

Ambient contrast value.

void setAmbientIntensity(float intensity)

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.

Arguments

  • float intensity - Ambient intensity value within the [0.0f, 1.0f] range. The default value is 1.0f.

float getAmbientIntensity()

Returns ambient intensity of the LightEnvironment Probe.

Return value

Ambient intensity value.

void setAttenuationDistance(vec3 distance)

Sets the distance from the light source shape, at which the light source doesn't illuminate anything.

Arguments

  • vec3 distance - Distance from the light source shape, at which the light source doesn't illuminate anything.

vec3 getAttenuationDistance()

Returns the distance from the light source shape, at which the light source doesn't illuminate anything.

Return value

Distance from the light source shape, at which the light source doesn't illuminate anything.

void setBoxGI(float boxgi)

Sets the current GI factor for box projection.
Notice
Available only when the Box projection flag is set to1.

Arguments

  • float boxgi - GI factor.

float getBoxGI()

Returns the current GI factor for box projection.
Notice
Available only when the Box projection flag is set to1.

Return value

GI factor.

void setBoxGlossCorners(float corners)

Sets the coefficient that controls glossiness of reflections in the corners of box projection.
Notice
Available only when the Box projection flag is set to1.

Arguments

  • float corners - New value of the glossiness coefficient for reflections in the corners of box projection. The default value is 1.

float getBoxGlossCorners()

Returns 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 to1.

Return value

Current value of the glossiness coefficient for reflections in the corners of box projection. The default value is 1.

void setGrabByBakeLighting(int lighting)

Sets a value indicating whether the cubemap texture is to be modified by the Bake Lighting Tool.

Arguments

  • int lighting - 1 to enable grabbing the cubemap texture with the Bake Lighting Tool; 0 - to disable it.

int isGrabByBakeLighting()

Returns a value indicating whether the cubemap texture is to be modified by the Bake Lighting Tool.

Return value

1 if the cubemap texture will be modified by the Bake Lighting Tool; otherwise, 0.

void setBoxProjection(int projection)

Enables or disables box projection for the environment probe.

Arguments

  • int projection - 1 to enable box projection for the environment probe, 0 to disable it. The default value is 0.

int isBoxProjection()

Returns a value indicating if box projection is enabled for the environment probe.

Return value

1 if box projection is enabled for the environment probe; otherwise, 0.

void setBoxSize(vec3 size)

Sets the box size for the environment probe (available only when the Box projection flag is set to1).

Arguments

  • vec3 size - Box size along X, Y and Z axes.

vec3 getBoxSize()

Returns the current box size for the environment probe (available only when the Box projection flag is set to1).

Return value

Box size along X, Y and Z axes.

void setDynamic(int dynamic)

Sets the value indicating if reflections are dynamic (the cubemap is generated dynamically).

Arguments

  • int dynamic - 1 to enable dynamic reflections; 0 to use a reflection cubemap.

int isDynamic()

Returns the value indicating if reflections are dynamic (the cubemap is generated dynamically).

Return value

1 if dynamic reflections are used; 0 if a reflection cubemap is used.

void setTexture(Texture texture)

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.

Arguments

  • Texture texture - Cube texture to set.

Texture getTexture()

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

Return value

Texture to which the cube texture is saved.

int setTextureImage(Image image, int 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.
  • int 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.

void setTexturePath(string path)

Sets a path to a cube texture.

Arguments

  • string path - Path to a cube texture.

string getTexturePath()

Returns the path to the reflection cube texture used for the environment probe.

Return value

Path to the cube texture.

void setLocalSpace(int space)

Arguments

  • int space

int isLocalSpace()

void setReflectionColor(vec4 color)

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.

Arguments

  • vec4 color - Color value.

vec4 getReflectionColor()

Returns a reflection color of the LightEnvironment Probe.

Return value

Color value.

void setReflectionIntensity(float intensity)

Sets given reflection intensity value to the LightEnvironemt Probe.

Arguments

  • float intensity - Reflection intensity value.

float getReflectionIntensity()

Returns the reflection intensity of the LightEnvironment Probe.

Return value

Reflection intensity value.

void setReflectionMask(int mask)

Sets a mask that specifies materials to reflect.
Notice
The reflection mask can be specified only for dynamic reflections (when the Dynamic flag is set to1).

Arguments

  • int mask - Reflection mask (integer, each bit of which is used to represent a mask).

int getReflectionMask()

Returns the mask that specifies materials to reflect.
Notice
The reflection mask can be specified only for dynamic reflections (when the Dynamic flag is set to1).

Return value

The reflection mask (integer, each bit of which is used to represent a mask).

void setRenderFacesPerFrame(int frame)

Sets the update interval for the cube texture used for dynamic reflections.

Arguments

  • int frame - 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.

int getRenderFacesPerFrame()

Returns the current update interval set for the cube texture used for dynamic reflections.

Return 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.

void setResolution(int resolution)

Sets the resolution of the reflection mask in pixels (available only when the Dynamic flag is set to0).

Arguments

  • int resolution - Resolution of the reflection mask in pixels.

int getResolution()

Returns the current resolution of the reflection mask in pixels (available only when the Dynamic flag is set to0).

Return value

Resolution of the reflection mask in pixels.

void setSkyCutout(int cutout)

Enables or disables sky cutout for image grabbing (available only when the Dynamic flag is set to0).

Arguments

  • int cutout - 1 to enable sky cutout, 0 to disable it. The default value is 0.

int isSkyCutout()

Returns a value indicating if sky cutout for image grabbing is enabled (available only when the Dynamic flag is set to0).

Return value

1 if sky cutout for image grabbing is enabled; otherwise, 0.

void setUseSunColor(int color)

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.

Arguments

  • int color - 1 to enable sun color modulation for the environment probe, 0 to disable it. The default value is 0.

int isUseSunColor()

Returns a value indicating if sun color modulation for the environment probe is enabled. This parameter can be used for outdoor-baked environment probes.

Return value

1 if sun color modulation for the environment probe is enabled; otherwise, 0.

void setSupersampling(int supersampling)

Enables or disables supersampling for image grabbing (available only when the Dynamic flag is set to0).

Arguments

  • int supersampling - 1 to enable supersampling, 0 to disable it. The default value is 0.

int getSupersampling()

Returns a value indicating if supersampling for image grabbing is enabled (available only when the Dynamic flag is set to0).

Return value

1 if supersampling for image grabbing is enabled; otherwise, 0.

void setZFar(float zfar)

Sets the distance to the far clipping plane for image grabbing (available only when the Dynamic flag is set to0).

Arguments

  • float zfar - Distance to the far clipping plane.

float getZFar()

Returns the distance to the far clipping plane used for image grabbing (available only when the Dynamic flag is set to0)

Return value

Distance to the far clipping plane.

void setZNear(float znear)

Sets the distance to the near clipping plane for image grabbing (available only when the Dynamic flag is set to0).

Arguments

  • float znear - Distance to the near clipping plane.

float getZNear()

Returns the distance to the near clipping plane used for image grabbing (available only when the Dynamic flag is set to0)

Return value

Distance to the near clipping plane.

int type()

Returns the type of the node.

Return value

LightEnvironmentProbe type identifier.
Last update: 2018-08-10
Build: ()