Light Sources Parameters
This article contains parameters common for the Omni, Projected, and World light sources, Environment Probe, and Voxel Probe. Each light source also has unique parameters, which are described in the corresponding articles. Note that not all the parameters described in this article are available for each type of the light source.
Light Settings#
Common Settings#
Mode |
Mode that defines rendering of the light source. It also affects rendering of shadows from the light source, and defines the impact of the light source on the light baking process.
|
||||
---|---|---|---|---|---|
Shadow Mask | The shadow mask controls rendering of a shadow cast by an object lit by the light source. | ||||
Viewport Mask | For the light to be rendered, its viewport mask should match the camera's viewport mask. | ||||
Color Mode |
Color calculation mode for the light source. The following mode are available:
|
||||
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.
|
||||
Intensity |
Multiplier for the light color used to control color intensity. The higher the value, the brighter the light is.
|
||||
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. |
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.
|
||||||
---|---|---|---|---|---|---|---|
Distance |
Distance from the light source shape, after which the light source doesn't illuminate anything. In other words, this parameter determines the outer border of the area illuminated by the light source.
|
||||||
Near Attenuation | Distance from the light source within which the light intensity is equal to 0. If an object is located within this distance from the light source, it won't be illuminated. In other words, this parameter determines the inner border of the area illuminated by the light source. | ||||||
Near Attenuation Gradient | The length of the gradient that makes the Near Attenuation border smoother. |
Shape Settings#
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#
Shadow Settings#
Enabled |
Toggles rendering of shadows from the light source on and off.
Shadows from Light Omni enabled (the left cube) and disabled (the right cube)
|
||||||||
---|---|---|---|---|---|---|---|---|---|
Mode |
Is available when the Static light mode is enabled. Two shadow modes are available:
For fine-tuning static light and shadows, see the optimization recommendations. |
||||||||
Depth Texture | The R32F texture that stores the shadow map: a 2D texture array for the World and Omni light sources, or a 2D texture for the Projected light source. | ||||||||
Resolution |
Size of the shadow map that defines the shadow quality.
A shadow map is a 32-bit texture (in case of Light Omni, it's a 2D texture array ), and higher resolution significantly increases memory consumption. Moreover, heavy 4K shadow maps for lights with Mixed shadow mode enabled may significantly affect performance due to blending of baked and dynamicshadow maps. |
||||||||
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 taking into account the slope angle of the light source, its resolution, and the distance to the light source at shadow map application.
|
||||||||
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.
Depending on the normal map of the surface, the shadow may differ for the same values of Normal Bias.
|
||||||||
Near Clipping | The distance from the light source, within which the object doesn't cast shadow under this light source. | ||||||||
Filter Mode |
Filtering mode to be used to reduce the stair-step effect for soft shadows making the edges smoother.
|
||||||||
Filter | Filtering intensity for the selected mode. The higher the value the less noticeable the stair-step effect at the edges of shadows will be. | ||||||||
Penumbra Mode |
Quality mode to be used for penumbra rendering. This mode enables simulation of real-world shadows by keeping sharp contact shadows closer to the base and softening the farther the shadow stretches away.
|
||||||||
Penumbra |
Intensity of penumbra for the selected mode:
|
Screen Space Shadow Settings#
Enabled |
Enables or disables screen space shadows from the light source.
Screen Space Shadows from Light Omni 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 accurate the computation of pixel shading is.
|
||||||||
Number of Steps |
Number of steps each ray traces. The higher the number of steps, the more accurate the computation of pixel shading is.
|
||||||||
Noise Ray |
Ray tracing dispersion. The higher the noise, the more chaotic the direction of rays is.
|
||||||||
Noise Step |
Dispersion of steps. The higher the noise, the more scattering the steps are.
Depending on the value of the Noise Ray parameter, the shadow may differ for the same values of Noise Step.
|
||||||||
Near Step Size |
Length of each step used in ray-traced shadows within Near Step Size Distance.
|
||||||||
Far Step Size | Length of each step used in ray-traced shadows (see the description above) starting from Far Step Size Distance. | ||||||||
Near Step Size Distance | Distance from the camera, in units. Up to this distance, Near Step Size is used for screen-space shadows. | ||||||||
Far Step Size Distance | Distance from the camera, in units. After this distance, Far Step Size is used for screen-space shadows. For the space between Near Step Size Distance and Far Step Size Distance, the step size interpolates from Near Step Size to Far Step Size. | ||||||||
Near Threshold |
Threshold value for Near Step Size. This value defines the limit of samples passing the screen-space shadowing.
|
||||||||
Far Threshold | Threshold value (see the description above) for Far Step Size. | ||||||||
Near Threshold Distance | Distance from the camera, in units. Up to this distance, Near Threshold is used. | ||||||||
Far Threshold Distance | Distance from the camera, in units. After this distance, Far Threshold is used for screen-space shadows. For the space between Near Threshold Distance and Far Threshold Distance, the threshold value interpolates from Near Threshold to Far Threshold. | ||||||||
Softness |
Size of the blur applied to the shadow edge.
|
||||||||
Noise Translucent |
Makes translucent shadows smoother by adding noise. The higher the value the more intense and noticeable the noise is. This option affects performance, so use it only in case it noticeably improves the result. |
||||||||
Translucent Depth | This parameter indicates how much the light passes through screen-space shadows on translucent materials (with Translucence option enabled): the higher the value the deeper the light penetrates translucent objects shifting the shadow. | ||||||||
Translucent Depth Perspective Compensation | Perspective compensation for the Translucent Depth value above:
This effect is used to make tree crowns located far from the camera more translucent than the grass nearby. |
||||||||
Translucent View Bias | This parameter can be used to create an effect of fuzziness for vegetation (e.g. to simulate leaves of saintpaulia or provide a sponge-like look for tree crowns).
|
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.
Enabled |
Enables or disables lens flares from the light source. By default this effect is disabled. 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. 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. This parameter is not available for Light World
|
||||
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.
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.
|
||||
Intensity |
Multiplier for the billboard color used to control color intensity. The higher the value, the brighter the billboard is.
|
||||
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 Scale |
Determines how the billboard changes its scale depending on the distance from the light source. As the offset from the light source increases:
|
||||
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. |