This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
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
CIGI Client Plugin
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, voxel 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 Mask Shadow mask controls rendering of a shadow cast by an object lit by a light source.
Viewport Mask Viewport mask. For the light to be rendered, its viewport mask must match the player's viewport mask.
Color Mode Color calculation mode for the light source. The following mode are available:
  • Classic mode. The light source color is defined by the Color value.
  • Temperature mode. The light source color is defined by the color temperature and color filter values.
Color Color of the light in the RGBA format. By default, the light is white.
Color Filter Color multiplier for the light source color (calculated using the color temperature value). This can be used to imitate colored glass. The parameter is available only when the Temperature color mode is set.
Temperature Light source temperature used for light color calculation. The maximum value is 40000.
Temperature = 1000
Temperature = 40000
Intensity 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
Lux Intensity of the light color (as perceived by the human eye) in lux. In UNIGINE, all light sources have the intensity of 1 by default, which is equal to 100000 lux.
Mode Light's mode that defines its contribution in the light baking process.
  • Realtime - the light source provides direct realtime lighting only. It is turned off while light baking is being calculated.
  • Mixed - the light source contributes to light baking and remains enabled all the time providing direct realtime lighting. This option can cause a lack of physical accuracy registered by the eye.
  • Baked - the light source is turned off at run time and is enabled for light baking only. This mode is available for Omni light sources only.

Attenuation Settings

Power 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 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 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 Radius of the spherical, capsule-shaped or rectangular light source.
Length Length of the capsule-shaped or rectangular light source.
Height Height of the rectangular light source.

Distance Visibility Settings

Light Distance at which the light source starts fading. If the distance is set to inf, the source is always rendered.
Shadow Distance up to which the casted shadows completely fade out.
Fade 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)
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 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 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

Screen Space Shadow Settings

Enabled Enables or disables screen space shadows from the light source.

Screen Space Shadows from omni light on (the left cube) and off (the right cube). Shadows are disabled.
Number of Rays Number of rays used in screen space ray tracing. The higher the number of rays, the more the computation of pixel shading is accurate.
Number of Rays = 1
Number of Rays = 15
Number of Steps Number of steps each ray traces. The higher the number of steps, the more the computation of pixel shading is accurate.
Number of Steps = 4; Number of Rays = 1
Number of Steps = 32; Number of Rays = 1
Noise Ray Ray tracing dispersion. The higher the noise, the more the direction of rays is chaotic.
Noise Ray = 0.5
Noise Ray = 0
Noise Step Dispersion of steps. The higher the noise, the more the steps are scattering.
Noise Step = 0.5; Noise Ray = 0.5
Noise Step = 0; Noise Ray = 0.5
Depending on the value of the Noise Ray parameter, the shadow may differ for the same values of Noise Step.
Noise Step = 0.5; Noise Ray = 0
Noise Step = 0; Noise Ray = 0
Step Size Length of each step used in ray traced shadows.
  • Low values cause the closest pixels to shade.
  • Higher values lengthen the shadow spreading.
  • Too high values can provoke shadow gaps.
Step Size = 0.5
Step Size = 20
Threshold Limit of samples passing the screen space shadowing.
  • Low values let pass more samples which causes the shading of inappropriate pixels.
  • Higher values can also cause inaccurate shading by limiting appropriate samples.
Threshold = 0
Threshold = 1
Threshold = 4
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 = 0.5

Lens Flares Settings

Lens Flares simulate the effect of lights refracting inside camera lens. They are used to represent very bright lights or to add more atmosphere to your scene. The settings described below are used per-light, you can also use the lens flares camera effect, which is applied to all lights and bright objects (e.g. having an emissive material with high intensity assigned).

Lens Flares are rendered as billboards, each associated with a part of a single texture and having a set of parameters, that determine its appearance and behavior. So, you can customize and fine tune your lens flares to fit your needs.

Notice
This feature is available only for: Omni Lights, Projected Lights and World Lights.

Enabled Enables or disables lens flares from the light source. By default this effect is disabled.
Notice
The maximum number of lights on the scene for which the per-light flares will be rendered is 32.
Texture

A texture used to render billboards representing lens flares. The default texture is shown in the image below. For each billboard you can specify UV coordinates within this texture to determine its appearance. You can set your own texture, that contains the appearance for all the billboards to be used.

Occlusion Fade Lens flare occlusion fade value for the cases when the light source becomes occluded by an object. By the value of 0.0f, lens flares disappear abruptly, as the light source becomes occluded by an object. If 1.0f is set, lens flares will fade out gradually.
Notice
Transparent objects are currently treated as opaque ones (i.e. they won't occlude flares).
Occlusion Fade Border Lens flare occlusion fade value for the cases when the light source becomes occluded by the edges of the screen. By the value of 0.0f, lens flares disappear abruptly, as the light source becomes occluded by the edges of the screen. If 1.0f is set, lens flares will fade out gradually.
Position Offset An offset of the center of lens flares from the world position of the light source.
Notice
This parameter is not available for World Lights
Position Offset = (0.0, 0.0, 0.0)
Position Offset = (2.0, -3.0, 0.0)
Use Light Color When enabled, the lens flares will have the same color as the light source.

Lens Flares Billboards Settings

Each flare is represented by a separate billboard, The default number of billboards is 30, but you can change it if necessary by adding, removing, or cloning selected billboards in the list via the corresponding buttons.

As you select a billboard in the list, its parameters become available for editing in the fields below.

Notice
You can enable visualization of lens flare billboards via Helpers -> Show Wireframe.
Color Color multiplier for the selected billboard. Texture colors will be multiplied by this value. By default the color is white.
Size This parameter controls the size of the selected billboard.
Size = 1.5
Size = 5
Intensity Multiplier for the billboard color used to control color intensity. The higher the value, the brighter the billboard is.
Intensity = 1
Intensity = 5
Offset Offset determines the distance between the light source and the billboard along the vector oriented from the light source to the screen center. The lower the absolute value is, the closer to the light source the billboard will be. Negative values indicate that the distance is measured in the opposite direction.
Offset = 0.3
Offset = 0.9
Offset Scale Determines how the billboard changes its scale depending on the distance from the light source. As the offset from the light source increases:
  • values less than 1.0f will make the billboard shrink.
  • values greater than 1.0f will make the billboard grow.
Offset Scale= 1.0
Offset Scale = 4.0
Lower Left X X-coordinate of the lower left corner of the selected billboard in the lens flares texture, in the range [0.0, 1.0], e.g., the value equal to 0.5 corresponds to the middle of the texture.
Lower Left Y Y-coordinate of the lower left corner of the selected billboard in the lens flares texture, in the range [0.0, 1.0], e.g., the value equal to 0.5 corresponds to the middle of the texture.
Upper Right X X-coordinate of the upper right corner of the selected billboard in the lens flares texture, in the range [0.0, 1.0], e.g., the value equal to 0.5 corresponds to the middle of the texture.
Upper Right Y Y-coordinate of the upper right corner of the selected billboard in the lens flares texture, in the range [0.0, 1.0], e.g., the value equal to 0.5 corresponds to the middle of the texture.
Rotate Enables or disables rotation of the lens flare billboard. When enabled the top of the billboard will always face the center of the screen.
Last update: 2018-08-10
Build: ()