Jump to content

UNIGINE 2.19: Major Optimizations, OpenXR, WebRTC Video Streaming, USD Support, Animation Improvements


Recommended Posts

Posted

Key Changes

  • Multi-threaded renderer that significantly enhances CPU-side performance
  • Engine startup loading optimization
  • Major optimizations to reduce RAM usage
  • Improved streaming system, including async node loading
  • Support for OpenXR
  • Upgraded character animation system (experimental)
  • Support for USD format export
  • Integration with .NET 8
  • SpiderVision plugin for multi-monitor/curved screen image output
  • Video streaming via WebRTC (experimental)

title_sm.jpg

Engine Startup Loading Optimization

Meshes and properties are now loaded asynchronously in separate threads in parallel with materials having a little to none impact on startup loading time, as it mainly depends on materials and File System initialization.

Loading of textures has also been optimized engaging more multithreading.

For a large-scale project with a lot of content these optimizations bring an average startup loading speedup from x1.4 to x1.9.

startup_initialization.jpg

By default this mode is enabled (async_init=1) but you can switch it off if needed.

Streaming of Packages

We have improved archived data streaming performance (contents of UNG and ZIP archives) making it faster and more memory-efficient with an ability to read archived files partially (partial mapping) providing up to x1.2 loading boost at startup due to faster headers processing and less RAM consumption. This feature is only supported for non-compressed packages with no password protection, other packages are managed as before.

The UNG file format has been changed to support new functionality along with removal of the 2Gb size-limitation for the files inside the archive (the size limitation has been removed for non-UNG packages as well). Overall startup initialization performance has increased.

ung_boost.jpg

Old-style UNG-archives are not supported in 2.19+ projects with an automatic migration tool available. However, automatic migration does not support password-protected UNG-archives, so you'll have to manually unpack them using a ung_x64 tool from the SDK version that was used for packing and repack them back in a new format using the ung_x64 tool from UNIGINE 2.19 SDK.

Async Loading of NodeReferences

Implemented deferred asynchronous loading for NodeReferences on loading a world providing an x1.3 world loading speedup and solving an issue with re-generating node IDs.

async_noderef.jpg

By default this mode is enabled (world_async_load_node_references=1) but you can switch it off if needed.

CPU Optimizations

performance.jpg

Implemented a multithreaded DX12 renderer significantly enhancing CPU performance by efficiently utilizing the power of all its cores providing an x2 CPU performance gain. Multithreaded rendering mode imposes some limitations on actions that can be performed at run-time: e.g.: during the rendering phase you cannot change settings that have impact on rendering of surfaces (like render_distance_scale, etc.), parameters of materials assigned to surfaces, as well as parameters of objects having impact or rendering.

render_218.jpg

render_218.jpg

You can switch back to single-threaded mode via the render_multithreaded = 0 console command if necessary.

VRAM and RAM Usage Optimization

Enhanced the UNIGINE allocator to improve management of RAM and VRAM allocations for an application, resulting in faster and more efficient allocation processes. The updated allocator features static and dynamic memory pools for optimized allocation and gathers statistics for small allocations to prevent memory leaks. Average reduction of the number of allocations comprises 15 times, saving up to hundreds of megabytes of RAM for a large-scale project.

memory_consumption.jpg

A major Streaming System update has improved memory management, reduced overall memory consumption and reduced spikes. New streaming settings have been added replacing the old ones, meaning that you'll have to re-adjust streaming configuration.

Mipmap streaming solution has also been implemented for textures, so the textures cache became unnecessary and will be removed in 2.19. The texture streaming system will now manage everything automatically, no additional user actions required.

Streaming of Skinned Meshes has also been improved. API has changed with all functions related to mesh animations moved from the Mesh class to a new MeshAnimation class. Some manual code migration is required in this respect (for more details see API Migration Guide).

A huge pack of minor optimizations here and there including will bring even more RAM savings.

Optimized memory consumption reducing memory consumption increase for long-time running applications.

ram_optimizations_long.png

UGUID Changes

UGUIDs were also optimized to reduce memory consumption - now a UGUID does not store a string, which makes it more lightweight as a key, reducing its size from 72 to 20 bytes. This optimization alone can save about 5% RAM consumption, for a large-scale project with a huge number of resources this may comprise tens to hundreds of megabytes (see below a memory profiler screenshot for one of our large projects).

uguid_profiler.png

Some manual code migration will be required in case your project contains UGUID management via API (see more details in API Migration Guide).

Materials Quality

material_switcher_h.gif

A new Materials Quality feature gives you more flexibility in maintaining quality-performance balance in your projects. It enables you to use different texture resolutions and even implement different sets of features inside your graph-based materials for different quality level values (Low, Medium, or high) selected globally. Simply add the Material Quality Switch node when building your graph and connect different implementation options to the corresponding ports. Different versions of materials will be generated automatically and used for the corresponding selected quality level.

Unique Lightmaps and Shadowmaps in Node References

unique_lightmaps_sm.jpg

Up to 2.18.1 all instances of geometry from Node References have shared a single common lightmap for each particular surface limiting the use of lightmapping for instanced objects in the scene. UNIGINE 2.19 brings you an ability to bake individual lightmaps as well as shadow maps for geometry stored inside separate instances of Node References, dropping these limitations to unleash the power of lightmapping.

Multi-Bounce for Dynamic Environment Probes

All dynamic reflections now support multiple bounces, so the probes will see and render themselves in reflections. Multi-bouncing is available for Planar Reflection Probes and dynamic Environment Probes.

Multiple Bounces: Off

render_218.jpg

Multiple Bounces: On

render_218.jpg

Advanced Color Control for Sky, Clouds, and Haze

We have added an extended control over the color of the sky, clouds, and haze via LUTs.

1_sm.jpg

2_sm.jpg

Other Rendering Improvements

A pack of different rendering improvements is also expected including the following:

  • Added a temporal filter for post-sensors to reduce noise from the SSRTGI effect.
  • Optimized denoiser removing artifacts in case of using half and quarter resolution of the Color Clamping Blur buffer.
  • A pack of DLSS and FSR upscalers improvements for PC and consoles.
  • We have significantly improved performance of the Local Tonemapper up to 1.5x-3x, with additional options to render it in Half and Quarter resolution.
  • Updated the Local Tonemapper with a new Effect On Dark Areas Gamma parameter.
  • Fixed an issue with SSHGI in reflections generated by Environment Probes.
  • Fixed visual artefacts at the surface of the Global Water object, in case it is a child of a Geodetic Pivot node.
  • Color clamping control has been added to the indirect interleaved buffer.
  • Fixed an issue with incorrect colors of clouds at night (scattering for the World Light source is set to Moon).
  • Fixed issues with lens flares for Projected and Omni light sources with physically based haze depending on light source rotation.

Integration with .NET 8

Added .NET 8 integration with much higher performance, C#12, better Garbage Collector, improved serialization/deserialization, and a lot more (see the complete list).

In case you use Microsoft Visual Studio for development, you should upgrade it to version 2022. You can download necessary .Net 8 files via this link.

Support for OpenXR

openxr_logo.png

Added support for OpenXR, an open standard aimed at unifying the AR/VR/MR software development for broader hardware reach, reducing the effort for porting or re-writing code, providing seamless integration across diverse platforms and devices. The shift does not require any significant code migration from users as the changes are mostly under the hood.

Current implementation is a baseline for supporting VR via OpenXR API, we will be adding more features regarding some OpenXR extensions in future.

The baseline implementation in 2.19 has the basic functionality like different HMDs, controllers, and runtimes support including support for Stereo Hidden Area.

Eye Tracking, Hand Tracking, Vive tracker support, as well as other types of input devices are on their way and to be expected in future updates.

SpiderVision Plugin

projection_setup_sm.jpg

We have united all major rendering output functionality related to displays, walls, and projectors, with edge blending warping, and other features earlier implemented in a set of different plugins (Wall, Projections, EasyBlend, etc.) into a single plugin called SpiderVision and replacing them all starting from 2.19. This makes the use of this functionality clearer, much more convenient, and reduces overhead (multiple classes, plugins, startup arguments etc.).

warp_wall_sm.jpg

Screens and projections configuration functionality implemented inside the Syncker has moved to the SpiderVision plugin as well. The format of config-files has changed, but a migration tool will convert old-style configurations into the new format. Some code migration will be required in case your application manages projections via API (Syncker::Projections class).

Quadro Sync Support

Added support for synchronization of frame rendering across multiple displays for systems using professional NVIDIA Quadro Sync graphics cards ensuring robust and accurate frame-to-frame synchronization on DirectX 12 and Vulkan. This feature is available in the Sim SDK edition. To enable synchronization simply use the render_quadro_sync 1 console command, or call Render::setQuadroSync(1) via API.

Video Streaming via WebRTC (Experimental)

Broadcasting audio data and video frames rendered by a UNIGINE-application to an unlimited number of devices via WebRTC (Web Real-Time Communication) has become available.

web_streaming_plugin_sm.png

You can run your UNIGINE application on a remote computer, a desktop somewhere inside your organization, or a virtual machine provided by a cloud hosting service. UNIGINE uses the resources available to that computer (like CPU, GPU, memory, etc.) to run application logic and render frames. The rendered output is continuously encoded into a media stream, and passed through a lightweight stack of Web services. Users can then view this stream in standard Web browsers running on other computers and mobile devices and control the experience from their browsers, sending keyboard, mouse, and touch events, as well as custom events emitted from the client's Web page, back to UNIGINE.

The new functionality is available in UNIGINE 2 Sim SDK edition via the experimental WebStream plugin.

Other Engine Improvements

  • Fixed an issue with the World::getNodeByName() method returning the contents of the reference nodes even if Unpack NodeReferences is not enabled.
  • Searching nodes by name has become slower due to a number of memory optimizations removing node names map. It is recommended to access nodes via property/component parameters instead of trying to find them by name using the methods of the World class (getNodeByName) and the Node class (findNode, FindNodes).
  • Fixed a crash on loading a world with a Landscape Terrain object on Vulkan related to structure initialization.
  • Fixed a crash associated with Landscape Terrain parameters sometimes appearing when using the Visualizer by Mask helper.
  • Channels are now automatically swapped properly when copying data from the Vulkan swap chain (no need to call Image::swapChannels() anymore). This removes issues with rendering the final image with wrong color channels that in some cases appeared on Vulkan.
  • Shutdown for plugins is now executed even when the fast_shutdown option is enabled, as they may have critical logic to be performed on shutdown (saving configuration, closing/destroying a socket, etc.). A new Engine::isFastShutdown() method has been added to the public API.
  • Removed deprecated StructuredBuffer::getData() method from API, use Render::transferStructuredBuffer()/asyncTransferStructuredBuffer() instead.
  • Fixed an issue with copying a C++ structure to C# in the GeodeticTransformer plugin.

UnigineEditor

USD Export

usd_logo.png

Universal Scene Description (*.usd format) is an open-source, hierarchical scene description format designed to be a universal interchange format for 3D content creation workflows. USD support allows efficient and accurate exchange of 3D data across many 3D applications. The USD format is widely used in the film, animation, and VFX industries to streamline production pipelines and facilitate collaboration between artists and studios.

In 2.19 we have added an ability to export scene content (models, etc.) to a USD file. This feature is available for SIM and Engineering editions via the USD Exporter plugin for UnigineEditor. For more information on using the plugin please refer to this article.

Multiple Asset Browsers

multi_asset_bro_lock_sm.jpg

For your convenience multiple instances of the Asset Browser window can now be opened at the same time each with its own filters, enabling you to drag your assets between them as you want, facilitating assets management when reorganizing them between multiple folders/mount points.

Packing Release Build Content

The Project Build tool can now pack contents of the data folder of your project into a UNG-archive when creating a final Release build of your application. You can also specify exceptions - files, file extensions, and folders that should not be packed.

project_build_packages.png

Version Control Integration Updates

vcsintegration.jpg

Support for version control systems now includes Subversion (SVN) and Git and has merged into a single VCSIntegration Plugin. For more information on using the plugin please refer to this article.

Material Graph Editor Updates

material_graph_sm.jpg

More Convenience and Faster Assembly

In this release we have added a pack of QoL improvements to make the process of creating material graphs simpler, even more intuitive, and faster by removing repeated operations and polishing the workflow.

Added a pack of hotkeys for the Material Graph Editor to quickly create the most frequently used graph nodes (like Add, Multiply, Clamp, Sample Texture, etc.). You can simply drag an edge from any socket and press a hotkey.

You can find the complete list of hotkeys and adjust them as you want in the Settings window.

settings_hotkeys.png

Nodes for arithmetic operations (Add, Subtract, Divide, etc.) are now added to Material Graph with default input constants to speed up the process of graph assembly removing frequently repeated operations.

Plus some other improvements:

  • Added an ability to save the current graph state via the Ctrl + S hotkey.
  • To ensure that all textures used in your post-effects are there when you need them - you can now define whether to load each texture in forced mode or not, or you can set streaming mode per-effect (applied for all textures it uses).

    forced_streaming_posts.png

  • Fixed text selection highlighting in the Material Graph Editor.
  • In case an incorrect/missing subgraph is used in a Material Graph, an error-message will now indicate the name of this subgraph.

Other UnigineEditor Improvements

  • Added an ability to select only those surfaces that are currently visible in the Viewport (by the Viewport Mask). Just check the Use Viewport Mask For Selection option in the Selection Filter.

    selection_viewport_mask.png

  • Fixed an issue with the Make Parent operation (Ctrl + P) resulting in taking a wrong element of the current selection as a parent for others in some cases.
  • The Make Parent operation for Properties is now available via the hotkey (Ctrl + P) as well.
  • Fixed an issue with updating parent material name (in the Parameters window) after changing it, unless the material is modified and saved.
  • The Color Picker dialog now always stays on top of all other windows and does not block input.
  • Fixed an issue with resetting the Mask Terrain setting of the Grass object after restarting the Editor.
  • Fixed crashes on moving or cloning a Node Reference with a lost GUID.
  • A NodeReference being edited will now have a different icon in the World Nodes hierarchy for your convenience.

    noderef_icon.png

  • Fixed an issue with renaming a node upon clicking on any other column of the World Nodes hierarchy except for the "Node Name".
  • Fixed an issue with node placement by the Randomizer tool in case the NodeReferences have a non-zero offset.
  • Fixed crashes on moving or cloning a NodeReference with a lost GUID.
  • Fixed incorrect indexing in the Batch Rename when renaming children in Material and Property hierarchies, plus a number of other Batch Rename fixes.
  • Fixed an issue with editor freezes on selecting a huge number of Node References caused by the NodeGeoWidget. Database origin is now displayed only for ObjectLandscapeTerrain and ObjectTerrainGlobal nodes and as a read-only parameter.
  • Fixed a crash on simultaneous resizing of the Material Editor and Viewport windows (DX12 + AMD).
  • Fixed a crash on importing an FBX model with LODs and the Combined By Postfixes option selected.
  • Fixed issues with different behavior of click and frame selections regarding visibility of nodes.
  • Fixed an issue with grabbing a FieldShoreline texture in case of negative Z-position of the Global Water object.
  • Migration scripts are now checked relative to data_path in case they were not found next to the project binary.
  • The default Unchanged option for .dds-assets has been disabled, as the runtime format for textures in UNIGINE is .texture.
  • Fixed an "Error Can't find variable" error that appeared on switching between Final and Simplified Render Modes.
  • Extended AssetManager API.

Sandworm Tool Improvements

sworm_sm.jpg

  • Fixed an issue with excessive ObjectLandscapeTerrain generation time and file size in Projection 32237
  • Added an option to control adding of the minimum terrain height value to a tile. Adding this data to a tile slows down the terrain generation, but can be helpful in rare cases when generation produces sharp peaks rising from the water.
  • Fixed an issue with the Mask + Vegetation generation getting stuck after completion of heights generation.
  • Fixed an issue with an undesirable decal stretching along large spline segments.
  • Fixed an issue with getting an incorrect size of Landscape Layer Map when low TMS Zoom Level values are used.
  • Fixed inconsistencies in Landscape Layer Map size if the area is limited by the Boundaries.
  • Fixed issues with incorrect generation of fences at turns and along curves based on the data from vector data sources.

IG Updates

ig_219_sm.jpg

  • KDIS support has been updated to version 2.10.
  • Fixed incorrect text orientation for CIGI SymbolTextDefinition.
  • A number of changes to support the updated Syncker along with the new SpiderVision plugin.

Experimental Animation System Updates

Our Animation System continues to evolve with the following improvements added so far:

  • Implemented LookAt-chains for ObjectMeshSkinned.
  • Bone rotation constraints for ObjectMeshSkinned.
  • Changed morph target management for ObjectMeshSkinned.
  • Added several interpolation modes for bone rotation of ObjectMeshSkinned.
  • ObjectMeshSkinned no longer supports mesh geometry modification, as there is a special procedural mode in which a custom user mesh can be set.
  • Animation retargeting for ObjectMeshSkinned can now be registered using pairs (anim_path, mesh_path).

This release brings a pack of API updates (see API Migration Guide for details) and a set of new C++ samples showcasing new features.

You can expect more in our future updates as we put more efforts into active development of the new versatile Sequencer tool to replace the old Tracker system as well as to adding more features to the Animation System, so stay tuned.

animation_sm.jpg

New Animation Samples

constraints_sm.jpg

A pack of new Animation samples showcasing new functionality has been added to C++ API Samples suite including the following:

  • Bones Constraints Sample - demonstrates how to use bone rotation constraints.
  • Bones IK Sample - demonstrates how to use inverse kinematics to control bones. The pole vector is used as a constraint, which determines the bending plane of joints.
  • Bones Look At Sample - demonstrates how you can use look-at chains to aim at a target.
  • Bones Masks Sample - demonstrates how to use bone masks.
  • Bones Retargeting Sample - demonstrates how to use the same animation for skeletons having different proportions.
  • Bones Root Motion - demonstrates how to extract motion of the root bone and apply it to the object.
  • Bones Sandbox Sample - a sandbox enabling you to check out all available settings for ik-chains, look-at-chains, and bone rotation constraints.
  • Bones Simple Foot Placement Sample - a naive option for placing feet on a surface using IK-chains.
  • Bones State Machine Sample - demonstrates how to make an animated state machine based on ObjectMeshSkinned to dynamically switch between the character's states (animations), the implementation supports root motion, smooth transitions and foot matching.

Min Specs Updated

System Requirements tend to increase over time as the progress of technologies continues. We have adjusted our min specs in UNIGINE 2.19 to make them more up to date to be able to deliver new features and capabilities and the biggest impact for our users.

Debian 10 (Buster) support has reached its end-of-life on June 30, 2024, so we have made it a minimum requirement, along with kernel and GCC versions updated accordingly.

Our internal builds were switched to v143 toolset, which requires CMake 3.21 at least. All in all 2.19 brings the following updates:

  • CMake 3.21+
  • gcc 8.3.0
  • Python 3.7+
  • Linux (kernel 4.19+) x64

Demos and Samples

New API Samples

gui_to_texture_sm.jpg

A new GUI To Texture sample has been added to the C++ Samples suite (C++ Samples -> Render to Texture -> Gui to Texture) demonstrating how to render GUI into a texture using the Gui::render() method and use this texture (as albedo, emission, etc.) in a material applied to a mesh (e.g. to implement an in-game monitor with UI elements on the screen).

CUDA in Engineering SDK

cuda_interop.jpg

CUDA integration samples added in 2.18.1 for Sim SDK edition only and showcasing interaction with external graphics APIs, have become available in Engineering edition as well. You can also use them as the basis for integrating the Engine GAPI (Vulkan, DX11, DX12) with other GAPI (OpenGL, DX, CUDA, etc.).

Documentation

Added a set of new ultrashort HowTo quick tip videos in English, Chinese, and Russian:

Thank you for reading, and don't miss the updates as we keep working to make UNIGINE even greater!

- Your UNIGINE Team

  • Like 5
Posted

Am I crazy, or is there no longer a "play" button in the editor?

Posted

@TanukiDigital

If a C# project.
During migration, it looks like the .csproj file in the project folder has not changed. Try changing the <targetFramework> parameter in this file from "net6.0" to "net8.0". There must also be an appropriate version .NET .
I have not encountered c++.

  • Like 3
Posted

Indeed it was a C# migration, and changing the <targetFramework> fixed it.  Thank You!

  • Like 1
Posted

i've not test it yet, but i see we have multiple assets browser on the editor, That's really nice and definitely needed.
Now, i don't understand the following: "UNIGINE 2.19 enables individual lightmaps and shadow maps for each instance, removing these constraints."

Can someone please explain to me what does that mean? if is not too much problem

Posted

I opened the VR Demo Project in the new Editor Version and there is also no Play Button. (It is a C++ Project)

  • 4 weeks later...
Posted

I've upgraded to 2.19 (C#, windows - already done the .net 6->8 fix) and I'm getting a load of errors when I try to build, in VRHandController.cs and VRInput.cs

e.g, random excerpt:

error CS1061: 'InputVRDevice' does not contain a definition for 'AngularVelocity'
error CS1061: 'InputVRDevice' does not contain a definition for 'Transform'
error CS1061: 'InputVRDevice' does not contain a definition for 'LinearVelocity'
error CS0428: Cannot convert method group 'IsTransformValid' to non-delegate type
error CS1061: 'InputVRController' does not contain a definition for 'SetVibration'
error CS0117: 'Input.VR_BUTTON' does not contain a definition for 'A'
error CS0117: 'Input.VR_BUTTON' does not contain a definition for 'B'
error CS0117: 'Input.VR_BUTTON' does not contain a definition for 'AXIS_0_LEFT'
error CS0117: 'Input.VR_BUTTON' does not contain a definition for 'AXIS_0_RIGHT'
error CS0117: 'Input.VR_BUTTON' does not contain a definition for 'AXIS_1_LEFT'
error CS0117: 'Input.VR_BUTTON' does not contain a definition for 'AXIS_1_RIGHT'
error CS0117: 'Input.VR_BUTTON' does not contain a definition for 'AXIS_2_LEFT'

Any help appreciated...

Also, unrelated - the checkbox for my plugin is greyed out and doesn't appear in the Editor Plugin Manager...

 

Posted

In order to make things work after update you need to change your code according to the migration guide (there is no automatic code migration).

New VR input also described here: https://developer.unigine.com/en/docs/2.19/vr_development/vr_input?rlang=cpp&autotranslate=en#openvr_input

If you did not modified C# VR template files at the first place you can also try to do a manual project reconfiguration in the SDK Browser. In that case template files inside your project will be overwritten with the actual versions. To do so:

  1. Navigate to SDK Browser -> Projects;
  2. On the desired project click  button and then select Configure;
  3. Click Configure Project

Or you can manually examine changes in VR input here:

  • <SDK_INSTALL_DIR>utils\project\template\csharp_vr\data\vr_template\components\controllers\vr

Hope that helps :)

How to submit a good bug report
---
FTP server for test scenes and user uploads:

×
×
  • Create New...