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

Improved Background Loading, Updated Documentation Site

Documentation Updates

Documentation

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.

Documentation

Documentation

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).

Renderer

  • 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 intoObjectDynamic. 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:
    1. MATERIAL_DOWNSIZE_BACKGROUND_FILTER/SCALE options have been renamedMATERIAL_DOWNSIZE_ALWAYS_FILTER/SCALE.
    2. MATERIAL_DOWNSIZE_FILTER/SCALE options have been renamedMATERIAL_DOWNSIZE_GREATER_FILTER/SCALE.
    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

GUI

  • 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 renamedGui::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

  • 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.

C++ API

  • New interfaces, PlayerDummy andNodeReference, 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 andAtomic 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() andRender::set/getStereoOffset().
  • Configuration files can now be loaded, saved and flushed from the API.
  • All the add* methods ofObjectMesh, ObjectMeshDynamic and ObjectMeshSkinned classes will return the index if they were added properly.

UnigineScript

  • 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 developer.unigine.com forum for useful code snippets.
  • Improvements on classes inherited fromNode,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 forNodeTrigger,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 super.foo() 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 engine.world.loadNode() function. It is enabled by default.
  • The engine.editor.clearBuffers() function has been renamedclearBindings(). 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.

Tools

  • 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

Other

  • 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 andsound_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 andPlayerSpectator.
  • 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.

Build: ()