Development log: July 21, 2011

Support of huge worlds

From now on Unigine can handle as large worlds as required. In addition to effective data streaming the engine supports double precision of coordinates instead of float data type.

It's possible to create virtually unlimited worlds with the highest level of details (maximum coordinates are effectively 536,870,912 times larger). If a single precision world compares to an Earth range, double precision allows to create the whole Solar System and beyond. This feature can be very helpful for some VR/simulation applications, e.g. for flight simulators.

World management:

  • Added support of double precision coordinates (requires replacing standard engine libraries with special ones; use "scons double=1" to rebuild).
  • All objects are rendered in camera space.
  • All nodes works in relative space.
  • All functions that deal with world coordinates use special define-controlled data types (Scalar, Vec2, Vec3, Vec4, Mat4), which are replaced with float or double precision types depending on a build type.
  • Removed Node::isWorldBounds() and Object::isWorldRender() functions.
  • engine.world.getIntersection(), engine.world.getCollision() and similar functions can only work if provided arguments are of the specific data type: vec3 and float, dvec3 and double, vec3 and vec3, dvec3 and dvec3, mat4 and mat4, dmat4 and dmat4. Arguments with different precision can't be mixed together.
  • Increased the maximum number of possible node children.
  • Decals do not use world space transformations any more. Instead, they are attached to ObjectSurface they are projected onto and are rendered using object transformations. ObjectDecal is always a child of its target Object. (All decals stored in world files need to be re-generated: UnigineEditor -> Tools -> Batch -> Update decals).

Render:

  • Fixed smooth interpolation for shift particles by low FPS values.
  • Particles can cast volumetric shadows (not compatible with MSAA).
  • Visualizer functions take arguments in the different order: first transformation and then color.
  • Added renderMessage2D() and renderMessage3D() functions into the visualizer.
  • Billboard orientation can now be fixed along X or Z axis.
  • All shaders got rid of modelview matrices.
  • Added render_use_rgb10a2 console variable: use RGB10A2 (by default) or RGBA8 texture format for the screen buffer.
  • Added render_use_vertex_float console variable for increased Z-axis precision of static meshes (if used, expect memory consumption increase and performance drop).
  • Added render_use_directional_lightmaps console variable to enable directional lightmaps (2*2 tiles) instead of simple ones. If you use external lightmapping tool, disable this option.
  • Removed the limit for maximum cell count of grass.
  • Added reflection_power parameter for 2D reflections (to increase reflection distortion with the distance).

UnigineScript:

  • Added dmat4 data type of double precision (a matrix of 12 double components). This is a 4x4 affine transformation matrix with the last row not stored. Instead, the last row is always of the form "0 0 0 1" and its values cannot be written, only read.
  • Added render() function into the world script. It's called after states of all nodes were updated and before rendering and physics simulation have started. It can be used to create attachments to bones, blend skinned mesh animation with ragdolls, etc.
  • Added check for division by integer zero.
  • Added float data type support support by % operator.
  • Added new automatically substituted types (to use, include data/core/unigine.h): Scalar, Vec3, Vec4, Mat4, Vec3_zero, Vec4_zero, Vec3_one, Vec4_one, Vec3_epsilon, Vec4_epsilon, Vec3_infinity, Vec4_infinity, Mat4_identity. (Their precision depends on USE_DOUBLE define).
  • Added Unigine::getScreenPosition() helper function that translates world space coordinates into screen space ones.

Physics:

  • Fixed crash on multiple sequential runs of the engine.
  • Added SkinnedMesh::getFrame() function that copies the final updated bone transformation on a given layer (useful for blending animation with physically driven transformations). Usage example can be found in data/samples/physics/ragdoll_13 sample.
  • Added "Continuous" flag for shapes (allows to disable continuous collision detection for spheres and capsules).

Other:

  • Added Unigine Mac OS X SDK.
  • Added Unigine iOS SDK.
  • Added support of NEON instruction set for ARM platforms (available for iOS only; not supported for Android due to GCC bug).
  • Added OpenAL support for Android.
  • Added dmat4 data type of double precision into C++ API.
  • Added C++ API defines: UNIGINE_SCALAR, UNIGINE_VEC3, UNIGINE_VEC4, UNIGINE_MAT4 (their precision depends on UNIGINE_DOUBLE define).
  • Changed console variables controlling multi-threading behavior: physics_threaded (instead of physics_num_threads), world_threaded (instead of world_num_threads) and pathfind_threaded (instead of pathfind_num_threads).
  • Export of node names in UnigineMenu.ms script for 3ds Max.
  • Added Unigine::Ffp C++ API sample.
  • Added "Features" string into the log file; lists all built-in optional features.
  • Added functions to remove decals projected onto objects.
  • Fixed a file search bug with icase option enabled.
  • *_inf variables are renamed to *_infinity (it's equal to 1e+9 now); *_eps variables are renamed to *_epsilon.
  • Memory manager deallocates its pools on engine shutdown, if possible.
  • Migration to android-ndk-r6.
  • Fixed numpad keys handling in Linux.
  • Added samples on handling animation.
  • Added samples on ragdoll attachments.
  • Added a sample on assigning a custom GUI skin.
  • Added samples of random and noise generators.
  • All samples were refactored to support double precision of coordinates.
  • Added Unigine::App::get() function into C++ API to control the current application.

Documentation:

  • Updated information on ImageDDS.
  • Added a new "Development for Different Platforms" section: updated articles on Windows and Linux application development.
  • Added Mac OS X Application Development article.
  • Added iOS Application Development article.
  • Added Manual Compilation via SCons article.
  • Added Project Optimization for Mobile Devices article.
  • Updated information on Build script.
  • Added Double Precision Coordinates article.
  • Updated UnigineScript function library.