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.

Light Sources Parameters

This article contains parameters common for the omni-directional light source, projected light source, environment probes, and world light source. Each light source has unique parameters, described in the corresponding articles. Note that not all the parameters, described in this article, are available for each light source.

Shadow settings described in this article are common for the omni-directional and projected light sources. Shadow settings for the world light source are described in the corresponding article.

Light Settings

Light A light mask. For the surface to be illuminated by the light source, its light mask must match the mask of the light source.
Viewport A viewport mask. For the light to be rendered, its viewport mask must match the player's viewport mask.
Color A color of the light in the RGBA format. By default, the light is white.
Intensity A multiplier for the light color used to control color intensity. The higher the value, the brighter the light is.
  • The minimum value of 1 corresponds to the least saturated light color.
  • The maximum value of 100 equals the most bright and intense color.
Intensity = 7
Intensity = 12

Attenuation Settings

Power A light attenuation power used to simulate light intensity gradual fading. This parameter determines how fast the intensity decreases up to the attenuation distance set for the light source.
  • If the attenuation power is set to 0 or close to it, the edge between illuminated and non-illuminated areas will be sharp.
  • Increasing the value up to the maximum of 1 will render softly dispersed light at the non-illuminated areas border.
LightOmni power = 0.001
LightOmni power = 0.5
LightOmni power = 1
LightProj power = 0.001
LightProj power = 0.5
LightProj power = 1
Distance A distance from the light source shape, at which the light source doesn't illuminate anything. In other words, this parameter determines the size of the area illuminated by the light source.
Distance = 1
Distance = 1.5

Shape Settings

Type A shape of the light source. The following shapes are available:
Point shape
Sphere shape
Capsule shape
Rectangle shape
By using this parameter, you can create an area light that illuminates objects in different directions at once. Also a light source of each shape provides a physically correct speck on illuminated surfaces.
Notice
A light source of the rectangular shape produces the light and the speck in a form of a rounded rectangle.
Radius A radius of the spherical, capsule-shaped or rectangular light source.
Length A length of the capsule-shaped or rectangular light source.
Height A height of the rectangular light source.

Visibility Settings

Light A distance at which the light source starts fading. If the distance is set to inf, the source is always rendered.
Shadow A distance up to which the casted shadows completely fade out.
Fade A distance at which the light gradually disappears. This parameter enables to render the light with decreasing radiance after the Light distance is past.

Rendering Settings

Water Indicates whether to render the light source on the water surface or not.
Shadow Indicates whether to render the light source on the transparent surfaces or not.

Shadow Settings

Shadows Enables or disables shadows from the light source.

Shadows from omni light on (the left cube) and off (the right cube)
Offset An offset of the shadow along the X, Y and Z axes relative to the source position. It can help to gain necessary visual effect of altering shadow shape without changing the light direction. To aid the offset orientation, there are shown additional visualizer axes, repeating the source's axes alignment.
Offset = 0
Offset = -0.2
Shadow resolution Size of the shadow map that defines shadow quality.
  • The higher the resolution, the smoother and true to life the result is.
  • The lower the resolution, the more blocky and jagged the shadows outline appears.
Shadow resolution = 64
Shadow resolution = 512
Bias A shadow bias that is used to correct inexact shadowing of the scene objects. It controls the depth offset added to the current depth value stored in the shadow map. Such offset is adaptively calculated with respect to the slope angle of the light source, its resolution and also the distance to the light source at shadow map applying
  • If the shadow acne appears, the bias value should be increased. This procedure eliminates the self-shadowing effect, as the points will appear closer to light source when compared to the map depth value.
  • If the bias value is set too high, the shadow will look detached from the object casting it (see the 3rd picture below).
Bias = 0; Normal bias = 1
Bias = 4; Normal bias = 1
Bias = 30; Normal bias = 1
Normal bias A shadow bias that is achieved by shifting the surface on which the shadow falls. The surface is shifted along normals stored in the normal map.
Normal bias = 0; Bias = 1
Normal bias = 2; Bias = 1
Depending on the normal map of the surface, the shadow may differ for the same values of Normal bias.
Normal bias = 2
Normal bias = 2
Softness Size of the blur applied to the shadow edge.
  • Low softness values corresponds to the crisp and sharp shadow edges.
  • Higher softness values serve to accentuate the effect of soft indirect lighting.
Softness = 0
Softness = 1
Last update: 2017-07-03
Build: ()