Programming
Fundamentials
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
Core Library
Containers
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

Rendering Settings

This panel allows adjusting the rendering settings of the world and can be invoked by pressing the R key (see Controls and Navigation). The panel has a set of tabs given below.

Rendering settings

Rendering Settings

Common

This tab contains the basic settings.

Distance scaleGlobal distance scale for all distance parameters, such as the world rendering distance, shadow distance, LOD distances etc. This option allows a developer to easily increase or decrease rendering performance by changing the world extent.
Distance scale
Distance scale = 1
Distance scale
Distance scale = 0.3
World distanceDistance after which all nodes are not rendered or simulated (infinite by default).
The distance is measured from the camera to the node. If the camera is within node bounds, the node is rendered no matter the World distance set (as in case with a ground on the picture below).
Infinite World distance
World distance = inf
Limited World distance
World distance = 10 units
Light distanceDistance after which the dynamic lights are not be rendered.
Infinite Light distance
Light distance = inf
Limited Light distance
Light distance = 20 units
Object distanceDistance after which objects are not be rendered.
Shadow distanceDistance after which the shadows from light sources are not be rendered.
Distance scale
Shadow distance = 1200 units
Distance scale
Shadow distance = 80 units
Physics distanceDistance after which physical interactions will not be calculated. All physics-based nodes freeze if the distance between them and the camera is bigger than the Physics distance.
Limited Physics distance
Physics distance = 40 units
Infinite Physics distance
Physics distance = inf
Decal distanceDistance after which decals will not be rendered.
Clutter distanceDistance after which clutter objects will not be rendered.
Reflection distanceDistance after which reflection will not be rendered.
Field distanceDistance, at which (and farther) fields are not rendered.
World budgetWorld generation time budget for the Grass and Clutter objects in frames per second.
Physics budgetPhysics simulation time budget in frames per second.
Render budgetRender creation time budget in frames per second. The render budget limits the number of loaded / created graphics resources during frame according to the loading / creation time.
Ambient colorThe color used to color all objects during the ambient rendering passes.
  • Do not use Ambient color to simulate the ambient light in the environment. Objects will look flat and non-realistic. Use an environment texture instead (the difference illustrated).
  • To avoid overglowing with HDR enabled, set it to almost black, but non-zero value.
Reflection colorColor that allows to adjust reflections of all meshes with reflective materials, i.e.:
  • mesh_reflection_2d_base
  • mesh_reflection_cube_base
  • mesh_paint_reflection_cube_base
and reflective tessellation materials:
  • mesh_tessellation_reflection_2d_base
  • mesh_tessellation_reflection_cube_base
  • mesh_tessellation_paint_reflection_cube_base
Background colorSolid color rendered on the scene background. It For example, this option allows to create brighter, richer sky colors with light scattering.
Black background color
Default background color
Blue background color
Blue background
EnvironmentEnvironment cube map texture for image-based ambient lighting (light that is independent of direction). It realistically simulates light that comes from six main directions (per cube side). For example, objects are rendered bluish at the top (due to the sky color) and grayish or brownish at the bottom (due to the ground color).

Load, view or clear the environment cube-mapped texture.

To grab an environment texture, use Tools -> Grabber -> Mode: Cube. A very small texture can be used, 32x32 pixels is enough.

Environment texture (can be smaller)
Here is how the environment texture can increase the quality of the rendered scene.
  • No ambient light, no environment texture. Non-lit areas are black.

    No ambient light
  • Ambient color is used. All surfaces are uniformly lit and look flat.

    Ambient color
  • An environment texture is used. It is the best variant for ambient light since all objects are properly lit depending on surface normals.

    Environment texture
ExposureThe brightness of ambient lighting according to the environment texture.
Environment texture-based Exposure
Exposure = 0.4
Environment texture-based Exposure
Exposure = 1.2
RenderRender postprocess materials applied before all other Unigine postprocess (such as HDR, DOF, etc.) are rendered. Several materials are separated by a comma (without whitespace). Custom postprocesses can also be set.
For example, post_filter_scattering is set here. This way, subsurface scattering will be rendered first, and then correctly blurred with DOF.
CompositeThis field allows to set the name of a custom composite shader. It will be used for the final composition of the full-screen image instead of the default one.
Post Post postprocess materials applied at the end, after all other postprocess (such as HDR, DOF, etc.) are rendered. Such postprocesses, when applied to the screen image, affect HDR flares, glowing areas and so on. Several materials are separated by a comma (without whitespace). Custom postprocesses can also be set.

Here is an example with post_blur_radial material.

Radial blur post material

Parameters

The tab contains different parameters that control some node or material settings across the whole world. That includes tessellation, vegetation animation and light probes.

Stereo distanceThis option is only for custom stereo rendering (available stereo modes have their own viewing settings). The focal distance. It is the distance in the world space to the point where two views line up, i.e. distance to the zero parallax plane.
Stereo radiusThis option is only for custom stereo rendering (available stereo modes have their own viewing settings). The radius of stereo (half of the separation distance between the cameras, i.e. between eyes).
Stereo offsetA virtual camera offset (an offset after the perspective projection).
 
Animation stemGlobal scale for movement amplitude of vegetation stems. It scales Stem offset parameter for mesh_stem_base, mesh_leaf_base and grass_base materials.
Animation leafGlobal scale for rotation angle of vegetation leaves. It scales the Leaf offset parameter for mesh_leaf_base material.
Animation scaleGlobal scale for speed of vegetation swaying. It scales Stem scale and Leaf scale parameters for mesh_stem_base, grass_base and mesh_leaf_base materials.
Animation windA multiplier for the stem offset under wind. It sets the direction of wind for all vegetation (grass and trees).
Global maskA mask that determines rendering of the LightProb-based global illumination. For the LightProb to light a scene around it, at least one bit of this mask should match the light mask.of the probe light.
Global distanceA distance up to which the LightProb-based global illumination is rendered.
Global attenuationAn attenuation factor for the LightProb-based global illumination. The larger this value is, the smoother and across the larger distance the global illumination fades out.
Global biasThe Fresnel effect bias for specular highlights when rendering the LightProb-based global illumination. The higher the value, the brighter specular highlights are at all viewing angles.
Global powerThe Fresnel effect power for specular highlights when rendering the LightProb-based global illumination. It defines the amount of reflectance depending on the viewing angle:
  • Low values provide good reflectance even at the large viewing angle, when looking from above.
  • High values provide the reflectance only at the small viewing angle, when close to the surface.
Global diffuseA diffuse light multiplier for the LightProb-based global illumination.
Global specularA specular light multiplier for the LightProb-based global illumination.

Occlusion

The tab contains settings related to both screen-space ambient occlusion mapping and indirect illumination.

The following settings are used for the screen-space ambient occlusion:

Ambient Occlusion Settings

Notice
The settings of the screen-space ambient occlusion can be adjusted if the Occlusion is enabled on the Main Settings panel.
Ambient screen radiusDistance in the screen space, within which the geometry is sampled to compute self-shadowing. The number of sampled points is strictly defined and depends on shader quality.
  • By the minimum value of 0, self-shadowing is not calculated.
  • The maximum value of 0.2. However, when the area of sampling is large, the result appears dispersed and the performance decreases.
Ambient sample radiusDistance for each of the points in the world space, up to which they can shadow their neighbouring points:
  • By low values, each point can shadow only the points in the close range.
  • By high values, each point shadows farther positioned points.
Ambient perspectivePerspective compensation for the ambient occlusion. When at the far distance, the sample radius will be automatically increased, if a value higher than 1 is set.
Ambient attenuationCoefficient that compensates for falloff of the ambient occlusion with a distance, making it more prominent. The lower the value, the less the ambient occlusion effect fades out with the distance.
Ambient thresholdDepth threshold used to filter ambient occlusion. It specifies the maximum possible depth between sampled points in two pixels, to filter them together. This option allows you to have sharp edges, while having smooth ambient occlusion on flat surfaces.
Ambient emitter normalCoefficient indicating if the points can shadow their neighbouring points in all directions or only along their normal vectors.
  • By the minimum value of 0, each point casts shadows in all directions.
  • By the maximum value of 1, each point shadows their neighbours strictly along its normal vector.
Ambient receiver normalCoefficient indicating if the points can be shadowed by other points from all directions or only along their normal vectors.
  • By the minimum value of 0, each point receives the shadow from all directions.
  • By the maximum value of 1, each point receives the shadow only along its normal vector.
Ambient scaleBrightness of shadows:
  • By the minimum value of 0, the ambient occlusion shadowing is the lightest.
  • By the maximum value of 1, the ambient occlusion shadowing is the darkest.
Ambient powerPower of the ambient occlusion. For this parameter the Ambient scale should not equal 0.
  • The higher the value, the darker ambient occlusion shadowing is and the more contrast the rendered image appears.

The following settings are used for the screen-space indirect illumination:

Indirect Illumination Settings

Notice
The settings of the screen-space indirect illumination can be adjusted if the Global Illumination is enabled on the Main Settings panel.
Light screen radiusDistance in the screen space, within which the geometry and its color are sampled to compute indirect illumination. The number of sampled points is strictly defined and depends on shader quality.
  • By the minimum value of 0, indirect illumination is not calculated.
  • The maximum value of 0.2. However, when the area of sampling is large, the result appears dispersed and the performance decreases.
Light sample radiusDistance for each of the points in the world space, up to which they can illuminate their neighbouring points:
  • By low values, each point can illuminate with its color only the points in the close range.
  • By high values, each point shares its color with farther positioned points.
Light perspectivePerspective compensation for the light (directional) occlusion. When at the far distance, the sample radius will be automatically increased, if a value higher than 1 is set.
Light attenuationCoefficient that compensates for falloff of the light (directional) occlusion with a distance, making it more prominent. The lower the value, the less the global illumination effect fades out with the distance.
Light thresholdDepth threshold used to filter light (directional) occlusion. It specifies the maximum possible depth between sampled points in two pixels, to filter them together. This option allows you to have sharp edges, while having smooth global illumination on flat surfaces.
Light emitter normalCoefficient indicating if the points can illuminate their neighbouring points in all directions or only along their normal vectors.
  • By the minimum value of 0, each point is like an omni light that illuminates in all directions.
  • By the maximum value of 1, each point illuminates their neighbours strictly along its normal vector.
Light receiver normalCoefficient indicating if the points can be illuminated by other points from all directions or only along their normal vectors.
  • By the minimum value of 0, each point receives the color from all directions.
  • By the maximum value of 1, each point receives the color only along its normal vector.
Light scaleBrightness scale for indirect illumination.
  • The higher the value, the lighter the colors of indirect illumination will be.
Light powerPower of indirect illumination.
  • The higher the value, the darker the colors of indirect illumination will be.

Scattering

The tab contains settings of atmospheric light scattering.

Notice
Light scattering and resulting sky color directly depends on camera's far clipping settings.
In the editor and in the world camera clipping settings may differ, causing different colors.

Sun colorThe color of the solar disk.
Ray colorThe color used for the Rayleigh scattering (scattering of small molecules).
Mie colorThe color used for the Mie scattering (scattering of larger particles).
Inner angleThe angle forming the inner circle of the solar disk, which has the defined brightness.
  • The value has to be smaller than the outer angle as the difference between them determines the solar disk size.
Outer angleThe angle forming the fading outer circle of the solar disk.
  • The value has to be greater than the inner angle as the difference between them determines the solar disk size.
RefractiveAtmosphere refractive index (for Rayleigh scattering):
  • The refractive index of air is 1.0003 in the visible spectrum.
DensityThe number of molecules per unit volume (for Rayleigh scattering):
  • The number of molecules per unit volume in air at standard temperature and pressure is considered 2.54*1025.
DepolarizationThe depolarization factor (for Rayleigh scattering):
  • The value of 0.035 is considered standard for air.
TurbidityThe atmosphere turbidity (for Mie scattering):
  • The higher the value, the higher the amount of haze in the atmosphere.
Ground levelThe ground zero level:
  • Negative values allow simulating higher atmosphere layers.
  • Positive values simulate atmospheric conditions below sea level.
AerialAerial perspective scale:
  • The higher the value, the higher the atmospheric curvature. For example, high values allow to simulate thin atmosphere and darken the sky.
Ray heightThe height in units up to which Rayleigh scattering is spread.
Mie heightThe height in units up to which Mie scattering is spread.
AngularityA coefficient that compensates for the angular distribution of Rayleigh light scattering. This compensation allows creating a uniformly lit sky instead of a physically-correct one that depends on the sun angle.
ThresholdDistance threshold for Mie scattering:
  • The higher the value, the closer distance to the camera that will be affected by Mie scattering.
DirectionDirection of light scattering.
DefaultThe default scattering settings.
GreensteinThe directionality factor of light scattering by small particles (for Mie scattering):
  • By the minimum value of 0, the light is scattered isotropically all over the horizon.
  • By the maximum value of 1, the Mie scattering is concentrated around the sun.
EnergyThe intensity of the sunlight.
  • The higher the value, the more brighter the sky color.
PowerScattering power that determines the distance to apply scattering attenuation (both Mie and Rayleigh):
  • The default value of 1 means the settings-based scattering attenuation.
  • By higher values, the attenuation starts further towards to the horizon.
  • By lower values, the attenuation starts closer to the camera.
SunThe brightness of the solar disk.
RayRayleigh scattering intensity.
MieMie scattering intensity.
EarthSets all of the scattering parameters to the Earth's ones.

Postprocess

The tab contains settings for rendering post-processes: motion blur, volumetric shadows and glow.

Refraction redRefraction displacement for red channel (based on the refraction texture of refractive materials). It can be used to create light dispersion (chromatic aberrations).
  • By the default value of 0, there is no dispersion for refracted light in red channel.
No refraction dispersion
No refraction dispersion
Refraction Red and Green
Dispersion per channel: Red = 0.8, Green = 0.9, Blue = 1
Refraction greenRefraction displacement for green channel (based on the refraction texture of refractive materials). It can be used to create light dispersion (chromatic aberrations).
  • By the default value of 0, there is no dispersion for refracted light in green channel.
Refraction blueRefraction displacement for blue channel (based on the refraction texture of refractive materials). It can be used to create light dispersion (chromatic aberrations).
  • By the default value of 0, there is no dispersion for refracted light in blue channel.
Motion blur linearAmount of the motion blur when the player moves linearly.
  • The higher the value, the more blurred the screen image will be when the camera moves in any direction.
Motion blur angularAmount of the motion blur when the player rotates.
  • The higher the value, the more blurred the screen image will be when the camera turns in any direction.
Motion blur velocityAmount of the motion blur for the moving physical objects (with physical bodies assigned).
  • The higher the value, the more blurred the objects will appear when moving.
Maximum velocityThe maximum possible amount of the motion blur for moving physical objects. When their body velocity exceeds the the set value, they still will not be blurred any further.
Volumetric exposureThe exposure used for rendering volumetric shadows:
  • By the minimum value of 0, there are no volumetric shadows visible.
  • By the maximum value of 1, there volumetric shadows are the most dark and distinct.
Volumetric lengthThe length of volumetric shadows:
  • By the minimum value of 0, there are no volumetric shadows visible.
  • By the maximum value of 1, the volumetric shadows spread along the furthest distance, but are light in color.
Volumetric attenuationHow fast volumetric shadows fade out along their length:
  • By the value of 1 there is no additional attenuation.
  • The lower the value, the smaller the shadow is.
Glow thresholdThe brightness threshold, which is used to detect, if an object is bright enough to produce glow:
  • By the minimum value of 0, all bright objects are rendered glowing.
  • The higher the value, the more bright the object should be to produce glow.
Glow smallBrightness of the small-radius glow. This glow effect is rendered most close to the glowing surface and creates object-shaped highlight.
Small-radius glow
Small-radius glow
Glow mediumBrightness of the medium-radius glow. This glow effect creates a medium-sized halo close to the glowing surface.
Medium-radius glow
Medium-radius glow
Glow largeBrightness of the large-radius glow. This glow effect creates a large-sized halo around the glowing surface.
Large-radius glow
Large-radius glow

DOF

The tab contains settings used to create the depth of field effect.

Effect is represented as Gaussian blur DOF and set via render_dof 1 console command.

To create the DOF effect in your application, you need to do three basic things:

  1. Set the point of focus with the Focal distance.
  2. Set the length of in-focus area with non-zero Near blur range (before the point of focus) and Far blur range (after the point of focus).
  3. Set the Far blur radius and Near blur radius.

Focal distanceThe focal distance of the camera. It sets a line where objects are in focus and can be seen clearly.
  • The higher the value, the further from the camera the in-focus area will be.
  • Focal distance is only a reference point. The width of the in-focus area is defined by Near blur range and Far blur range parameters.
Notice
If the Focal distance is set to 0 (i.e. objects right in front of the camera are in focus), there is no near blurring distance. It means that all the other Near parameters are ignored.
Small Focal distance
Focal distance = 10 units
Large Focal distance
Focal distance = 30 units
Far blur rangeFar blur range is measured from the Focal distance point and away from the camera. It sets the length of the area (in units) within which objects are focused out, i.e. become blurred in the background.
  • The higher the value, the farther from the camera spreads the transition area between non-blurred area to the blurred one. As a result, you can see more objects in focus.
  • By the minimum value of 0, there is no smooth transition. Everything that is farther than the Focal distance point, is abruptly blurred.
    Notice
    If the Near blur range is also equal to 0, there will be no in-focus area at all.
Small Far blur range
Far blur range = 4 units
Large Far blur range
Far blur range = 13 units
Far blur radiusFar blur radius is used for the out-of-focus objects that are outside Far blur range.
  • The higher the value, the more blurred the out-of-focus areas are.
Small Blur radius
Blur radius = 0.5
Large Blur radius
Blur radius = 2
Far blur powerFar blur power acts the same way as the Near blur power — it determines how fast the objects become blurred across the far blur range.
  • By low value, objects become blurred right after the Focal distance point.
  • By high the value, it takes long distance for objects to become blurred.
Far focal rangeFar focal range determines the area between the focal point and objects in crisp focus (not blurred).
Far focal scaleFar focal csale is an interpolation coefficient between a non-blurred screen image and a blurred one. Shifts the Far blur range closer to the camera.
  • The higher the value, the less is the Far blur range and the closer the blurring starts to the camera.
Far focal powerFar focal power also acts the same way as the Near focal power. It allows to adjust the DOF across the far blur range. But unlike the Far blur power, it tweaks both the rate of blurring and intensity of bokeh at the same time.
  • By low value, objects become out-of-focus right after the Focal distance point.
  • By high the value, they stay in-focus up to the very end of the far blur range.
Near blur rangeNear blur range is measured from the Focal distance point towards the camera. It sets the length of the area (in units) within which objects are focused on, i.e. become clearly seen.
  • The higher the value, the closer to the camera spreads the transition area between blurred area to non-blurred one. As a result, you can see more objects in focus.
  • By the minimum value of 0, there is no smooth transition. Everything that is closer than the Focal distance point, is abruptly blurred.
    Notice
    If the Far blur range is also equal to 0, there will be no in-focus area at all.
  • If the Focal distance is set to 0, Near blur range parameter is ignored.
Small Near blur range
Near blur range = 4 units
Large Near blur range
Near blur range = 13 units
Near blur radiusNear blur radius is used for the out-of-focus objects that are outside Near blur range.
  • The higher the value, the more blurred the out-of-focus areas are.
Near blur powerNear blur power determines how fast the objects become blurred across the near blur range.
  • By low value, objects become blurred very close to the Focal distance point.
  • By high the value, it takes long distance for objects to become blurred.
Small Near blur power
Near blur power = 0.2
Large Near blur power
Near blur power = 1.5
Near focal rangeNear focal range determines the area between the focal point and objects in crisp focus (not blurred).
Near focal scaleNear focal csale is an interpolation coefficient between a non-blurred screen image and a blurred one. Shifts the Near blur range closer to the camera.
  • The higher the value, the less is the Near blur range and the closer the blurring starts to the camera.
Near focal powerNear focal power also allows to adjust the DOF across the near blur range. But unlike the Near blur power, it tweaks both the rate of blurring and intensity of bokeh at the same time.
  • By low value, objects become out-of-focus very close to the Focal distance point (right before it).
  • By high the value, they stay in-focus up to the very end of the near blur range.
Small Near focal power
Near focal power = 0.2
Large Near focal power
Near focal power = 1.5

Color

The tab contains settings for color correction of the scene.

BrightnessCorrection of the overall scene brightness:
  • Positive values lighten the colors up to white.
  • Negative values darken the colors up to black.
ContrastCorrection of the overall scene contrast:
  • Positive values increases the contrast.
  • Negative values decreases the contrast.
SaturationCorrection of the overall scene saturation:
  • The higher the value, the more saturated and vibrant the colors are.
  • The lower the value, the duller and more colorless the colors are.
GammaCorrection of the overall scene gamma.
WhiteWhite balance of the scene.
LUT textureThe loading, viewing or clearing of the Look-Up Table texture for color transformation.
Last update: 2017-07-03