This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Landscape Tool
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine 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
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
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.

LightPlanarProbe Class

Warning
The scope of applications for UnigineScript is limited to implementing materials-related logic (material expressions, scriptable materials, brush materials). Do not use UnigineScript as a language for application logic, please consider C#/C++ instead, as these APIs are the preferred ones. Availability of new Engine features in UnigineScript (beyond its scope of applications) is not guaranteed, as the current level of support assumes only fixing critical issues.
Inherits from: Light

This class is used to create and manage Planar Reflection Probes the implement planar reflections functionality (used to create mirrors etc.). The probe grabs the reflection, and requires a surface to project the reflection onto. There is a set of parameters enabling you to tweak the look of your reflections and optimize rendering load (by limiting visibility distance, reflections rendering distance, etc.).

LightPlanarProbe Class

Members


LightPlanarProbe ( ) #

Constructor. Creates a new planar probe.

static int type ( ) #

Returns the object node type.

void setProjectionSize ( vec3 size ) #

Sets the size for the planar probe. Defines the box-shaped influence volume around the probe, in units, in which reflective surfaces (having the appropriate roughness values) shall use the results captured by the probe.

Arguments

  • vec3 size - The size along X, Y and Z axes. The default value is (2.0f, 2.0f, 0.1f).

vec3 getProjectionSize ( ) #

Returns the current size of the planar probe. Defines the box-shaped influence volume around the probe, in units, in which reflective surfaces (having the appropriate roughness values) shall use the results captured by the probe.

Return value

The size along X, Y and Z axes. The default value is (2.0f, 2.0f, 0.1f).

void setAttenuationDistance ( vec3 distance ) #

Sets the attenuation distance that specifies how far the projection can reach any surfaces from the Probe position. It also specifies the attenuation area around the Probe at which the projection starts to fade out at the specified rate.

Arguments

  • vec3 distance - Attenuation distance. The default value is (0.1f, 0.1f, 0.1f).

vec3 getAttenuationDistance ( ) #

Returns the attenuation distance that specifies how far the projection can reach any surfaces from the Probe position. It also specifies the attenuation area around the Probe at which the projection starts to fade out at the specified rate.

Return value

Attenuation distance. The default value is (0.1f, 0.1f, 0.1f).

void setRoughnessSamples ( int samples ) #

Sets the number of samples used to adjust quality of the blurring effect for the reflection on rough surfaces.

Arguments

  • int samples - Number of roughness samples. The default value is 0.

int getRoughnessSamples ( ) #

Returns the number of samples used to adjust quality of the blurring effect for the reflection on rough surfaces.

Return value

Number of roughness samples. The default value is 0.

void setReflectionResolution ( int resolution ) #

Sets the resolution of the reflection texture for the projection.

Arguments

  • int resolution - Reflection resolution. The default value is REFLECTION_RESOLUTION_MODE_HEIGHT.

int getReflectionResolution ( ) #

Returns the resolution of the reflection texture for the projection.

Return value

Reflection resolution. The default value is REFLECTION_RESOLUTION_MODE_HEIGHT.

void setTwoSided ( int sided ) #

Set a value indication if two-sided reflection is enabled.

Arguments

  • int sided - 1 to enable two-sided reflection; 0 - to disable it. The default value is 0.

int isTwoSided ( ) #

Returns a value indication if two sided reflection is enabled.

Return value

1 if two sided reflection is enabled; 0 disabled. The default value is 0.

void setDistanceScale ( float scale ) #

Sets the distance multiplier for the reflection visibility distance. Distance Scale is applied to the distance measured from the reflection camera to the node (surface) bound.

Arguments

  • float scale - Distance scale multiplier for the reflection. The default value is 0.5f.

float getDistanceScale ( ) #

Returns the distance multiplier for the reflection visibility distance. Distance Scale is applied to the distance measured from the reflection camera to the node (surface) bound.

Return value

Distance scale multiplier for the reflection. The default value is 0.5f.

void setReflectionDistance ( float distance ) #

Sets the render distance for the reflection that specifies how far the reflection is rendered from the camera.

Arguments

  • float distance - Reflection render distance in units. The default value is 100.0f.

float getReflectionDistance ( ) #

Returns the render distance for the reflection that specifies how far the reflection is rendered from the camera.

Return value

Reflection render distance in units. The default value is 100.0f.

void setReflectionViewportMask ( int mask ) #

Sets the viewing mask that specifies materials for which reflections are to be rendered in the viewport.

Arguments

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

int getReflectionViewportMask ( ) #

Returns the viewing mask that specifies materials for which reflections are to be rendered in the viewport.

Return value

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

int getVisibilitySkipFlags ( ) #

Returns a bit mask that specifies what objects to skip rendering. Chosen object types won't be rendered in the reflection.

Return value

Visibility bit mask (integer, each bit of which is used to represent a mask)

void setZNear ( float znear ) #

Sets the distance to the near clipping plane for image grabbing.

Arguments

  • float znear - Distance to the near clipping plane. The default value is 0.01f.

float getZNear ( ) #

Returns the distance to the near clipping plane for image grabbing.

Return value

Distance to the near clipping plane. The default value is 0.01f.

void setZFar ( float zfar ) #

Sets the distance to the far clipping plane defining a frustum to be used for grabbing reflections.

Arguments

  • float zfar - Distance to the far clipping plane. The default value is 100.0f.

float getZFar ( ) #

Returns the distance to the near clipping plane defining a frustum to be used for grabbing reflections.

Return value

Distance to the far clipping plane. The default value is 100.0f.

void setReflectionVisibilityRoughnessMin ( float val ) #

Sets the bound of the roughness range of the at which the reflection of the planar probe starts to attenuate.

Arguments

  • float val - Minimal visibility roughness bound. The default value is 0.0f.

float getReflectionVisibilityRoughnessMin ( ) #

Returns the bound of the roughness range of the at which the reflection of the planar probe starts to attenuate.

Return value

Minimal visibility roughness bound. The default value is 0.0f.

void setReflectionVisibilityRoughnessMax ( float val ) #

Sets the higher bound of the roughness range at which the reflection of the planar probe disappears completely.

Arguments

  • float val - Maximal visibility roughness. The default value is 0.25f.

float getReflectionVisibilityRoughnessMax ( ) #

Returns the higher bound of the roughness range at which the reflection of the planar probe disappears completely.

Return value

Maximal visibility roughness. The default value is 0.25f.

void setVisibilitySky ( int sky ) #

Sets a value indicating if sky is rendered in the reflection.

Arguments

  • int sky - 1 to enable sky rendering in reflection; 0.

int isVisibilitySky ( ) #

Returns a value indicating if sky is rendered in the reflection.

Return value

1 if sky rendering in the reflection is enabled; otherwise 0.

void setParallax ( float parallax ) #

Sets degree of reflection distortion. Distortion depends on an angle between the probe plane and the surface onto which the probe projects reflection. Increasing the value amplifies visual distortion as a result of increasing this angle.

Arguments

  • float parallax - Degree of reflection distortion within the range of [0;1].

float getParallax ( ) #

Returns current degree of reflection distortion. Distortion depends on an angle between the probe plane and the surface onto which the probe projects reflection. Increasing the value amplifies visual distortion as a result of increasing this angle.

Return value

Degree of reflection distortion within the range of [0;1].

void setNoiseIntensity ( float intensity ) #

Sets the intensity of jitter for roughness samples that creates a noise effect on the reflection.

Arguments

  • float intensity - Intensity of reflection noisiness. The default value is 0.5f.

float getNoiseIntensity ( ) #

Returns current intensity of jitter for roughness samples that creates a noise effect on the reflection.

Return value

Intensity of reflection noisiness. The default value is 0.5f.

void setReflectionOffset ( float offset ) #

Sets reflection Z axis offset relative to the probe coordinate system.

Arguments

  • float offset - Reflection offset along Z axis in units. The default value is 0.01f.

float getReflectionOffset ( ) #

Returns reflection Z axis offset relative to the probe coordinate system.

Return value

Reflection offset along Z axis in units. The default value is 0.01f.
Last update: 2022-03-10
Build: ()