UNIGINE 2.7.1: Improved Voxel GI, Forced Shaders Compilation, Water Performance Optimizations, Stabilization
- Forced shaders compilation
- Improved voxel GI
- Water performance optimizations
- Improved support for large-scale models
- Improved editor UI
- Experimental HLA protocol support
- Added support for HTC Vive Pro
- Overall engine improvements and bugfixes
Although this release is mainly a maintenance one, it also introduces some new features.
Forced Shaders Compilation
Precompilation of all shaders is an important feature that guarantees, that at the time your project is completed and final builds are ready to be handed over to customers, you will have a complete shader cache. This significantly reduces the number of freezes in the final release build and smooths your application’s framerate.
You can use it in one of the following ways:
Constant background precompilation
When this button is enabled, each time you create a new material, you’ll see the following message on shader compilation in the viewport:
This option guarantees, that you always have a complete shader cache for the selected graphics API.
Precompilation on demand
Sometimes constant background compilation of shaders may disturb and slow down your work, this is typical for some engines. UNIGINE lets you disable shaders precompilation. You can enable it just before measuring performance of your final build. This mode is recommended for graphics programmers to save time on recompilation when changing states of materials.
For more detailed information please refer to the Forced Shader Compilation article.
The option described above required some other changes to be made.
- Some rendering settings parameters (gbuffer, shading quality, render parallax) affected global shader defines which resulted in re-compilation of all shaders. We removed such parameters from rendering settings to make shaders globally world-independent.
- Removed all toggles for buffers from the Rendering -> Buffers menu (except for Auxiliary and Color16f)
- Shadows options via Rendering -> Shadows menu now affect only opaque objects. All corresponding shadows settings for transparent objects (such as Soft Shadows, Lerp Cascades, Omni Jitter etc.) are now adjusted per-material via the new Shadows group in the mesh_base material, which becomes available as you make your material transparent. Transparent objects are rather resource consuming, thus, having an ability to tune them separately enables you to squeeze more performance from your project (gives you more room for performance optimization)
Improved Voxel GI
Voxel Probe lights now support additive blending mode. This option offers more flexibility in lighting control. You can use it to blend lighting of several voxel probes together and control them separately (e.g. make a separate voxel probe for an indoor emissive light source and blend it with another voxel probe with lighting baked from the sky, having the ability to enable and disable them separately).
Please note, that Voxel probes with additive blending enabled cannot be used as insets to add lighting details (e.g. creating a small high-detail voxel probe inside a large low-detail one). Such probes do not replace each other, as they are blended instead.
You can also use Voxel Probes to bake lights for illuminating your scene at night time instead of using standard light sources. This approach significantly improves performance and was used in the updated Oil Platform and Oil Refinery demos.
Added an ability to control baking of all types of light sources (World, Omni, Proj, Voxel Probe and Environment Probe) as well as lighting from the sky and emissive materials into a Voxel Probe. This feature is available via the corresponding visibility options, which can be used together with additive blending to provide more flexibility in light baking. Thus, you can make voxel probes independent of each other and combine them to produce some sort of dynamic GI effect. E.g. you create a room with several lights inside and light coming from the outdoor environment, being able to turn them on and off individually in any combination.
Improved Sun Color Influence
Improved logic of the UseSunColor option. To bake lighting from the sky separately, it is recommended to enable baking visibility for the sky only, while disabling it for other light sources.
Improved Support for Large-Scale Models
As UNIGINE supports huge worlds, large-scale models are often imported (e.g. a road network or a city represented as a single mesh). While UNIGINE works with 64-bit coordinate precision for placing objects, each individual mesh uses 32-bit precision for coordinates of its own vertices (starting from a local origin, pivot point). To compensate that, a set of new useful options for geometry import was added.
Split by Grid
Very large meshes (more than 10000 units) can be splitted into multiple separate ones. To do so, just enable the Split by Grid option and set the size of the grid cell to be used for mesh splitting. Note, that this option does not split surfaces, they are always treated as a whole.
Repivot to Center
The same types of artefacts (jitter, etc.) can be eliminated for meshes having their geometry located too far from their pivot. Use the Repivot to Center option to place the pivot point of the generated mesh to its center.
Skip Empty Nodes
Complex CAD models may contain a lot of empty nodes, resulting in an overloaded world hierarchy. You can enable the Skip Empty Nodes option to ignore them.
Water Performance Optimizations
We refactored water and improved overall performance giving you more options to tweak it even more. Calculation of normals was improved and became 25% faster.
Optimized Field Shoreline, now it is more performance-friendly.
Water performance tuning has become more flexible with a set of new states of the water_global_base material, which can be disabled where possible to gain performance:
- rendering of wave geometry available via the Normals and Geometry states
- smoothing of caustics available via the Caustic Distortion state
- rendering of foam for shoreline areasavailable via the Foam state
- improved interpolation between the adjacent pixels of the shoreline texture used to reduce stepping artifacts when looking at the waterline available via the High Precision state
Thus, you can simulate shoreline areas, viewed from a plane, by just enabling the foam effect while disabling geometry, caustics and improved interpolation as they are hardly noticeable with a significant increase of performance.
AppProjection Configuration Improvements
Advanced Warping Control
Projection setup has become more convenient. Now you can simply connect a laptop computer to a complex multi-projection setup and configure projections in just a several minutes using your keyboard only.
This is possible as we added keyboard control for warping settings. Now you can switch between control points using arrow keys and move them with the Ctrl key pressed. Adjustable screen parameters enable you to control each point of your projection with a pixel accuracy. You can also increase and decrease displacement amount to be used when moving points with arrow keys via A and Z keys respectively. Points are now moved in screen space coordinates regardless of image orientation (whether it is flipped or not), this means if you press left arrow - the point always goes left.
Added visualization of warping grid on the screen which significantly facilitates the process of debugging configuration of a multi-projector setup, this option is available via the Show Grid button.
You can now choose whether to display certain blend mask or not or change mask color, this can be used to configure overlapping regions and perform some color and brightness corrections while monitoring the final result.
Improved the structure of sections in the Settings window and added a lot of functions that were previously available from the console only to UI. Updated description of all available parameters and options including new ones is available in the Settings and Preferences section of UnigineEditor documentation.
Finding your assets has become much easier with a new Search option in the Asset Browser, just start typing its name, all matching assets will be displayed as you type.
The list of other improvements includes the following ones:
- Improved content validation time for project with large number of objects (30k+)
- FBX import:
- If you have an FBX file containing skeletal animation without any geometry, you can now import it to your UNIGINE project and use generated .anim files.
- Non-skinned bones can now be imported. Often it is necessary to use non-skinned bones stored in an FBX file just to attach other objects to them and animate these objects via bones, now it is possible via the Import Bones Without Skin option. Updated Soldier demo can serve as an example demonstrating this feature: the rifle is attached to the soldier via the WorldTransformBone node attached to a bone having no bindings to any skin vertex.
- Added the Correct Triangulation option that enables correct triangulation of meshes, NURBS and patches. Disabling this option decreases import time, but may lead to triangulation errors resulting in incorrect geometry.
- Fixed importing of FBX assets with mesh names containing reserved characters.
- Fixed updating of Node Reference instances in real time. Now, if you change an instance, other ones will be updated automatically without reloading a world.
- Improved Terrain Global UI - now you can enable/disable LODs and Details.
- Extended the list of objects that can be used by Randomizer: you can specify .node or .mesh files produced by FBX assets or FBX assets themselves. In the latter case, the .node files generated for the specified FBX assets will be used.
- Added the Visualizer Mode option to the Helpers panel. It allows switching between 3 modes of the visualizer via UnigineEditor interface.
- Improved primitive creators: increased decimal places for parameters values, the minimum value is set to 0.001.
- Fixed resetting of node selection when selecting files in the Asset Browser. Now, if you select a node or a surface and then select an asset in the Asset Browser (for example, a material to drag and drop to the selected node), the node/surface remain selected.
- Maximum texture size for which a preview will be generated in the Asset Browser is now limited to 257 MB.
- Fixed issue with replacing mesh in the ObjectMeshStatic/Skinned/Dynamic nodes. Now the list of surfaces is updated automatically after replacing the mesh.
- Fixed crash when specifying incorrect mesh name for ObjectMeshSkinned node.
- Fixed viewport controls freeze after node deletion.
- Improved assets importing: the last opened folder will be shown in the file browser window after clicking Import.
- Various minor bugfixes and improvements.
A number of features was added to the Landscape Tool making it more convenient.
- Added support for RGBA landcover data sources.
- Any channel of a landcover data source can be used as a map. When adding a tag, just set the type to Single channel and select the desired image channel, this channel will be interpreted as a mask and associated with the tag. This can be very useful when creating a synthetic terrain enabling you to store up to 4 different masks in a single file.
- Very often landcover data sources have insufficient density, which results in squared borders of grass-covered areas, etc. Now, you can use data from vector sources to generate landcover objects and detail masks. Just rasterize a vector source to a landcover with any density you need and use it as usually. This feature is available via the Create landcover mask button in the Parameters window, when a vector data source is selected.
- You can now create groups of data sources for each data layer, just right-click on a layer and select Add New Group. Thus, you can improve the structure of your data and manage all group members at once (add tags, modify parameters, etc.).
- Automatic parsing of landcover indices. All available indices for a landcover data source will be displayed in the drop-down list, so there’s no need to check color mapping in a third-party application.
- Tags and objects can now be renamed by simply double-clicking on them or pressing F2.
Improved Rendering of Ground Environment
Alpha channel of the environment texture is now used for blending instead of defining ground. Ground is defined by the ground lut and blended taking into account the ground color alpha. Default environment texture was replaced with a white transparent one. Default environment color alpha value was set to 255. Added a new environment_probe_default.dds texture to be used as a default by environment probes. Ground is now taken into account in both reflections and background (sky).
Blending of environment presets was also fixed to take into account ground lut textures of all presets including Preset 1 and Preset 2.
New WorldSplineGraph Node Placement Mode
WorldSplineGraph now has a new adaptive node placement mode. This mode represents a combination of stretching and tiling modes: source nodes are duplicated along the spline segment, but the length of each node (stretching) is determined by the curvature of the corresponding part of the segment. Thus, long nodes are placed along the straight parts of segments, while short ones - along the curved parts, providing a reasonable balance between the plausible look and performance. Moreover, you can now enable UV tiling for textures to improve the look of stretched nodes.
New parameters were added to the assignSegmentSource() method. This mode will be also added to the list of road generation options of the Landscape Tool in future releases.
Experimental HLA Support
Introducing a new experimental HLAClient plugin - the next iteration in implementation of HLA support in UNIGINE. High Level Architecture (HLA) is a general purpose architecture for distributed computer simulation systems. The plugin currently partially supports common HLA functionality (version 1.3) uses the CERTI, an open-source RTI, distributed under the GPL/LGPL licence.
As it’s just an early development stage only Windows x64 platform is currently supported.
HLA support will be further extended to include latest versions as well as OpenRTI.
Here is a list of basic features:
- Communication with other HLA Clients
- Handling basic events (Discover Object Instance, Reflect Attribute Values, Receive Interaction, Remove Object Instance) via callbacks
- C++ API
For more information on the HLAClient plugin please refer to the HLAClient plugin article.
Experimental IG Application Template
An Image Generator (IG) in a simulator typically uses a number of subsystems and requires a number of options and parameters to be set.
To facilitate the process of IG creation we added a new IG application project template, which performs initialization of required plugins with all necessary settings and can be used as a basis for your custom IG.
The template project can be found in the source/apps/main_ig folder.
HTC Vive Pro Support
All your existing UNIGINE projects supporting SteamVR are compatible with new HTC Vive Pro. However, please note that Vive Pro has a higher display resolution, and although no modifications are required, it is recommended to check your project's performance and optimize it accordingly.
Please note that by default SteamVr selects resolution based on your computer's performance. Therefore, for best image quality it is recommended to open the Video tab of the SteamVR settings window, enable Manual Override mode and set resolution to 100%.
Other Engine Improvements
- Optimized the GeodeticPivot object, now it affects performance of WaterGlobal, Clouds and TerrainGlobal objects only. Terrain geodetic flat position texture was moved from the GBuffer.
- Improved grass_base and grass_impostor_base materials: now you can stamp the grass flat according to the mask and cut out impostors by visibility mask.
- Added a new Planar Reflections Blur option to the mesh_base material which applies blur to the planar reflection texture making reflections look more plausible.
- Improved rendering of Field objects with Water Global.
- Improved interpolation for Syncker.
- Fixed incorrect occlusion query behavior due to clipping by the near plane.
- Fixed issue with Visibility Distances of TerrainGlobal LODs.
- Fixed incorrect rendering of the planar reflections for TerrainGlobal.
- Fixed parallax rendering for DecalMesh.
- Fixed rendering to texture with post-effect: now it takes viewport size into account.
- Fixed infinite loop on ObjectGrass/ObjectMeshClutter removal.
- Fixed crash when working with skinned meshes in Resource Editor.
- Fixed incorrect underwater illumination for Water Global.
- Impostors (billboards_impostor_base) now use the last row in the texture atlas.
- Added a VR emulation mode for HTC Vive Pro.
- Added support of GPU compression for 2d array textures.
- Added support of NVIDIA Quadro G-Sync.
- Fixed multiple minor issues.
- Added methods for detecting collisions with shapes and a new Contact class to API. So, now you can implement your own custom physics or a custom player.
- All callbacks were moved from Viewport to Render class, so the following replacement in your code should be made:
Viewport::CALLBACK_* -> Render::CALLBACK_*
- Added an ability to set font size for Visualizer::renderMessage*() methods.
- Added the global setting for disabling lens effects (Render::setLightsLensFlares()).
- Changed API for working with node directions (see the API Migration Guide).
- Fixed sound playback restart. To replay a sound from the start the following code is to be used:
sound->setTime(0); sound->play(); // in case if a sound was already played to the end
- The complete list of API changes is available in the API Migration Guide.
- 64-bit SDK Browser version will now be used by default on Windows platforms.
- Fixed issues with large demo projects, they can now be unpacked and launched via the Run button.
- Various bugfixes and improvements.
- Added a new video tutorial on Georeferenced Terrain Generation.
A new Georeferenced Terrain Generation Add-On containing a set of ready-to-use assets required for accomplishing this tutorial was added to SDK. All you need is just install the add-on and use the assets according to instructions given in the tutorial.
- The complete list of API changes is available in the API Migration Guide.
- The complete list of Console command changes is available in the Console Migration Guide.
- Added an article on Forced Shader Compilation.
- Added an article on Creating a Custom Import Plugin.
- Added an article on Camera Matrices.
- Updated the UUSL section.