Development log RSS

2014-03-25   |   Renderer Access via C++ API, Better UnigineScript Debugging, End of the DX9 Era

Updated UnigineEditor

We are working hard on the user interface improvements, and first of all representing expanded tooltips for the UnigineEditor's panel and nodes creation dialog windows. You no longer need to look through documentation to find info on all nodes and their parameters.


There are much more UnigineEditor enhancements on their way to deliver streamlined user experience in the next SDK updates!


Renderer Access and Graphics Utilities

  • Added access to Direct3D9 and Direct3D11 shaders to the Unigine::Shader class.
  • Added access to the Unigine::RenderRenderer class. It controls all internal rendering callbacks for any number of rendering interfaces, which includes tracking of opacity groups and changing transformation matrices.
  • Added access to Unigine::Material and Unigine::Property classes along with their managing classes. Their usage samples can be found in the source/samples/Api/Systems directory.
  • Added a cubemap texture mode (MODE_CUBE) to Unigine::Ffp class.
  • Added a createMipmaps() function to the Unigine::Texture class. It creates a mipmaps stack.
  • Added bilinear and anisotropy flags to the Unigine::Texture class.
  • Screenshots and splash screens callbacks now work via Unigine::RenderRenderer class.
  • Added access to light textures for Unigine::LightOmni and Unigine::LightProj classes.
  • Added sample on dynamic external texture usage (source/samples/Api/Render/Textures).

Integration Samples

  • Updated D3D9AppQt, D3D11AppQt, GLAppQt and GLAppSDL App samples (source/samples/App).
  • Updated ViewportQt sample (source/samples/Api/Render): added a batch file launcher.
  • MFC Windows libraries have been added into the D3D9AppMFC (see the source/samples/App/D3D9AppMFC sample).


  • Added access to all Widget classes.
  • Added new samples on WidgetCanvas, WidgetDialog, WidgetExtern and WidgetWindow (source/samples/Api/Widgets/).
  • Added support for horizontal mouse wheels. BUTTON_UP and BUTTON_DOWN variables have been deleted from the Unigine::App class, AXIS_X and AXIS_Y variables, controlling mouse axes values, can be used instead. A sample on their usage can be found in the data/samples/controls/app_00 directory.
  • Added a KEY_CMD variable for Windows key to the Unigine::App class.
  • Added read/writeInt2/UInt2/String2 functions into the Unigine::Stream class. They read/write signed integers, unsigned integers and strings from/to the stream. Using these functions allows you to safe memory space.
  • Added sample on the WorldTrigger object, demonstrating how to work with C++ callbacks (source/samples/Api/Nodes/WorldTrigger).
  • The old Unigine::CallbackBase() class has been renamed into Unigine::FunctionBase(). A class named Unigine::CallbackBase() is now used to call C++ functions with the different amount of arguments. All dedicated callbacks for Gui, Node, Physics and Console classes have been moved to this class.
  • Added shift and division operations for Unigine::ivec2/ivec3/ivec4 classes.
  • Added automatic conversion from vec2/dvec2 data types to Variable vec2/dvec2 and vice versa.
  • Unigine::vec3 functions have an unused forth w component.
  • Added access to an Unigine::Plugin class.
  • Added access to Unigine::NodeTrigger, Unigine::WorldTrigger, Unigine::NodeLayer, Unigine::NodePivot, Unigine::WorldLayer, Unigine::WorldSector, Unigine::WorldPortal and Unigine::WorldSwitcher classes.
  • Added a Ptr::destroy() method. It destroys the pointer object even when the reference counter is not empty.
  • Added a Ptr::getCounter() function returning the reference counter.
  • Added new Unigine::WorldExtern and Unigine::WidgetExtern classes. The first class belongs to the world spatial tree and has update() and flush() methods which are called only when the node is visible. It allows you to create external user widgets or integrate different GUI systems inside the engine via the Unigine::Plugin interface. The second class is used just as simple scene graph grouping elements without calling update() and flush() functions. Their samples can be found in source/samples/Api/Widgets and source/samples/Api/Nodes directories.
  • Enabled, handled, immovable, collider, clutter, spatial, query and latest flags have been added to the Unigine::Node class.
  • Unigine::Plugin class now have additional callbacks for better world management: updateWorld(), renderWorld(), flushWorld().
  • Updated Unigine::Interpreter class. The destructor is called automatically without specifying a "delete" function.
  • Fixed NavigationMesh::inside2D|3D() functions.
  • Material and property managers can now create empty libraries.
  • Added support for half-precision floating data.
  • System, editor and world script functions first argument type has been changed from the const char* to Variable. Their second argument is now integer, so get() and run() methods can be executed by the integer ID.

Airport Demo

Added a small airport demo, showcasing point lights (they are visible even from very large distance) and directional sector lights (used in PAPI, precision approach path indicators). The demo also contains some reusable objects which can be useful for airfield simulation.

Airport demo


  • Added a Renderer plugin, which allows you to fire world script callbacks on API Renderer callbacks.
  • Added a detection of NVIDIA Maxwell and AMD RX Series GPUs.
  • Renderer buffers visualizer now shows cubemap textures as well.
  • Added a 2560x2048 video mode.
  • Engine will skip system gamma value changing on startup in case of default gamma value.
  • Added a white balance parameter (ColorWhite) to the engine.render() class.
  • New instances of MeshSkinned class will have default identity bone transformations.
  • A new updateNormals() function has been added to the ObjectMeshDynamic class. It sets a normals smoothing angle.
  • Added a shader projection matrix for Players. It can be used for oblique projection clipping planes with a correct shadows rendering. A sample can be found in the data/samples/render/oblique_00 directory.

Blurry Reflections

Blurry reflections, ray traced from a material with tiny random bumps on its surface, are now available in Unigine. They are handled in the following way:

  • A new "Mipmaps" state of reflection materials activates hardware mipmaps generation for blurry reflections.
  • The blurry effect is achieved by switching among the mipmaps. Its power is modulated by the new Bias parameter of reflection materials.
  • The specular texture alpha channel controls blurry reflections affected areas: white areas grant precise reflections, darker areas provide blurry reflections.

Blurry Reflections

Procedural Textures

Now it is possible to assign procedurally generated textures to image texture slots. This feature can be implemented by the setImageTextureProcedural() function of the Material class. The example of water surface, obtained by the assigning of a procedural texture onto a simple dynamic mesh can be found in the data/samples/shaders/procedural_water directory.

Procedurally generated and dynamic textures can be also applied to Proj and Omni lights. A sample can be found in the data/samples/lights/omni_07 directory.

Dynamic Textures

Controllable Translucency for Vegetation

Leafs and impostors materials translucency parameters have been updated. A new Back parameter controls translucency coefficient for texture normals, oriented against the sun. It has no influence on the sun-oriented normals. A Side parameter control the translucency coefficient for texture normals, oriented orthogonally to the sun.

Translucency Effect


Improved Debugging

  • Debug builds now return the file information or the line number if a run-time script error has occurred.
  • Parser will print the source line number on brace counting and preprocessor directive errors.
  • system/world/editor_breakpoint console commands can work without arguments number specification.
  • Fixed nested breakpoints.
  • world_disassemble console command now shows script source code lines with assembler mnemonics.

Language Improvements

  • Added a virtual function keyword. In UnigineScript, all the functions are virtual by default, but a keyword could serve as a reminder for programmer that the function is virtual. In the Game Framework you must put this keyword to specify that the function is virtual.
  • All expressions can treat their root namespace as a global root. An optional argument has been added to expression constructor in order to control this behavior.
  • External constants are now treated as internal script constants for better performance.
  • Correct function recursion calls will work even for script entry functions.
  • Added direct base constants declaration (NULL, true, false).
  • Fixed inheritance from scoped external classes.
  • Fixed inheritance process for scoped external classes.
  • Expressions like "1 << 2" can be treated as constants.
  • Fixed work with externally specified functions and class attributes.
  • Interpreter cache files are more compact now because of compact integers in the Stream class.

Library Improvements

  • Updated Async class. A new lock() method locks the resource. The resource can be locked by the other thread only after the first thread have unlocked() it. The class can safely work with user defined script functions.
  • Added a new wait() function to the Async class. It waits until the isRunning() command returns 0 (a thread is not active).
  • Async.clearResults method has been renamed into clear().
  • The constructor of an Image class can receive the image name or another image as an argument. The last argument of Image.blend() and Image.copy() functions, set to 1, provides border clipping for safe image operations.
  • Math Matrix library has been updated. Added reflect(), obliqueProjection() and symmetryProjection() functions returning a reflection, oblique projection and symmetry projection matrices correspondingly.
  • Added a functionid() system function. It gets internal function identifiers without full namespace path specified. It can receive two arguments for more precise function specification.
  • functionid() and get_function() can work with script engine callbacks.
  • Added a compare() container function. It returns a value indicating if containers are equal.
  • Added a step() function. It changes the current array iterator inside the foreachkey() construct.
  • A new operator can receive integer return values from classid() functions.
  • Added a Unigine::getPlayerMouseSelection() function to utils.h. It returns a part of a projection matrix based on a custom rectangular selection.
  • Added a MENU_USER definition. It disables a system menu call by the ESC key.

Game Framework

  • Updated Entity class. A new getProperty() function returns the required property. An isNodeEntity() function returns the value indicating if the entity is associated with the node.
  • You can now assign the entity to any node, not only to the node reference. You can even create a dummy entity without any node or node reference assigned.
  • Most of the field types now can be identified automatically.
  • Added a remove() function to the Scheduler class. It removes a task from the frequency group.
  • Updated Game class. A getFieldDefaultValue() function returns a default value of the field parameter. A reloadLevel() function reloads the level. A getActiveLevel() function returns the number of the active level.
  • Added a real-time strategy game sample based on the Game framework with the following features:
    • Buildings construction, three types of units, resources mining
    • Units selection and control
    • AI-controlled enemies
    • Collision detection, pathfinding
    • Simple HUD with minimap
    • Fog of war
    • 3 levels with different missions

Real-time Strategy


  • Fixed alpha blending: you can now make external windows transparent without causing artifacts. It also works for Oculus Rift plugin GUI.
  • Updated tooltips: added support for automatic text wrapping (horizontal tooltip size is controlled by the rc file), added support for bold (<b>), italic (<i>) and bold italic(<bi>) tags for simple font changing.
  • Added a setWidget() function for the InterfaceWindow class, so Interface plugin sets a size and position of the internal widget window automatically. Manual synchronization has been removed.
  • An addUserInterface() method of the UserInterface class has been removed. A direct constructor should be used instead.
  • Full paths to the locale files should be specified in the locales array now. The syntax is: string locales[] = ( "path/to/locale/my.en", "path/to/locale/" ). Optionally several multi-language locales can refer to one .locale file. The syntax is: string locales[] = ( "path/to/my.locale:en", "path/to/my.locale:ch" ).


  • Updated C++ API/API Reference section: most of functions descriptions have been improved, descriptions of lately integrated classes have been added.
  • Added a "New Project Generator" article into Programming/Development for different platforms section. It describes how to create a new project by means of Unigine SDK Browser.
  • Updated UnigineScript section: added descriptions on new functions.
  • Updated Game Framework documentation: added info on callbacks, updated function library.


  • Added Navigation.setQuality/getQuality methods. They control the route optimization quality.
  • Fixed NavigationMesh object route optimization.
  • setRotation() method of Node class have an optional argument disabling node scaling.
  • A new ObjectMeshSkinned::addMeshSurface() function automatically adds vertices and indices from the source ObjectMeshSkinned.
  • Added a Xml::setXmlData() method. It sets an unquoted string to data stored in the node. This string can also contain xml sub-tree with rich text formating.
  • Added correct dead keys handling under Windows OS for foreign languages like Spanish.
  • Added a new SCons command called atomic for Android, iOS and WebGL mobile platforms. It creates a single library without additional engine libraries creation.
  • Minizip UnZip library has been upgraded to the version 1.1.
  • Fixed .sanim files exporting: partial bone animation exporting now works correctly.
  • Fixed Valgrind initialization errors.
  • Fixed incorrect WorldTrigger type filtration.
  • ZIP archives now work correctly. They can be opened by their partial names and can be located in every engine's filesystem resource. A corresponding sample is located in the samples/systems/packages_01 directory.
  • Added samples on Perlin noise generation: simple algorithm (samples/systems/noise_00), for one asynchronous thread (samples/systems/noise_01), for two asynchronous threads (samples/systems/noise_02).
  • Vec3 and Vec4 data types are 16-byte boundary aligned now.
  • Tracker can validate nodes before parameters applying, so the engine would not crash if the node does not exist. The corresponding error message will be shown in the console.
  • Tracker can save and restore current state into the Stream.
  • Added a Two Sided option to NormalMapper. It enables double-sided intersections.

End of the DirectX 9 Era

We are discontinuing support for DirectX 9 in order to deliver improved technology, starting from the next SDK update. More details will be announced soon.

2014-01-30   |   UNIGINE Sim and C++ API improvements

Introducing UNIGINE Sim

Over the years it became evident that UNIGINE is being used in two main industries: game development (about 15-20% of the customers) and "serious games" (simulation, visualization and VR). A lot of engine features are used in both directions, while some of them are purely simulation-specific. So we decided to split the product into UNIGINE Sim and UNIGINE Game: based on the same engine, these products have different sets of features and pricing schemes.

There is a new website dedicated to UNIGINE Sim: (available in English, Russian and Chinese).


Main differences between the SDK editions are listed in the table:

App3DSurround plugin+-
AppPanorama plugin+-
AppProjection plugin+-
AppQuadBuffer plugin+-
AppSeparate plugin+-
AppWall plugin+-
OpenFlight plugin+-
CigiClient plugin+-
RakNet plugin-+
Binaries with double precision of coordinates+-
Syncker multi-channel rendering system+-

Existing users have access to both editions, so they can decide which one is more convinent to use for them.

Rescue Helicopter Demo

We have completed second iteration of the UNIGINE-powered rescue helicopter demo:

The demo is available to customers for download, but it is not planned to publish it in the open access due to its significant size (about 60 GB). It was demonstrated as a part of a 6-channel simulator at I/ITSEC 2013 expo (some details below).


  • Added NodeExtern and ObjectExtern, special types of custom nodes and objects created via API.
  • Added access to Light, LightOmni, LightProb, LightProj, LightSpot, LightWorld, ObjectBillboard, ObjectDummy and ObjectMeshCluster classes.
  • Added new Unigine::BoundSphere/Box/Frustum classes. All bounds-related functions have been added to these classes instead of the center/radius/min/max accessors in the Node, Object and World classes.
  • Added access to an Unigine::Physics class.
  • Added an Unigine::Visualizer class, providing access to visualizer functions.
  • Unigine::Light, Unigine::Object and Unigine::Player classes can now be passed via API.
  • Added a getID() static function to the Unigine::Thread class. It returns the unique cross-platform thread identifier (zero value means the main working thread).
  • Added a virtual get_data() function to Unigine::Plugin class. It is used for user-defined structures and data interchange between plugins.
  • Added a virtual get_name() function to Unigine::Plugin class. It is used to set a user-defined name for a plugin.
  • It is possible to inherit Unigine::Plugin inside the application to get access to engine callbacks without putting this object into a separate dynamic library.
  • An isOwner() function added to API smart pointers. If the pointer is the owner, on its deletion the object also will be deleted. Use grab() and release() functions to change ownership.
  • Vectors now have a set() function with support for multiple scalar arguments initialization.
  • Added access to the list of loaded engine plugins from scripts and C++ API.
  • An Unigine::Object base class supports surface-related functions now.
  • Improved Unigine::State class: getter functions have been added to each rendering state (getPolygonBias(), getPolygonSlope() and getShader() functions).
  • Refactored samples.

Game Framework

  • Added a set_file/get_file field type for entities, which adds an icon opening a file selection window.
  • "system_script", "extern_define", "extern_plugin" widgets moved from Editor settings to Game settings, so they are saved in the *.game file and are launched right on game initialization.
  • Added getIntersetcionObjectsEntity() and getIntersetcionNodesEntity() functions to the Level class. They provide fast and easy search for required entities within the specified area.
  • Added Shooter sample with the following features:
    • First person camera and controls
    • Simple HUD
    • AI-controlled enemies
    • Multiple levels
    • Data transfer across levels
    • Different weapons: pistol and grenades
    • Pickable items: med kits, ammo, additional lives, keys
    • Unlockable doors
    • Different levels of difficulty

Shooter sample


  • Added support for Oculus Rift HD.
  • Fixed volume_shaft_base material.
  • Added access to ObjectMeshSkinned skinned coordinate vertices and indices.
  • Added a getSpawnCount() function for ObjectMeshClutter and ObjectGrass objects. It returns the number of cells to be generated. If the function returns zero, the scene generation is completed.


  • Added an -extern_directory command line option for accessing resources outside the data folder.
  • Added a setID() function to Node, Body, Shape and Joint classes for manual ID control.
  • A world.addWorld() function would not clear the current world even if loading was unsuccessful.
  • Added functions which return the number of queued file system resources: engine.filesystem.getNumQueuedData/Files/Images/Meshes/Resources.
  • world.saveNode/saveNodes() functions can optionally save nodes in the binary format (disabled by default).
  • Improved pathfinding: a depth parameter added to the NavigationMesh class for better control over accuracy/speed of path calculation.
  • Added world thread counters into profiler.
  • Added access to world threaded resources information:
  • Fixed crash on the incorrect variable name in toggle and switch console commands.
  • Fixed bounding sphere calculation on double precision builds.
  • Added a NodeReference.releaseNode() method which releases the internal node of ownership so it is no longer owned by the node reference (made orphan). After being released the node should be appended to one of the scripts not to cause a memory leak.
  • Increased precision of the Bezier function on double precision builds.
  • Added support for double/float precision build configuration into Visual Studio projects.
  • Added support for Microsoft Visual Studio Express 2013.


  • Added a new id() container function to Vectors and Maps. It returns the internal integer ID of the array which can be used inside a call() function for array passing.
  • Fixed namespace reflection.
  • Fixed nested ternary operators.
  • A classid() system function can now accept string type values as an argument.
  • A class_cast() system function can now accept classid() integer values as a target class argument. It provides better performance.
  • Recursive functions will work inside the ASync class safely.
  • Fixed recursive calls of functions with reference arguments.
  • Added a debugging get_memory_usage function to system functions.
  • Added a key() member function to all user-defined arrays to get a key by the element index. It can be used for both vectors and maps: for vectors it returns the index itself, for maps it returns the key (similar to the get() function returning data).
  • Added an instanceid() function, which returns unique ID of the user-defined or external class instance.
  • Added an instanceinfo() function.


  • HBox and GridBox widgets now modulate the color of their children.
  • Added a setFixed() function to VPaned and HPaned widgets. setFixed(1) means that the top (or left) split has a fixed height (or width), setFixed(2) means a fixed size for the bottom (or right) split.
  • Added background, stencil and color accessors to the high-level Unigine::Widgets::VBox/HBox/GroupBox/GridBox/EditLine/EditText classes.


  • Added a "Last update" date tag at the bottom of every page in the documentation.
  • Updated a Programming/GUI section: added info on localization, added more examples, updated info on all widgets and containers, added description of reference and include tags.
  • Updated UnigineScript function library.
  • Updated C++ API function library.
  • Updated a Content Creation/Materials section: added examples of materials inheritance and custom materials creation.
  • Added a Programming/Material File Format article, providing an info on .mat file structure.
  • Updated a Tools/ImageDDS article: added documentation on types of the image formats, updated list of CLIs and batch operations.
  • Updated a Development for Different Platforms section: added documentation on project compilation via Xcode, updated list of options for manual and semi-automatic compilation.
  • Updated Game Framework documentation.
  • Updated a Principles of Operation/File System article: added info on .ulist files.
  • Added a Tools/Launcher article.


  • Android version is now compatible with data streaming and can load assets and resources from multiple threads.
  • iOS application can work in portrait mode (it must be compiled with the set APP_PORTRAIT definition).
  • Fixed OpenAL sound cone parameters.
  • Changed default names of the sound library to (Linux) and libopenal.dylib (Mac OS X).
  • Added a missed Collision flag to ObjectMeshClutter in UnigineEditor.
  • Fixed billboards orientation in impostor grabbing tool.
  • Fixed Interface plugin on Mac OS X: no more black window problems.
  • Fixed incorrect behavior of Interface plugin in the fullscreen mode.
  • getTransformScale() and decomposeTransform() functions from utils.h are now compatible with double precision of coordinates.
  • Benchmarks and content-heavy demos (Crypt, Character, Passage, GI, Tessellation, Sanctuary, Tropics, Heaven, Valley, Urban Driving) are excluded from SDK installers, they are available for download as separate .ung data packages in order to reduce amount of data to download on each update.

I/ITSEC 2013

In the beginning of December UNIGINE Corp. has participated in I/ITSEC 2013 (the world's largest modeling, simulation and training conference) in Orlando, USA.

The main feature of our booth was Bell 206 rescue helicopter simulator, which was built in cooperation with CogSim Technologies. It had a cockpit from a real Bell 206 helicopter, instruments simulation and 6 visual channels (4 front ones and 2 for lower windows), synchronized by means of CIGI network protocol. As a content database we showcased our 262x262 km landscape demo.

The same content project was also demonstrated at 3D perception booth during the whole show at a 150 degree curved screen (3 visual channels, 6 projectors):

UNIGINE demo at 3D perception booth

It was a great show, we had enormous traffic in our booth. A lot of attendies claimed that our simulator was the best image generation technology at the expo floor. Great thanks to the UNIGINE team and our partners!

Simulator setup

Simulator setup

2013-11-27   |   CIGI Support, Better Support for Geodata, Game Framework

CIGI Protocol Support

Common Image Generator Interface (CIGI) protocol has been fully implemented into UNIGINE. This interface is a standard way for a host device to communicate with an image generator (IG) in the simulation industry, especially for professional flight simulators.

The implementation supports all common functionality of CIGI (versions 3.0, 3.1, 3.2, and 3.3) and can also work in both active (master) and passive (slave, if the host address is NULL) modes.

In order to use CIGI, activate the corresponding engine plugin (CigiClient) and take a look at data/samples/plugins/cigi_client_00 sample.

Here is the 6-channel rescue helicopter simulator powered by UNIGINE, working via CIGI in 60 Hz mode (the Bell 206 cockpit is provided by CogSim Technologies):

This simulator will be installed in the UNIGINE booth #307 at I/ITSEC conference next week (Orlando, December 2-5).

Better Support for Geodata

Added support for conversion of WGS84, ECF and NED coordinate systems into Cartesian one. This enables easier usage of real-world GIS data (both vector and raster ones) in UNIGINE-powered projects.

To use the converter, include the following script: data/core/scripts/geodetic.h (see source/tools/Interpreter/scripts/core/geodetic.usc sample for more details). The getDelta() function calculates the offset between geodetec and Cartesian heights.

Here are some updated screenshots from our rescue helicopter simulator, that uses real geodata:

Helicopter Simulator demo

Helicopter Simulator demo

Introducing Game Framework

A game creation process becomes easier, as we have implemented a highly-customizable Game Framework. It covers three fundamental concepts of the game: Level, Entity, and Game.


  • Automatic link between Entity and Node.
  • Automatic link between Level and World.
  • Initialization of Entity parameters with Property file.
  • Object management for Entities.
  • Global Game context across all Levels.
  • Events handling system.
  • Scheduling of the periodic call of a function, with support for automatic time spreading over several frames.
  • Optimal updating of Entities.

Here is the execution sequence for the framework:

Game Framework Execution Sequence

There is a special UnigineEditor plugin for Game Framework, which can be helpful to:

  • Manage Game, Levels, Entities.
  • Attach Entities to Nodes and place them in the world (by simple drag&drop operation).
  • Build the inheritance hierarchy for Entities.
  • Generate Property files for Entities.
  • Quick launch of the Game.

Game Framework Editor

The framework files are located in data/framework, there are several usage examples in data/framework/samples, and detailed documentation in the UnigineScript / High-Level Systems / Game Framework section of the reference manual.


  • Increased FPS stability.
  • Two new options, a 2D noise and 3D noise (States tab in the editor), have been added to the mesh_leaf_base material, so you can use a 2D and 3D texture at the same time. As both of them are applied, we have two spatial noises to make leafs look much more realistic. Some manual renaming inside material files for all materials, which are inherited from mesh_leaf_base, is required, though: state noise to noise_3d, parameter noise_scale to noise_3d_scale, parameter noise_transform to noise_3d_transform
  • A new parameter, Occlusion mask, has been added to all of the materials (Common tab in the editor). If the parameter is disabled, the ambient occlusion effect would not be applied to the selected surface.
  • Added time budget control for creation of vertex buffers and textures per frame (engine.render.setBudget(), in seconds via UnigineScript or Render settings -> Common -> Render budget, FPS value via the UnigineEditor).
  • A new global console variable, render_use_stencil, has been added for single pass decals. It is needed in the case of intersecting of two or more decals to avoid the intensity increase in the area of intersection (this artifacts are present only in the light rendering passes).
  • Improved virtual camera offset for ObjectMeshCluster, ObjectMeshClutter and ObjectGrass objects.
  • Heights of clutters and grass are synchronized now.
  • Fixed crashes on rendering of non-Flash splash screens.
  • Particle systems receive environment light and can be lit by WorldLight in the ambient rendering pass.
  • Fixed rendering artifacts on iPhone 5S.
  • Added new multiple viewport sample: data/samples/render/viewport_03.
  • A new Length flattening parameter has been added to particles (Params -> Type -> Length in the ObjectParticles node settings). It flattens length particles in a range of 0-100% (before that, they always faced the camera).
Disabled Length FlatteningDisabled Length FlatteningEnabled Length FlatteningEnabled Length Flattening

Flattened particles can be used, for example, to simulate the waves caused by the helicopter rotors:

Helicopter Simulator demo


  • Added deterministic physics mode: engine.physics.setStable(), disabled by default.
  • New functions, setCollision() and getCollision(), have been added to the ObjectMeshClutter object (Mesh -> Collision). If the function is set, the collision will occur only if geometry is completely generated and new geometry won't be generated by collision detection request; otherwise, the collision will occur in any case.


  • New functions, setOffset() and getOffset() have been added to the WorldLayer, WorldSwitcher and WorldExpression nodes. Setting this function shifts the center of the node to make world constructions more flexible. The Offset parameter can be found in the Layer, Switcher and Expression tabs of the WorldLayer, WorldSwitcher and WorldExpression objects correspondingly in UnigineEditor.
  • New functions, setTargetTypes() and setExcludeTypes(), have been added to the WorldTrigger class. You can set the nodes which will be affected by their type.
  • A NodePivot object has been updated, so now it can be edited correctly for double precision binaries.

Resource Management

  • Streaming of meshes has been added to the Filesystem along with the files and images. Meshes are prepared for intersection right after the loading without any performance stalls.
  • New console variables, world_manager_images_memory and world_manager_meshes_memory, setting the cache memory limits for world resources have been added to the World manager.
  • Render, World and Sound global managers have been updated, so they are thread-safe now.
  • Image and mesh masks of the ObjectGrass, ObjectMeshClutter and WorldClutter objects will never be preloaded during the flush() execution.
  • Creation or loading of the WorldLayer object can be controlled by the World Budget parameter.


  • The interpreter restoreState() function has been updated, so the comparison operators would not be called for maps with UserClass based keys, as it is done for UserArray based keys.
  • A function, written as foo( ) (with a space), now has the correct signatures.
  • Enums can possess the value of previously specified enums: {ONE=OLD_ONE}; now.
  • A basic sleep() function is thread-safe now.
  • There is no engine crash if the stack is overflown.
  • Deletion of the Expression no longer cause crashes.


  • Landscape plugin can now initialize mesh based masks and layer nodes.
  • Fixed editing of multi-level object masks in UnigineEditor.
  • A new Mesh-to-Water script, translating a mesh into the WaterMesh object, has been added: source/tools/Interpreter/scripts/world/mesh_to_water.usc. A field mask can be set to water by the -f command line instruction.
  • A similar Mesh-to-Decal script has been added: source/tools/Interpreter/scripts/world/mesh_to_decal.usc.
  • Interface plugin creates rendering buffers under Direct3D9 and Direct3D11 only when this is required.
  • Visualization of the GPUMonitor plugin info can be controlled by show_gpu console variable.


  • Memory allocation policy has been changed. The large allocation block memory has been reduced to 256 kB, so the system allocator will respond to all of the allocations bigger than this number. This reduced the memory fragmentation and optimized the memory usage. Used system allocator memory is now displayed in the performance profiler.
  • The vector allocation progression has been changed from 2.0 to 1.5, that slightly reduced memory consumption.
  • Debug plugins can now be used with release version of the engine and vice versa.
  • All of the C++ API samples are now compatible with the double precision binaries. All of the Makefiles have set debug=1 and double=0 command line instructions.
  • Material and property removing operations have been updated, so the engine no longer stops responding.
  • Editing of big size grass and clutter masks no longer causes a scene hang.
  • Field animation effect would not be multiplied by render animation settings.
  • All of the material expressions and WorldExpression nodes are now affected by external (e.g. from an engine plugin) #define directives.
  • A Windows logo key hook is now initialized only for full-screen applications.
  • Thread::getID() static function has been added into the C++ API. The function returns the unique cross-platform thread identifer, zero means the main working thread.
  • Added new sample of accessing .ung archives from the asset folder on Android: source/samples/Android/Archive.
  • Added detection for Apple iPad Air and iPad Mini 2.


  • Documentation on Game Framework has been added.
  • Updated UnigineScript function library documentation.
  • Updated articles on Script Debugging and High-Level Scripts/Basic Utilities.
  • UnigineScript / Control Statements and Containers articles have been updated and restructured.
  • Added article on the base Interface class.
  • Documentation on the MeshImport tool has been added.
  • Upgrade Script article has been updated.
  • Console article has been updated.
  • Added documentation on C++ internals of the engine (available for full source licensees only) with a lot of class collaboration diagrams.

Class collaboration graph

In the Meantime...

We have released Oil Rush for iOS and added support for NVIDIA Tegra 3/4 to Android version.

P.S.: a lot of UNIGINE team members will be available in the booth #307 at I/ITSEC conference next week, contact us via to make an appointment.

2013-10-01   |   Improved Background Loading, Updated Documentation Site

Documentation Updates


A lot of improvements were introduced for Unigine documentation, so it has become much easier to use:

  • Brand new user-friendly design.
  • Improved layout for C++ API and UnigineScript documentation.
  • A new convenient and handy structure.
  • More relevant search results.
  • Highlighting of the matching words.
  • Redirection to the part of the text where matching words were found.
  • An opportunity of searching only in the specified categories.
  • Advanced syntax operators and modifiers for the smart search.
  • Quick navigation filter.



Background Loading of Nodes

Loading of node (.node, .world), material (.mat) and property (.prop) files is performed in a separate system thread now, in addition to async content streaming. Material and Property managers are now thread-safe. It is possible to fine control loading queue by organizing files in groups and settings individual weights inside them (the same system as engine.filesystem.loadFile() has). Use node_delete() (include unigine.h from the script to make it available) for complete node removal from the RAM.

A new object called WorldLayer is implemented: it starts to automatically load the node in the background beginning with the specified distance. A sample of WorldLayer usage can be found in the data/samples/worlds/layer_00 folder.

Other modifications of data streaming system:

  • New console commands handling background node loading have been added:
    1. world_queue shows queued and loaded nodes the same way as the filesystem_queue command
    2. world_clear clears the queue and all of the loaded nodes
    3. world_delay sets the time delay between loading of the queued files in seconds (works the same way as the filesystem_delay command)
  • The NodeSector node has been completely removed.
  • A set of world node streaming functions (both sync and async) has been added into Unigine::World C++ interface.
  • Engine can stream files and images from packages (.ung, .zip, Android assets) now.
  • A new Unigine::FileSystem C++ interface has been implemented. This interface contains File System related functions and can be used for background file and image streaming (the previous File System interface declaration has been removed from the Unigine::Package interface).


  • A non-linear filmic HDR correction has been added. It is activated by render_use_filmic console variable. Filmic correction provides better image quality.
  • A shader parameters control has been added into ObjectDynamic. Now it's possible to pass named shader parameters into the object and receive them in shader.
  • It's now possible for ObjectDynamic to disable hardware instancing while rendering, which can be useful for some customized objects.
  • All materials now have a normal map Scale parameter.
  • The field_mask material has been removed from the grass_base material. The Field node specifying the field mask can be used instead.
  • Material downsize options have been extended:
    3. New DOWNSIZE_FORWARD_FILTER/SCALE options have been added. This mode allows the user to use the object geometry as a background layer for composing, so there will be no problem with all the depth sorting problems. These options are designed for complex water rendering on mobile devices.
  • More flexible angle configuration for the mesh_paint_base material. The current lobe size has been doubled.
  • ZNear and ZFar clipping plane parameters for the Reflection material have been removed, camera values are used instead. A Distance parameter has been added, it sets maximal rendering distance from the camera.
  • A new material parameter called Light blending has been added. It forces the current material blending mode onto light rendering passes.
  • A new Radius parameter has been added to the volume_shaft_base material. It allows the user to set the volume radius.

Radius parameter


  • WidgetSpinBox attachments of WidgetEditLine will be always in their correct positions.
  • WidgetTreeBox and WidgetListBox classes updates:
    1. set/isItemHidden() methods for WidgetTreeBox class have been renamed: set/isItemFolded(). The old set/isItemHidden() method is used to hide the items without removing from the WidgetTreeBox class.
    2. The set/isItemHidden() method has been also added into the WidgetListBox class.
    3. WidgetListBox and WidgetTreeBox widgets now have set/isItemSelectable() methods for advanced selection control.
    4. WidgetListBox and WidgetTreeBox widgets will fire clicked and pressed callbacks on corresponding mouse actions.
  • An ASCII text validator for text edit widgets has been added.
  • A bug with incorrect mouse cursor position (when it is out of the screen) of the ObjectGui has been fixed.
  • Linux-specific Interface plugin issues have been fixed.
  • The Gui::getColor() method has been renamed Gui::parseColor().
  • A global color multiplier has been added into the whole GUI system. It multiplies the GUI color with another specified color.

    New methods, set/getColor(), setting/getting the color have been added to the WidgetVBox, WidgetGroupBox, WidgetWindow, GUI and Flash classes.

    A sample of the color multiplier usage can be found in the data/samples/widgets/color_00 folder.

GUI Color Multiplier


  • Flash-based splash screens changes:
    1. Flash splash screens are always scaled vertically and will not change their aspect ratio automatically. To keep the correct aspect ratio, ActionScript logic is required.
    2. Flash splash screen is cached to remove the file loading before loading of each world.
    3. Image-based splash screens have been replaced by Flash-based ones in the engine.
  • Flash player now loads bitmap characters on a loading stage in a different way: they are uncompressed on demand only. This has increased the loading speed.
  • Correct Arial font loading without respect to upper and lower case has been implemented.
  • getUpdateTime() and getRenderTime() functions which return update and render time values have been added.
  • A bug affecting calling wrong Flash functions from the engine interface has been fixed.
  • Added a support of the Flash 11.2 visible flag.
  • A global color multiplier has been added to the Flash interface as well. WidgetFlash class colors will be affected by it.


  • New interfaces, PlayerDummy and NodeReference, have been added. A sample of handling PlayerDummy node can be found in the source/samples/Api/Players folder.
  • A new Sound interface with base sound functions has been implemented.
  • Functions with variable arguments count are now available. A sample of their usage can be found in the source/samples/Api/Stack folder.
  • New interfaces, Timer, Thread and Atomic lock, responsible for time counting, parallel threads and threads synchronization respectively, have been added. A sample on the Thread interface can be found in the source/samples/Api/Thread folder. A sample on Atomic lock interface has been renamed and now can be found in source/samples/Usage/NoData folder.
  • Added Variable methods for external class memory management, including the Variable::releaseExternClass function, that unregisters an external class from the script without handling it's address.
  • An access to the current interpreter stack has been added, see source/samples/Api/Stack for more details.
  • JPEG data sources are now scanned very fast (only headers are read).
  • A new method called Package::clone() has been added. It creates a clone of the Package, so the loading can be done in several threads.
  • Several methods for stereo parameters configuration have been added to the Render interface: Render::set/getCameraThreshold(), Render::set/getStereoDistance(), Render::set/getStereoRadius() and Render::set/getStereoOffset().
  • Configuration files can now be loaded, saved and flushed from the API.
  • All the add* methods of ObjectMesh, ObjectMeshDynamic and ObjectMeshSkinned classes will return the index if they were added properly.


  • Interpreter is thread-safe now. It stores thread instances in the per-thread Map. So multiple Interpreter invocations can be called in same time from different threads.
  • Added abstract virtual function declaration in C++ style: ( = 0).
  • The support for Interface class has been added. It works similarly to C# and Java classes.
  • Introduced "UnigineScript Tips & Tricks" thread on the forum for useful code snippets.
  • Improvements on classes inherited from Node, Body, Shape or Joint classes:
    1. The clone() method has been changed. Now it returns the reference on the base type (cloned pointers require the class_cast operation).
    2. A new swap() method has been added for swapping objects of the same type saving the pointers. This method will be helpful with stable object pointers on undo editor operations.
  • Safe callback removing for NodeTrigger, WorldTrigger, PhysicalTrigger, Body and Joint classes has been added.
  • A new function named class_release() has been added. It removes all the references to the external class, thereby removing even the smallest memory leaks.
  • A new function engine.filesystem.isKnownFile() returns a value on registered file names from all of the available resources (data files, archives etc.)
  • New user array capabilities have been added:
    1. The typeinfo() member function returns the string with all of the array elements.
    2. append() and remove() functions with additional arguments are useful for advanced vector copying and removing.
    3. A merge() function has been added. For vectors, it adds one array to another; for maps - adds one map to another considering the keys: if such a key already exists, it won't be added.
  • New library functions have been added:
    1. The is_null() function is helpful for comparison operation with null when the user class equal operator is defined.
    2. The get_thread() function will help to determinate a current thread identifier. All the non-threaded code has -1 thread identifier.
  • A new "super" keyword has been added. "this" and "super" keywords can be used for non-virtual function calls. A function calls base foo() function of its own derived class.
  • All the write functions of the Stream class will return 0 or 1 values depending on the operation status.
  • A script cache will never be saved if there is no input source code.
  • An additional cache flag has been added into function. It is enabled by default.
  • The engine.editor.clearBuffers() function has been renamed clearBindings(). This function is a thread-safe for multiple invocations from different hardware threads.
  • Rendering/Physics/Game/Sound/FileSystem statistics counters have been exported into UnigineScript, see the corresponding functions in engine.* libraries.
  • The Async class can call user defined functions in the separate thread.
  • A global script callback named "destroy" has been added. It's called when user changes a video mode or destroys the graphical content. This callback recreates and precaches some of the resources.

Mobile platforms

  • Migration to iOS 7.0. and XCode 5.0 has been made.
  • iOS applications restore the sound after the incoming call is over.
  • iOS applications save a configuration file in the Documents folder without respect to the current project name.
  • iOS runtime now knows the device model number for correct device identification.
  • Android runtime can stream all of the resources from assets folder without any rendering stalls.
  • Exception handling and RTTI options have been removed from iOS builds, the performance was significantly increased as the result.
  • Android builds use the ARM NEON instructions by default.
  • Alignment linking warning when using Theora compression format on iOS has been removed.
  • Build scripts for Android target on Windows host have been added.


  • All of the engine managers will check file modification time for resource creating when the UnigineEditor is loaded. It will remove an issue with wrong "old" mesh loading when file was modified after loading it inside the engine.
  • The DecalDeferredMesh object projector now recalculates normals with respect to the new geometry in the UnigineEditor.
  • User plugins can add additional tabs into the Nodes window. UnigineEditor saves the tab number for different node types separately.
  • A bug with the loosing of the Nodes window focus after it moved up or down has been fixed in UnigineEditor.
  • ImageDDS is able to create new Cube, 3D or 2DArray images with the -t parameter. A new -z parameter for depth specification has been added.
  • A bug with the node property reassign on property name editing has been fixed.
  • MeshUpgrade tool has been renamed MeshImport. This tool can translate outdated meshes into the new format as before, but it also supports importing of such formats as .3ds, .lwo, .obj, .bsp, .md5 etc. It also can convert meshes into the specified file formats.
  • ImageView and FlashView tools can be closed on ALT+F4 under Windows.
  • USC-based script, translating mesh object into DecalDeferredMesh object, has been added. It can be found in the source/tools/Interpreter/scripts/world/mesh_to_decal.usc folder.
  • Texture-based node handles have been added, so now they are displayed with icons of the appropriate type. All intersection-less nodes have been switched to the texture based handlers.

Texture-based handlers


  • References to resources outside the data directory will be saved relatively to the data directory.
  • Custom exception implementation has been added for iOS, Linux and Windows platforms.
  • All render and sound manager memory limits can now be configured via corresponding console variables: render_manager_meshes_memory, render_manager_textures_memory, sound_manager_sample_stream_memory and sound_manager_sample_static_memory. Render manager limits are now declared in percents of the total GPU memory.
  • Mesh and skinned mesh files are automatically reloaded during the file modification, if a mesh has the same amount of surfaces and the same name (for skinned meshes, the amount and location of bones must be the same too).
  • Property libraries are unloaded without crashes.
  • All of the C++ export templates now have an identifier that can be used for multiple groups external info export.
  • AppPanorama plugin will export HAS_APP_PANORAMA script define and simple API to control the size of the edge blending border.
  • A WorldTrigger touch mode has been fixed.
  • All player shapes have been initialized as non-continuous.
  • A new console variable called world_show_players has been added. It shows all of the world players: PlayerActor, PlayerDummy, PlayerPersecutor and PlayerSpectator.
  • The MeshSkinned class is now safe for bones, frames and surfaces injection.
  • A plugin for the Razer Hydra 3D controller has been added.

Razer Hydra

Wow, that was a huge update! More to come next month, stay tuned.

2013-08-16   |   Road Decals and UnigineScript Cache

Road Decals

Introducing new object: DecalDeferredMesh. It allows to create mesh-based orthographically projected decals on all underlying geometry. DecalDeferredMesh can be used to create roads or markings and inscriptions on any surface.


A 2D mesh is required to generate these decals, decal_deferred_base material is used for shading.

FieldSpacer and FieldAnimation

FieldSpacer has replaced a WorldSpacer node, which is removed now. It can be applied to grass and water and allows to specify areas, that won't be rendered.

FieldAnimation node affects procedural shader vegetation animation parameters - it allows to animate only selected parts of grass and vegetation. Grass, leaf and stem shaders will be affected by FieldAnimation node only when Field mode of Animation option is enabled.

Both objects supports box and ellipsoid shapes.



  • Added support for parallax oclussion mapping into decal_deferred_base material, shadows are received with respect to it.
  • decal_terrain_base material uses correct terrain normal texture as a base normal level, so this material can be used as an additional terrain detail materials provider now.
  • It is now possible to control virtual shader origin offset, as well as maximal camera distance threshold (if the distance from the origin is larger than the threshold value, the origin will be automatically moved to the camera).
  • Full Oculus SDK sources are required for Oculus Rift plugin compilation (set path to it in the OCULUSROOT environment variable).
  • The number of polygon offset modes has been increased, as mesh based decals require huge polygon offset values to be precise and artifacts free.
  • All mesh-based nodes like WorldOccluderMesh/NavigationMesh/DeferredDecalMesh/NavigationMesh will have setMesh/getMesh methods for dynamic mesh reinitialization. These methods receive ObjectMesh node as an argument.
  • Functions for line rendering with multiple (3 and 4) point arguments have been added: engine.visualizer.renderLine3D().
  • Maximal size of a single Terrain object have been reduced to 32769 x 32769, it is recommended to use multiple terrains (see the Landscape tool) in order to achieve large worlds.
  • Achieved better render compatibility with DirectX 11 feature level 9.1.
  • Texture anisotropy filtration has been enabled for grass and impostors by default.
  • Optimized grass and clutter object generation when seen from high altitude, reduced CPU load.


  • Added dedicated shader virtual offsets for WidgetSpriteViewport and WidgetSpriteNode widgets.
  • A bug in loadSkin() function has been fixed.
  • WidgetSprite* widgets work correctly on all available platforms now.


  • push|popWorld, push|popEditor functions have been removed, use pointers to the corresponding interpreter (obtained via Unigine::Engine::getSystem|World|EditorInterpreter() or Unigine::Interpreter::get() for the current interpreter).
  • runSystem/runWorld/runEditor functions have been renamed into runSystemFunction/runWorldFunction/runEditorFunction.
  • New Stream::read|writeArray() functions have been added.
  • New Stream::isAvailable() function has been added, it indicates that the stream isn't ended yet.
  • Added new functions for struct/public class member accessing: addSetFunction() and addGetFunction(), see source/samples/Api/Structures sample.
  • Added min/max/clamp/lerp functions for scalars and vectors.
  • Added a quaternion to matrix multiplication functions.
  • Added left and right matrix to vector multiplication functions.
  • Constant iterators and iterators for Vector, Set and Map containers have been added.
  • Vector::space() function has been added. This function returns the allocation size of internal buffer.
  • Added an application sample with built-in resources (so the result is a single executable with no file dependencies, like ResourceEditor): samples/Usage/Atomic.


  • Reflection class can provide names for the current and base classes on the given object.
  • Reflection class is able to return the function identifiers for call() method.
  • Arrays can be passed as references to the functions.
  • Fixed incorrect type casting for from external to user classes.

UnigineScript Cache Files

UnigineScript can be pre-compiled into cache file in order to achieve faster initialization and for distributing final builds without full script sources.

The cache for system and editor scripts is generated automatically (or re-generated, if checksum of the source files doesn't match the one stored in the cache) every time you start the engine, to generate the world script cache one needs to pass file name as the second argument to world_load command.

The engine looks for the world, system and editor cache files inside the data folder first, after that they are looked for according to the cache_path variable. system_cache and editor_cache console variables can override default file names for the corresponding scripts. File name for the world script cache is passed to world_load command as the second argument, world_reload console command can receive the cache file name as an argument as well.

Now it is possible to make cross-platform generation of cache files (e.g. generate a world cache for Android on Linux): a new engine build option called emulation has been added to produce Windows/Linux/Mac binaries emulating the selected platform (script defines, list of available functions). The available emulation values are: ps3, android, ios, winrt, webgl, none.

Mobile platforms

  • has been re-factored to the function-based platform detection instead of preprocessor directives use (_IPHONE, _IPOD and _IPAD defines has been replaced with engine.tablet.isIPhone|isIPod|isIPad() functions; to get the device version use engine.tablet.getVersion() function).
  • Added chain shader for mobile platforms.
  • It will be possible to pass Java byte arrays to/from Unigine based Android application. As byte arrays, any kind of parameters, even images, can be passed. A corresponding sample is located under source/samples/Android/Buffers directory.
  • NEON optimizations for Image sampling and Particle noise calculations have been added.
  • Added support for terrain on mobile devices (it supports 3 detail materials without normal maps, similar to mesh_terrain_base material).


  • ImageDDS tool is now case insensitive to the image format and type.
  • Access to Field nodes have been added into the Tracker.
  • A configurable ambient and light colors for MeshViewer tab in the ResourceEditor have been added.
  • Export Mesh function in UnigineEditor saves currently generated ObjectMeshClutter data as well.
  • Material texture wrapping and anisotropy parameters can now be changed inside the UnigineEditor (by pressing Edit button next to the texture tab). The modifications will be saved inside the material file. This option allows to use decals in a more flexible way.
  • All engine resource managers will check file modification time for resource creating when the editor is loaded. Thus there will be no problems with loading outdated meshes if they were changed after the start of the engine.


  • Xml::clearUnusedData() function can stop printing warnings on unused data in XML files.
  • Migrated to DirectX runtime libraries version 43.
  • Property::isParent() and Material::isParent() functions have been added.

1 2 3 .. 23>