---
title: "UNIGINE 2.1: New Sky, Increased Depth Precision, Improved AA, Optimizations, Bugfixes"
version: "2.1"
release_date: 2015-11-20
lang: en
slug: "unigine2.1"
entry_id: 125
author: "binstream@unigine.com"
source: "20151120-unigine-2.1/index.xml"
source_url: "https://developer.unigine.com/devlog/20151120-unigine-2.1"
---

# UNIGINE 2.1: New Sky, Increased Depth Precision, Improved AA, Optimizations, Bugfixes

## Key Changes

- Improved atmospheric light scattering: easy setup, more predictable visuals, better quality.
- Increased depth buffer precision.
- Rendering performance optimizations.
- Improved antialiasing quality.
- Introduced ObjectText.
- Support for OS X El Capitan.
- Support for a single licensing server instance per LAN with auto-discovery.
- "Assemble project" feature in SDK Browser.
- Support for both release and debug engine builds in the editor.
- Introduced new set of samples.
- A lot of bugfixes.

![](https://developer.unigine.com/devlog/20151120-unigine-2.1/scattering_2_1.jpg)

## Improved Rendering of Atmosphere

Atmosphere rendering has been completely reworked in this release. Right now it is based on interpolation between several LUTs (Look-Up Textures) describing different states of the sky during the day. Improving realism for clouds is planned as the next step.

![](https://developer.unigine.com/devlog/20151120-unigine-2.1/scattering_2_composed.jpg)

### Visual Quality

The new sky brings dynamic environment lighting and fast sky reflections without the need for environment probes. It is also possible to use the high-quality photos as a base for the LUT gradients.

Light scattering now works correctly with particle systems, volumetric objects and multi-layered transparent objects.

Haze rendering has been improved as well. Added the *Max distance* parameter, which sets the distance of 100% dense haze concealing all the distant objects. There are also two different modes of haze rendering:

- *render_haze 1* is to use solid color
- *render_haze 2* is to use color from the sky LUT (recommended for better realism)

### Time of Day and Weather

To change the time of the day, simply rotate the Sun or Moon object and the sky rendering will be automatically update respectively (previously, one had to use the Tracker system for that).

To simulate mixed weather conditions, it is currently allowed to blend between three environment presets.

### Sun and Moon

The sky now supports rendering of the Moon and the Sun at the same time.

The "Scattering" option in the WorldLight object provides the following lighting types:

- *None* — render the atmosphere as if there were no global lights, that is, there will be no sky color gradient in any direction
- *Sun* — render the atmosphere in accordance with the Sun's lighting
- *Moon* — render the atmosphere in accordance with the Moon's lighting

![](https://developer.unigine.com/devlog/20151120-unigine-2.1/lightworld.png)

There is also a new *Disable angle* setting for *LightWorld* defining a critical angle above the horizon, where the light source is still enabled.

### Easy Setup

Setting up sky is much easier with the new system: no more esoteric parameters. The new light scattering is also more predictable: you get desired results with less iterations. Light scattering settings have been moved to *Rendering settings / Environment* in the editor.

![](https://developer.unigine.com/devlog/20151120-unigine-2.1/scattering_2_ui.jpg)

There are nice ready-to use presets (clear sky, overcast, indoor dark lighting) available as well.

## Increased Depth Precision

Aerospace simulation often requires an ability to render very close and very distant objects in the same frame without Z-fighting or any other depth buffer issues. We have increased depth precision thanks to the logarithmic depth buffer (to enable, use the *render_logarithmic_depth 1* console command), so now UNIGINE is even a better fit for planetary rendering than before.

![](https://developer.unigine.com/devlog/20151120-unigine-2.1/planets.jpg)

There is a nice [3rd-party demo](http://threejs.org/examples/webgl_camera_logarithmicdepthbuffer.html) explaining advantage of logarithmic depth buffer over normal one.

## Improved Antialiasing

- Increased visual quality of TAA in motion.
- FXAA has been integrated into the engine.
- Anti-aliasing mode is now controlled with `render_antialiasing` console command:
    - 0 - disable
    - 1 - FXAA
    - 2 - TAA
- Added bright pixels removal for TAA.
- Fixed ghosting effect on vegetation.

## Introducing ObjectText

ObjectText is a simple node for placing a flat text in 3D space. The text is rendered into a texture and then overlayed over a flat polygon. It uses trilinear filtering and mipmaps for correct display of the text at any distance. There is no noise influence to the object and it is not distorted by the TAA.

As a font you can use either TrueType (TTF) or a texture atlas with letters.

![](https://developer.unigine.com/devlog/20151120-unigine-2.1/objecttext.jpg)

## Performance Optimizations

- Scenes with a single *LightWorld* instance gained extra performance optimizations.
- Increased speed of decals rendering. The `render_rwtextures` console command allows you to enable/disable rendering optimization (requires OpenGL 4.2 core profle, not supported on OS X; for DirectX 11 you should set *render_optimization_normalbuffer 1* before *render_rwtextures 1*).
- Drastically increased speed of grass generation.
- Increased speed of the materials loading.

## Other Renderer Changes

- Removed permutation limit (65535 combinations) in shaders: now it is possible to add a lot of custom material states into shaders (up to 4 billions of combinations).
- Restored the triplanar material options in the mesh_base material, for meshes with auto-generated UV coordinates (*States -> Base map/Normal map -> Triplanar*). The corresponding parameters are: *Base/Detail triplanar pow*.
- Fixed rendering of the `mesh_leaf_base` and `mesh_stem_base` materials.
- Fixed DecalMesh and ObjectMeshDynamic behavior on mesh change.
- Default `terrain_base` textures are now white.
- Fixed multiplication blending for decals: the diffuse color now influences the microfiber effect.
- Added the *Deferred* state to the `mesh_leaf_base` and `mesh_stem_base` materials.
- Fixed tweaking of the LightOmni *Shadow size* parameter.
- Improvements in Visualizer (depth bias fixed, a couple new methods, etc).
- Fixed shadows noise.
- Added the `render_shadow_shafts_quality` console command allowing setting the texture size for the shadow shafts effect (0 — the quarter of the screen; 1 — the full screen).
- Improved shadows cascade blending.
- Fixed the SSAO ghosting effect.

## Editor

- Fixed FBX import in *Merge static meshes* mode.
- Improved undo/redo system.
- Added visualization of the G-buffer data (*Rendering* panel -> *Buffers*).
- Hotkey presets can now be located in the folders specified by the `-extern_path` instruction.
- Changed the *Background alpha mask* parameter in Video Grabber into toggle.
- Removed the *Color* option in the Terrain Grabber (the *Diffuse* option is used instead).
- Fixed incorrect textures import in the Landscape plugin.
- Fixed behavior of the `editor_quit` console command: Qt-based windows will also be closed.
- Deleted the Decal Grabber plugin.
- Fixed node cloning.
- Fixed textures orientation in the Terrain Grabber.
- Default UnigineEditor graphic API is now DirectX 11.
- Improved Asset Browser:
    - Added assets copying and renaming.
    - Added folder creation.
    - Added items zooming.
    - Increased speed of assets loading and reloading.
    - Fixed large memory consumption issue on lots of FBX files import.
    - Added standard hot keys (arrows, Del, F2, etc.).
- Increased maximum value of Animation FPS to 9999 on the FBX import.
- Added support for non-ASCII symbols for Windows startup options.
- Improved meshes streaming when editor is loaded.

## SDK Browser

- Only one running instance of the SDK browser in the local network is now required (it will be automatically discovered by other machines if SDK Browser is running on Windows and Linux, on OS X it is required to specify *-licensing_host IP* parameter on other machines) for users with per-company licenses.
- Added an *Assemble project* option allowing you to create ready-to-ship builds (*Project / Other Actions*).
- Added support for the OS X El Capitan.
- Added Debug/Release Editor option allowing you to choose the editor version when editing the project (available in the additional menu under the *Edit Content* button of the project).
- Added global settings for the Quad Buffered Stereo technology.
- Improved errors notifications.
- Improved upgrading of project's content.
- Automatic update of screenshots in the *Projects* section on exit from the editor.
- Bug fixes and improvements.

![](https://developer.unigine.com/devlog/20151120-unigine-2.1/browser-assemble.jpg)

## C++ and C# API

- Added `[ObjectGrass](https://developer.unigine.com/docs/cpp_api/reference/api_objectgrass_class)` interface.
- Added `[ObjectSky](https://developer.unigine.com/docs/cpp_api/reference/api_objectsky_class)` interface.
- Added `[ObjectMeshClutter](https://developer.unigine.com/docs/cpp_api/reference/api_objectmeshclutter_class)` interface.
- Improved *Ptr<>* implementation: it can now be stored in Qt containers.
- Added `[getSHA1()](https://developer.unigine.com/docs/cpp_api/reference/api_blob_class#c_getSHA1)`, `[getMD5()](https://developer.unigine.com/docs/cpp_api/reference/api_blob_class#c_getMD5)` and `[getCRC32()](https://developer.unigine.com/docs/cpp_api/reference/api_blob_class#c_getCRC32)` methods to the *Blob* class returning corresponding checksums.
- Fixed crash on calling `getSubTree()` and `getFormattedSubTree()` methods of the *Xml* class when the .xml is empty.
- Added `[findChild()](https://developer.unigine.com/docs/cpp_api/reference/api_xml_class#c_findChild_constcharm)` method to the *Xml* class. It searches for the Xml node child by its name.
- Added `[set/getViewportCorrection()](https://developer.unigine.com/docs/cpp_api/reference/api_player_class#c_setViewportCorrection_int)` methods to the *Player* class for making the projection matrix unaltered by different viewport aspect ratios (**1** by default). This could be useful for custom screen projections.
- Added `[removeSurface()](https://developer.unigine.com/docs/cpp_api/reference/api_objectmeshdynamic_class#removeSurface_int)` and `[removeSurfaces()](https://developer.unigine.com/docs/cpp_api/reference/api_objectmeshdynamic_class#removeSurfaces_constcharm)` methods to the *ObjectMeshDynamic* class removing surfaces by the name/index.

## UnigineScript

- Added the `[is_absolute()](https://developer.unigine.com/docs/scripting/core/file#is_absolute_string)` method to the file system functions. It lets you check whether the given path is absolute.
- Added the `[set/getViewportCorrection()](https://developer.unigine.com/docs/scripting/library/players/class.player#getViewportCorrection_int)` methods to the *Player* class that let you enable or disable the aspect corrections of the projection matrix (1 by default).
- Fixed crash on calling the `getSubTree()` and `getFormattedSubTree()` methods of the *Xml* class.
- Added new scattering functions to the `engine.render` class:
    - `RENDER_ENVIRONMENT_NUM_PRESETS` variable setting the number of environment preset.
    - `[engine.render.set/getEnvironmentHazeColor()](https://developer.unigine.com/docs/scripting/library/engine/engine.render#engine.render.getEnvironmentHazeColor_int)` setting/returning the haze color.
    - `[engine.render.set/getEnvironmentHazeDensity()](https://developer.unigine.com/docs/scripting/library/engine/engine.render#engine.render.getEnvironmentHazeDensity_int)` setting/returning the haze density.
    - `[engine.render.set/getEnvironmentHazeMaxDistance()](https://developer.unigine.com/docs/scripting/library/engine/engine.render#engine.render.getEnvironmentHazeMaxDistance_int)` setting/returning the distance starting at which the haze effect appears.
    - `[engine.render.set/getEnvironmentHazeMode()](https://developer.unigine.com/docs/scripting/library/engine/engine.render#engine.render.getEnvironmentHazeMode)` setting/returning the mode of the haze effect: `RENDER_HAZE_DISABLED` | `RENDER_HAZE_SCATTERING` | `RENDER_HAZE_SOLID`.
    - `[engine.render.set/getEnvironmentPresetIntensity()](https://developer.unigine.com/docs/scripting/library/engine/engine.render#engine.render.getEnvironmentPresetIntensity_int)` setting/returning the intensity of the given preset.
    - `[engine.render.set/getEnvironmentScatteringBaseLUTName()](https://developer.unigine.com/docs/scripting/library/engine/engine.render#engine.render.getEnvironmentScatteringBaseLUTName_int)` setting/returning the path to the base LUT texture (the texture defining the base color of the sky).
    - `[engine.render.set/getEnvironmentScatteringGroundColor()](https://developer.unigine.com/docs/scripting/library/engine/engine.render#engine.render.getEnvironmentScatteringBaseLUTName_int)` setting/returning the color set of the imitated landscape (ground).
    - `[engine.render.set/getEnvironmentScatteringGroundLUTName()](https://developer.unigine.com/docs/scripting/library/engine/engine.render#engine.render.getEnvironmentScatteringGroundLUTName_int)` setting/returning the path to the ground LUT texture (the texture imitating lighting and reflections from the landscape).
    - `[engine.render.set/getEnvironmentScatteringMieLUTName()](https://developer.unigine.com/docs/scripting/library/engine/engine.render#engine.render.getEnvironmentScatteringMieLUTName_int)` setting/returning the path to the Mie LUT texture (the texture for setting the Mie light).
    - `[engine.render.set/getEnvironmentTextureColor()](https://developer.unigine.com/docs/scripting/library/engine/engine.render#engine.render.getEnvironmentTextureColor_int)` setting/returning the environment color multiplier.
    - `[engine.render.set/getEnvironmentTextureName()](https://developer.unigine.com/docs/scripting/library/engine/engine.render#engine.render.getEnvironmentTextureName_int)` setting/returning the path to the cubemap defining the environment color.
- Removed the following `engine.render` functions: `getScattering()`, `set/getAmbientColor()`, `set/getBackgroundColor()`, `set/getEnvironmentTextureName()`, `set/getEnvironmentCoefficients()`, `set/getEnvironmentExposure()`, `set/getScatteringSunColor()`, `set/getScatteringRayColor()`, `set/getScatteringMieColor()`, `set/getScatteringInnerAngle()`, `set/getScatteringOuterAngle()`, `set/getScatteringRefractive()`, `set/getsetScatteringDensity()`, `set/getScatteringDepolarization()`, `set/getScatteringTurbidity()`, `set/getScatteringDirection()`, `set/getScatteringGround()`, `set/getScatteringAreal()`, `set/getScatteringRayHeight()`, `set/getScatteringMieHeight()`, `set/getScatteringGreenstein()`, `set/getScatteringAngularity()`, `set/getScatteringThreshold()`, `set/getScatteringEnergy()`, `set/getScatteringPower()`, `set/getScatteringSun()`, `set/getScatteringRay()`, `set/getScatteringMie()`.
- Removed the following *Material* class functions: `set/getPostRefraction()`, `set/getPostScattering()`, `set/getLightBlending()`.

## Other Engine Changes

- Added support for OS X El Capitan.
- Added C++11 and microprofile by default on the OS X.
- Added xcodeproj for building the engine and main applications.
- Unified screenshots capturing in engine and editor:
    - Screenshots are taken on the F12 hot key.
    - Default saving paths: *bin/screenshots* and *data/screenshots* correspondingly.
- The `-engine_log` startup CLI can now accept any paths (not only relative ones).
- Fixed calculation of mesh projections in Syncker.
- To get the final shader view after preprocessing specify `EXPORT_SHADER(file_name)` (relatively to the data path).
- Fixed ObjectMeshSkinned animation when loading the `.anim` file with the same name.
- A lot of bugfixes.

## Introducing New Samples

The new Samples demo contains various examples on using the built-in UNIGINE objects with explanation of different settings. These samples are artists-friendly - feel free to take a look into the content. You can find them in the *Samples / Demos* section of the SDK browser.

### Decals

![](https://developer.unigine.com/devlog/20151120-unigine-2.1/samples2_decals.jpg)

- Usage examples showing different decals use cases
- Decal materials blending types
- Difference between *DecalProj*, *DecalOrhto* and *DecalMesh*

### Materials

![](https://developer.unigine.com/devlog/20151120-unigine-2.1/samples2_materials.jpg)

- Demonstration of material parent-child hierarchy and dependencies
- Different samples of the PBR material usage

### Light Sources

![](https://developer.unigine.com/devlog/20151120-unigine-2.1/samples2_lights.jpg)

- Demonstration of *LightOmni*, *LightWorld* and *EnvironmentProbe*
- Different settings of *LightOmni*
- Different settings of *LightProj*

### Particles Systems

![](https://developer.unigine.com/devlog/20151120-unigine-2.1/samples2_particles.jpg)

- Particles composite effect
- Forces, noises and deflectors influencing particles
- Particles materials and settings
- Particles parameters
- Particles types
- Particles emitter types

The set of samples will be extended in further releases.

## Documentation

- Added articles on the new UNIGINE shaders wrapper, the Unified UNIGINE Shader Language (UUSL):
    - [UUSL data types and common intrinsic functions](https://developer.unigine.com/docs/code/wrapper/types)
    - [UUSL parameters](https://developer.unigine.com/docs/code/wrapper/parameters)
    - [UUSL textures](https://developer.unigine.com/docs/code/wrapper/textures)
    - [UUSL semantics](https://developer.unigine.com/docs/code/wrapper/semantics)
    - [Creating of custom deferred shader tutorial](https://developer.unigine.com/docs/code/wrapper/create_deferred)
- Added article on the new [scattering](https://developer.unigine.com/docs/principles/render/scattering/).

### Localization

We're working towards localizing the documentation into Russian and Chinese.

Russian:

![](https://developer.unigine.com/devlog/20151120-unigine-2.1/docs-ru.png)

Chinese:

![](https://developer.unigine.com/devlog/20151120-unigine-2.1/docs-cn.png)

At the moment only some articles are translated, more to come.
