This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
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
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.

Environment Probe

Environment Probe is a light source which also provides reflections on an object inside the probe by using a cubemap (pre-baked or dynamically changing each frame). In UNIGINE, Environment Probe has two types of projections:

  • Box projection — works better for indoor scenes (when the room has a 3D box shape) or box-shaped outdoor scenes (back alley between buildings).
  • Spherical projection — works better for all other cases (reflections on car, spherical room, etc.).

With Environment Probe you can create reflections instead of creating reflection materials.

Notice
By default Environment Probe is used for reflections only; as for lighting, it is recommended to simulate it using Voxel Probe and Lightmaps. This approach ensures the best result, however you can still use Environment Probe for ambient lighting.

See Also#

Overview#

Environment Probe is a great thing to increase performance, decrease the number of materials and make the life of content designers easier.

Environment Probe uses cubemaps that were baked (or grabbed with a special tool). The cubemap will play the role of the reflection and the light simulation. Here is an example:

We have two houses with different color of the interior and put same objects (with reflection material, for example, metal) into these houses. What will happen?

If we don't speak about the dynamic reflections, you'll need to reflect the interior on each object. But interiors have different ambient color, and that is why you'll need to create 2 different materials for them. Not optimized at all.

Environment Probe removes this flaw. Once you added an object, you don't think about the reflection material for it. Environment Probe will map the cubemap to the object.

There is a difference in mapping cubemaps to transparent and non-transparent objects:

  • If an object is transparent, Environment Probe will map the cubemap only if the entire object is inside the radius of Environment Probe. Otherwise, the object won't be affected by Environment Probe at all.
  • If an object is non-transparent, Environment Probe will map the cubemap to any part of the object which is inside the radius of the probe.
Transparent object affected by Environment Probe
Non-transparent object affected by Environment Probe

If you put several Environment Probe nodes that affect a non-transparent object (rendered in the deferred pass) their cubemaps will be blended smoothly. Here is an example, a long corridor which has walls painted in different colors.

We put two Environment Probe nodes and they both affect the object (when the object is in the intercrossing area). If you have large locations, you should use several Environment Probe nodes instead of one to make the final image more realistic.

The SSR (Screen Space Reflections) effect makes the final image more realistic, because it appends reflections that cannot be baked into cubemaps. Using Environment Probe and SSR is a great method for pretty fast imitation of reflections with dynamic lighting.

Multiple Environment Probe for Transparent Objects#

The Multiple Environment Probes option set for a transparent object (rendered in the forward pass) allows several Environment Probe nodes affect the object and map their cubemaps to it.

  • When the option is disabled, only the last set Environment Probe will affect the object. At that, the entire object must be inside the radius of Environment Probe. Otherwise, it won't be affected by this Environment Probe at all.
  • When the option is enabled, the object will be lit by the whole Environment Probe: each probe will affect the part of the object, which is inside the probe. Cubemaps of Environment Probe nodes will be blended in the intercrossing areas.
Notice
Rendering of multiple Environment Probe nodes must be enabled via Rendering -> Transparent -> Multiple Environment Probes.
Multiple Environment Probes is off: only the left cubemap is mapped to the object
Multiple Environment Probes is on: both cubemaps are mapped and blended

Adding Environment Probe#

To add an Environment Probe node to the scene via UnigineEditor, do the following:

  1. Run the project with UnigineEditor.
  2. On the Menu bar, click Create -> Lights and select the required shape of Environment Probe: box or sphere. The projection shape can be changed after it is created via the Parameters window.

  3. Place Environment Probe.
  4. Grab the cubemap texture for Environment Probe. You can grab it via the Parameters window or use the Bake Lighting tool.
  5. Adjust the Environment Probe settings.
Notice
  • You can't bake realtime lights (Omni Light, Projected Light, etc.) to Environment Probe. The best you can do is to place spheres with emission materials instead of lights, adjust emission intensity and then bake lighting. However, the result will look worse than you'd have with realtime lights.
  • Use the Bake to Environment Probes option to define if a surface should have its reflections baked to Environment Probe.

When Environment Probe is selected in the UnigineEditor viewport, reference spheres are visualized in the center of the probe:

  • Reflective sphere helps in estimating the reflection provided by the probe.
  • Diffused sphere helps in estimating the ambient lighting provided by the probe (requires Ambient lighting to be enabled).

Environment Probe Settings#

The Environment Probe settings can be found in the Node tab of the Parameters window. This tab contains both the parameters attributable to all light sources and the parameters specific for Environment Probe. The specific parameters are described below.

Common Parameters#

Projection Shape

Type of projection shape to be used by Environment Probe:

  • Box projection — works better for indoor scenes (when the room has a 3D box shape) or box-shaped outdoor scenes (back alley between buildings).
  • Spherical projection — works better for all other cases (reflections on car, spherical room, etc.).
Box Projection Size Specifies the size of the box projection.
Attenuation Power Sets the attenuation power for the light.
Attenuation Distance Sets the attenuation distance for the light.

Render Parameters#

Color Sets the light color in the RGBA format. The color defines both the plausibility of virtual representation and its aesthetic component.
Intensity

Sets the light color multiplier, which provides fine control over color intensity of the emitted light:

  • The minimum value of 1 corresponds to the least saturated light color.
  • The maximum value of 100 equals the most bright and intense color.
Shadow Mask The Shadow mask controls rendering of a shadow cast by an object lit by a light source.
Viewport Mask Sets the Viewport mask for the light.
Visibility Distance Distance from the camera, in units, up to which Environment Probe will be rendered.
Fade Distance Distance from the camera, in units, starting from which Environment Probe starts to fade out gradually.
Render Water Renders Environment Probe on water.
Render Transparent Renders Environment Probe on transparent object.
Use Sun Color

Enables the influence of sun light color on Environment Probe.

Notice
When enabled, this option makes the Environment Probe color black at night, or orange at sunset.
Additive Blending Enables the additive blending mode for Environment Probe. This option offers more flexibility in lighting and reflections control. You can use it to blend lighting and reflections of several Environment Probe nodes together and control them separately.

Ambient Parameters#

Enabled Enables ambient lighting for Environment Probe. By default, Environment Probe is used for reflections only; as for lighting, it is recommended to simulate it using Voxel Probe and Lightmaps. This approach ensures the best result, however you can still use Environment Probe for ambient lighting by enabling this option.
Global Illumination

Enables the global illumination simulation. Environment Probe generates fake GI by using given cubemap.

Notice
This parameter is available for box projection only.
Contrast Sets the contrast of ambient lighting.

Reflection Parameters#

Gloss Corners

Sets the intensity of reflection gloss near the box projection corners.

Notice
This parameter is available for box projection only.
Parallax

Parallax correction enables rendering of reflections taking into account the camera's position. When this option is disabled, reflection cubemaps are simply projected onto objects, and do not follow the viewer's perspective.

  • 0 (minimum) — parallax correction is disabled (reflections will look like objects are infinitely distant).
  • 1 (maximum) — parallax correction is enabled (reflections will look like objects are at the distance close to the radius of Environment Probe).
  • Values in-between represent a linear interpolation factor for parallax correction and are to be set when Environment Probe is used to fit a medium or small object into the environment for additional correction, if necessary.
Notice
  • This parameter is available for spherical projection only (Box Projection option must be disabled).
  • Parallax correction does not affect reflections on transparent objects.

Baking Settings#

Notice
Re-grab the cubemap texture, when you make changes to these parameters.
Dynamic

Specifies if the reflection is dynamic.

Notice
The Dynamic Reflections option should be enabled: Rendering -> Features -> Dynamic Reflections.
Correct Roughness

Enables one of correction modes for Environment Probe reflections on rough surfaces or disables correction. Available modes are Low, Medium, High, Ultra — they differ in the number of rays used to create a reflection on a rough surface.

Notice
Available for dynamic mode only.
Faces Per Frame

Cubemap update interval.

Notice
Available for dynamic mode only.
  • 1 — Refresh only one face every frame.
  • 2 — Refresh two faces every frame.
  • 3 — Refresh three faces every frame.
  • 4 — Refresh four faces every frame.
  • 5 — Refresh five faces every frame.
  • 6 — Refresh all six faces every frame.
Grab by Bake Lighting Specifies if the cubemap texture is to be modified by the Bake Lighting Tool.
Reflection Viewport Mask The mask that controls rendering of the Environment Probe's reflections into the reflection camera viewport.
Resolution

Resolution of the reflection texture, in pixels.

Notice
Setting too high resolution on a low-performance GPU with low memory capacity may cause engine crash.
Supersampling Number of samples per pixel used for image grabbing supersampling.
Mipmaps Quality

Quality of mipmaps.

Notice
Setting too high quality on a low-performance GPU with low memory capacity may cause engine crash.
Near Clipping Distance to the near clipping plane for image grabbing.
Far Clipping

Distance to the far clipping plane for image grabbing.

Notice
An extremely big difference between the Near and Far Clipping Planes can cause baking the space into black. Therefore, if the required Far Clipping Plane value is outside the range, adjust the Near Clipping value proportionately.
Sky Cutout

Cut out sky rendering in Environment Probe and renders dynamic reflection instead of the sky.

Notice
This parameter can be used to render changes of the sky gradient in a window, when the time of the day changes.
Local Space

Enable local space (local coordinates) for Environment Probe. Can be used for scenes with moving objects.

Notice
It is recommended to use this parameter, if you plan to rotate the Environment Probe after baking.
Notice
You can use the following 7 visibility options together with additive blending to provide more flexibility in light baking. Thus, you can make Environment Probe nodes independent of each other and combine them to produce some sort of dynamic GI effect.
Visibility Sky Enables baking of lighting from the sky to Environment Probe.
Visibility Light World Enables baking of World Light sources to Environment Probe.
Visibility Light Omni Enables baking of Omni Light sources to Environment Probe.
Visibility Light Proj Enables baking of Projected Light sources to Environment Probe.
Visibility Voxel Probe Enables baking of other Voxel Probe light sources to Environment Probe.
Visibility Emission Enables baking of emission light sources to Environment Probe.
Visibility Lightmap Enables baking of lightmapped surfaces to Environment Probe.
Texture

Cubemap texture for reflection.

Notice

Every bake lighting procedure makes changes to the asset selected in this field when the Grab by Bake Lighting mode is enabled.

You can leave the field empty to avoid losing content. In this case a new generated lighting texture will be set for this parameter after the bake lighting procedure. Generated textures are stored in the data/bake_lighting folder.

Cutout By Shadow

Enables clipping of reflections occluded by obstacles (located in shadowed areas relative to the light source). This feature uses the depth texture grabbed for Environment Probe to determine reflections that should be visible.

Notice
  • This feature does not work with the Dynamic option enabled and does not clip reflections for transparent objects.
  • The feature takes into account only the shadows cast by surfaces using the Cast Environment Probe Shadows option.

When enabled, the three parameters listed below (Bias, Normal Bias, and Depth Texture) are available.

Bias Bias that is used to correct inexact shadowing of the scene objects for the Cutout By Shadow feature. It controls the depth offset added to the current depth value stored in the shadow map. Similar to the Bias parameter for shadows.
Normal Bias Bias obtained for the Cutout By Shadow feature by shifting the surface on which the shadow falls. The surface is shifted along normals stored in the normal map. Similar to the Normal Bias parameter for shadows.
Depth Texture

Depth texture used for clipping reflections occluded by obstacles.

Notice
This texture is static and requires re-generation each time the Environment Probe position or size is changed.

To grab the depth texture for clipping perform the following steps:

  1. Place Environment Probe to the desired location and adjust its size, if necessary.
  2. Disable all nodes that should not be taken into account when calculating occluded (shadowed) areas.
  3. Enable the Cutout By Shadow feature and make sure that the Grab by Bake Lighting mode is also enabled.
  4. Click Show Bake Lighting and in the window that appears click Bake Selected Probe.
  5. After the textures are generated, you can enable or disable clipping at run time.
Notice

Every bake lighting procedure makes changes to the asset selected in this field when the Grab by Bake Lighting mode together with the Cutout By Shadow mode are enabled.

You can leave the field empty to avoid losing content. In this case a new generated depth texture will be set for this parameter after the bake lighting procedure. Generated textures are stored in the data/bake_lighting folder.

Last update: 2021-12-13
Build: ()