This page has been translated automatically.
Последние новости:
Содержание:

UNIGINE 2.2: New Geometric Water, Unified API, Geodetic Improvements

Key Changes

  • New simulation-friendly water with geometric waves (Beaufort scale 0-12)
  • Introduced tiled rendering optimizations
  • Introduced area lights
  • Planar reflections
  • Improved shadows
  • Unified C++/C#/UnigineScript API with full access to the engine features
  • New C++/C# app logic system
  • Improved Qt integration template
  • Support for Visual Studio 2015
  • Upgraded Oculus plugin to 0.8 Oculus SDK
  • Improved accuracy of geodetic math
  • Introduced GeodeticPivot object (experimental)
  • Editable demos via SDK Browser
  • SimLights add-on for airfield lights
  • New Oil Rig demo

New Global Water

Introducing new ObjectWaterGlobal object (instead of old ObjectWater) featuring geometric waves featuring adaptive hardware tessellation (Beaufort scale from 0 to 12).

One of the key features is ability to perform multiple intersection tests with the water surface due to fine CPU/GPU sync. High precision of such tests even on very rough sea states allows correct vessels placement, visibility tests, and height above the surface requests. The new object is fully compatible with multi-channel rendering via Syncker system.

There is also high-quality PBR-based shading and screen space reflections on the water.

Waterline and subsurface scattering:

Dynamic foam:

Underwater rendering:

Some other features are scheduled for the 2.3 update:

  • 3D ship wake effects (bow and stern waves) with physical interaction
  • Underwater caustics
  • Wave height falloff
Here is the preview video (work in progress, not final quality):

Tiled Rendering Optimizations

Introducing tiled rendering and lights batching optimizations. With those enabled, closest point lights are grouped and rendered in batches, decreasing the number of expensive DIP calls, and increasing performance. Sub-pixel lights are also not rendered with this optimization. In our tests, we have seen up to 40% better performance (on scenes with 100s of light sources).

162 lights rendered, 445 DIP calls:

156 lights rendered, 326 DIP calls (-26%):

There are two console variables controlling the optimization:

  • render_lights_tile_grid_size sets grid size in tiles per axis (8 by default)
  • render_lights_max_per_batch sets maximum number of lights per batch call (0 disables the optimization, by default)
Too large values can provide negative results due to increased CPU load. The optimization works only for omni lights with point shape and without shadows.

Area Lights

Introducing area lights, from now on LightOmni and LightProj support the following shapes: point (default), sphere, capsule, rectangle. Ellipsoid-shaped LightOmni has been removed. These new shapes let you create area lighting that produces physically correct specks on the illuminated target surfaces. That's very useful for simulating fluorescent tubes, or other visibly long light sources.

Improved Shadows

Adaptive Bias

Shadow biases are now calculated adaptively according to the light source parameters (distance, angle, resolution, intensity, softness, FOV...) to achieve the best results automatically. WorldLight has completely adaptive bias now, other light sources have adjustable bias correction parameter (normalized to 0-2).

Shadow biases are also unified across graphical APIs now, so there will be the same setting for both DirectX and OpenGL. Visual quality has been increased as well: no more objects disconnected from the shadow, less lighting through walls.

We've also added the Normal bias option for the light shadows, implemented by shifting the surface on which the shadow falls.

Better Cascades for LightWorld

Improved shadow cascades (former shadow splits) of the LightWorld (requires re-configuration):

  • Size of each cascade can be changed via the Cascade border option.
  • Cascades can be shifted relative to the camera via the Cascade offset option.

Thanks to these changes it is possible to achieve better quality of shadows from tall buildings.

Softness

  • No more shadow noise or visible pattern on the shadow edges.
  • Added the adjustable Sharpness of the world light shadows.

Penumbra for LightProj

It is now possible to achieve nice-looking penumbra for LightProj without the use of modulation textures.

Planar reflections

Added dynamic planar reflections (States -> Planar Reflections field). By using planar reflection options, you could create flat mirrors and flat dynamic reflective surfaces: hardwood flooring, flat varnished surfaces, etc. Supported features: deferred and forward rendering, reflection masks, and transparent objects.

There is also a reflection pass after rendering environment probes now: writing to reflection buffer, the pass can be customized for non-standard reflection effects.

Screen-Space Subsurface Scattering

Improved quality of SSS, simplified settings. Requires aux buffer enabled in the material and adjustment of the translucence parameter.

Improved Oculus Support

AppOculus plugin has been improved:

  • All Oculus related code has been moved to C++ plugin side with no UnigineScript dependencies.
  • Ported to latest Oculus SDK (0.8.0.0).
  • Removed the STEREO_OCULUS interpreter definition.
  • Added ability to toggle the VR mode in realtime.

Viewports and Cameras

  • Introduced Camera class for easier parameters manipulations.
  • Introduced Viewport class for more unified rendering.
  • Simplified stereo rendering.
  • Automatic support for velocity buffers.
  • All secondary viewports are fully-featured now.

Added support for 360 degrees panorama:

Other Renderer Improvements

  • Simplified materials UI in the editor (improved grouping and naming).
  • Features of mesh_base_stem and mesh_base_leaf materials (vegetation) were moved to mesh_base.
  • Added support for vertex color modulation (by channel) of albedo, metalness, roughness, diffuse, specular, gloss, AO, auxiliary, emission and light map textures.
  • Changed attenuation settings of omni, projected lights and environment probes.
  • Added the object space normal option.
  • Added ambient occlusion texture support into terrain_base material.
  • Added specular_color and gloss_scale parameters to grass_base material.
  • Added turbulence state to sky_base material.
  • Added light source toggle for turning off lighting of water surface.
  • Added the following console commands for water screen space reflections control: render_water_ssr, render_water_ssr_quality, render_water_ssr_increased_accuracy.
  • Added the following console commands for subsurface scattering control: render_sss, render_sss_resolution, render_sss_quality, render_water_emission (enables the emission rendering target used by the water subsurface scattering).
  • Added the following console commands for better shadows control: render_soft_shadows, render_omni_shadows_jitter, render_lerp_cascades. render_show_splits has been renamed render_show_cascades.
  • Added fine tuning parameters for grass occlusion.
  • UUSL now supports hardware tessellation.
  • A lot of UUSL syntax improvements, please see the migration guide.
  • alpha_test pass has been renamed to depth_pre_pass.
  • Disabled depth mask in text_base material by default.
  • Removed Blend noise option from decal_base material.
  • Fixed animation offset for clusters/clutters.
  • Fixed 2D noise state for clusters/clutters.
  • Fixed alpha test for transparent billboards.
  • Fixed sRGB correction.
  • Fixed TBN matrix arraying.
  • Fixed alpha test for transparent materials.
  • Fixed scattering when the light source is pointed down and when there is no light sources.
  • Fixed HDR textures grabbing.
  • Fixed fading of the specular highlight.
  • A lot of other minor bugfixes and improvements.

Unified API

All the APIs we provide, i.e. C++, C#, and UnigineScript APIs, are now unified. Basically, everything must now be accessible through any API.

C++ and C# APIs are now almost completely in sync with UnigineScript API, meaning that 99% of the classes, methods, and constants, some of which were previously only accessible via UnigineScript, are now accessible via both C++ and C# APIs. Moreover, from now on, all the new high-level classes are going to be automatically in sync across all the APIs. (Of course, there always will be a few language-specific methods and differences.)

Such significant improvements led to some changes in the API, please refer to migration guide for more details.

C++ API also introduces a new, unified MathLib that now requires SSE2, adds a bunch of functions previously missing from the public API, and essentially eliminates engine-to-API and API-to-engine conversions of the basic math types (vectors, matrices, quaternions, etc).

New Logic System

Starting with 2.2, we introduce a new approach to implementing custom C++ or C# application logic, based on classes rather than functions.

Instead of creating your own update(), render(), and swap() functions and either plugging them into the engine's main loop or reimplementing the main loop from scratch every time, you can now subclass from WorldLogic, SystemLogic, and EditorLogic classes, and the default engine main loop will call their appropriate methods at appropriate times.

The logic of these classes is the same as for runtime scripts:

  • WorldLogic class has the same logic as world script.
  • SystemLogic class has the same logic as system script.
  • EditorLogic class has the same logic as editor script.

Now you should create new classes by inheriting WorldLogic, SystemLogic, EditorLogic classes and implement your methods.

You should pass instances of the created classes to the main function:

Source code (C++)
engine->main(&system_logic,&world_logic,&editor_logic);
		

and new classes' methods will be called automatically by the engine after equivalent scripts' methods.

When you create a new project, boilerplate subclasses will now be automatically created too.

Other Execution Sequence Changes

  • UnigineScript init() function from the -system_script will now be called during the first Engine::update() call, rather than during Engine::init().
  • Material and property libraries are now loaded during Engine::init().

Improved Accuracy of Geodetic Math

Introducing new Ellipsoid class used as a basic container for reference ellipsoid and geodetic calculations on its surface. All previous code from core/scripts/geodetic.h has been implemented in the new Ellipsoid class.

  • Solution of direct and inverse geodesic problems.
  • Two modes - fast (Great Circle math) and accurate (Vincenty's formula).
  • Conversion to ENU and NED relative to geodetic location in the latitude / longitude / altitude format.
  • Conversion from geodetic to ECF coordinates and vice versa.

This feature is available in Sim edition only.

(Experimental) GeodeticPivot

Introducing GeodeticPivot node used for setting reference ellipsoid and location in the latitude / longitude / altitude format. It features the following:

  • Mesh deformation across reference ellipsoid for ObjectMeshStatic and DecalMesh nodes (transformations matrices will remain the same).
  • Correct procedural content placement across reference ellipsoid for ObjectMeshClutter / WorldClutter / ObjectGrass nodes (transformation matrices will remain the same).
  • Built-in WGS84, GRS80, GRS67, Airy1930 and International 1924 reference ellipsoids.
  • Ability to set custom ellipsoids (enabling support for other planets).
  • Available in all APIs (C++ / C# / UnigineScript).

Nodes should be descendants of GeodeticPivot in order to take effect. This feature is available in Sim edition only.

File System Usability

-data_path

Removed the -extern_path argument. The additional directories are now specified via -data_path, for example: -data_path path_0 -data_path path_1 -data_path path_2.

Both relative and absolute paths are now supported. Absolute paths are always used as is. Relative paths, however, will get "/data" auto-appended to them if there is a /data subdirectory (for compatibility reasons, as this always was the existing behavior).

The default -data_path is "../", unless overridden by a command-line argument, or in a configuration file.

When multiple paths are specified (for example, -data_path path_0 -data_path path_1 -data_path path_2), the first directory is still special:

  • The engine would check only the first path when searching for configuration.
  • The -gui_path relative directory is taken relatively to the first path.
  • If the -project_name isn't specified, *.cache files will be saved to the first specified -data_path directory.
  • When referring to the unknown file via the engine file system, the file system would check only the first specified -data_path directory.

The list of specified -data_path directories can be obtained via Engine::getNumDataPaths() and Engine::getDataPath(int num). The Engine::getDataPath() function without arguments would return the first specified -data_path directory.

The data_path and extern_path console commands have been removed.

Other Changes

  • The -plugin_path startup CLI can now be specified multiple times (for example, -plugin_path path_0 -plugin_path path_1 -plugin_path path_2).
  • The list of specified -plugin_path directories can be obtained via Engine::getNumPluginPaths() and Engine::getPluginPath(int num). The plugin_path and extern_plugin console command has been removed.
  • The -extern_package startup CLI can now be specified multiple times (for example, -extern_package package_0 -extern_package package_1 -extern_package package_2). The extern_package console command has been removed.
  • The gui_path console command has been removed.

Updated Samples

Added more artist-friendly samples for objects, materials and vegetation.

UnigineEditor

  • Fixed light sources FBX import.
  • Fixed incorrect RGBA albedo textures compression.
  • Fixed nodes previews rendering.
  • Fixed morph target normals on the FBX import.
  • Fixed the clipboard copy and paste option, now it supports Unicode.
  • Fixed the transparency preset detection logic.
  • Removed script_editor_(load/reload/quit) console commands, editor_(load/reload/quit) should be used instead.
  • Removed the editor_script and editor_cache console commands.

SDK Browser

  • Added the new C++ (QTCreator + QMake) project template.
  • The License Management window has been moved from Options to the main window menu.
  • Project startup settings are now located in the configuration file (/data/<project_name>/<project_name>.cfg).
  • Demos can now be converted to projects.
  • The default binary name has been changed from main.exe to <project_name>.exe.
  • The work log now stores five browser sessions instead of one.
  • The project is now created in the <location>/<project_name> directory.
  • Improved behavior in case of a unstable Internet connection.
  • Various bugfixes.

SimLights Add-On

A lot of simulation tasks requires multiple specialized lights, which have to meet strict certification requirements. Examples are airfield lights: PAPI, TDZ, REIL, etc. We have introduced a high-level SimLight node for these tasks, it features the following:

  • Visible from far distances (lights won't be less than 1 pixel on the screen).
  • Compatible with multi-channel rendering via Syncker.
  • Angle-dependent visibility check, ability to limit both vertical & horizontal angles.
  • Periodic blinking controlled by frequency (in Hz) and duration (in seconds).
  • Light rotation with frequency (in Hz).

Load SimLights engine plugin for runtime use and SimLights editor plugin for editing lights. This feature is available in Sim edition only.

Oil Rig Demo

The new offshore oil rig demo showcases new global water, including the following:

  • Beaufort scale 0-12.
  • Screen-space reflections.
  • Vessels and buoys floating on the water surface.
  • Interactive helicopter mode.
  • Hardware tessellation for water geometry.
  • Multiple point lights with batching.

Documentation

Other Changes

  • Abandoned support for Visual Studio 2010.
  • Added support for Visual Studio 2015.
  • Abandoned support for Windows XP.
  • Added support for OS X 10.11 "El Capitan" operating system to the C++ samples.
  • Added correct pedal start values for racing wheels.
  • ObjectText improvements:
    • Added bold / italic /bold italic support for rich text (need to have corresponding fontname_i, fontname_b, fontname_bi files in the same folder as the original font file).
    • Removed the font size limit.
    • Improved font wrapping (works with rich text alignment as well), used to wrap and align fonts properly.
  • Removed the following console commands:
    • video_app (the specified graphics API can be obtained via the Engine::getVideoApp() method).
    • sound_app (the specified sound API can be obtained via the Engine::getSoundApp() method).
    • system_script
    • system_cache
    • console_command
    • extern_define (the list of specified external definitions can be obtained via the Engine::getExternDefines() method).
  • Removed Flash GUI and all related tools.
  • All log entries (message, warning, error, fatal) will flush data to standard I/O streams right after the call.
  • Fatal log entries will write to stderr first in order to get caught by external tools.
  • Removed all STEREO_* script definitions, all stereo modes are available via the render_stereo console variable.
  • Removed the AppPanorama plugin, all panorama modes are available via render_panorama console variable.
  • ObjectBillboards is now COW, Copy-On-Write: that is, if it references another ObjectBillboards, then on the first change it will break that reference and make a deep copy.
Build: ()