This page has been translated automatically.
Programming
Fundamentals
Setting Up Development Environment
UnigineScript
High-Level Systems
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
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.

Scattering

The atmosphere rendering is based on interpolation between several LUTs (Look-Up Textures) describing different states of the sky during the day.

The built-in WorldLight dynamic environment cubemap automatically generates lighting and reflections for all objects in the scene. The result depends on the position of the Sun and Moon. It acts similarly to the infinitely large environment probe, but works faster and doesn't require placing addition object to the scene.

Notice
In cases when you need to change reflections locally, for example, indoors, use the environment probe with the unique cubemap.

Sun and Moon

The WorldLight Scattering option provides the following lighting types:

  • None — render the atmosphere as if there were no global lights, that is, there will be no sky color gradient in any direction.
  • Sun — render the atmosphere in accordance with the Sun's lighting.
  • Moon — render the atmosphere in accordance with the Moon's lighting.

There is also a new Disable angle setting for LightWorld defining a critical angle above the horizon, where the light source is still enabled.

Environment Presets

The environment cubemap is tweaked in the Rendering panel -> Environment tab. The scattering can have up to 3 separate settings presets that can be blended by the Preset intensity scroll bars.

Presets work as layers: the first preset will overlay the zero one, the second will overlay the first and the zero ones. For example, you can set the zero preset for the clean and clear sky, set the first preset for the cloudy sky and lerp them smoothly.

Scaterring LUT Settings

All the presets settings are identical. The scattering versatility is achieved mostly because of the scattering LUT textures.

Base

A texture defining the base color of the sky. The texture means the following:

  • Left to right: the position of the sun above the surface (time of day).
  • Top to down: the gradient of the sun.

At the example below, when sun's angle is 90 degrees (right in the middle of gradient), the sky's top will is blue, the horizon is yellow, the sky below the horizon is brown.

Base LUT Texture

Mie

A texture (for both sun and moon) for setting the Mie light (the color of the light round the sun).

Mie LUT Texture

Light Color

A texture defining the color of the LightWorld for different times of day. The texture means the following:

  • Top to down: the WorldLight's angle of slope.

Left to right texture direction doesn't matter, so you can use the texture 1×512 (width to height) pixels in size.

Light Color LUT Texture

Ground

A one-channel mask imitating lighting and reflections from the landscape. It is required because lighting and reflections are generated based only on scattering, world objects influence is not calculated.

Ground LUT Texture

Ground Color

A color of the imitated landscape (for example, green for the forest, brown for the desert).

Environment Settings

Environment settings are required for creating environment by means of panorama (cubemap). Besides, this texture is used for imitating landscape reflections and lighting in accordance with the Ground mask.

Texture A cubemap defining the environment color.
Color The environment color multiplier, where alpha defines the visibility of a cubemap above scattering. This parameter is required when you need to display a sky with a photo texture and dynamic gradients at the same time.

Environment Cubemap

Haze Settings

This group of parameters set the atmosphere haze. It automatically uses the color from the scattering LUTs, so objects smoothly fade into the distance without any artifacts.

The haze is controlled by the render_haze console command:

  • 0 — disables the haze.
    Notice
    With this mode on, performance is slightly increased.
  • 1 — uses the haze color from the color parameter.
  • 2 — uses the color from the sky LUTs (recommended for better realism).
Color The color of the haze.
Notice
The parameter takes effect only if render_haze is set to 1.
Max distance The distance starting at which the haze becomes completely solid, so nothing will be seen behind. For large terrains it is recommended to the this parameter equal to your camera's Far parameter. This is required for distant objects to fade into the distance instead of being cut sharply.
Density The density of the haze.
Last update: 2017-07-03
Build: ()