This page has been translated automatically.
Setting Up Development Environment
High-Level Systems
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
Double Precision Coordinates
Core Library
Engine Classes
Node-Related Classes
Rendering-Related Classes
Physics-Related Classes
Bounds-Related Classes
GUI-Related Classes
Controls-Related Classes
Pathfinding-Related Classes
Utility 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

Omni and projected light sources and also environment probes share the same parameters. They also have specific parameters, but the general set is given below.

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
Visible dist A distance at which the light source starts fading. If the distance is set to infinity, the source is always rendered.
Shadow dist A distance up to which the casted shadows fade out to nonexistence.
Fade dist A distance at which the light gradually disappears. this parameter enables to render the light with decreasing radiance after the Visible dist is past.

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

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: ()