Development log: February 11, 2013
OpenFlight and FBX Import, Collisions with Mesh Clutters/Clusters, and Extended C++ API
OpenFlight Import Plugin
Now it is possible to import assets from OpenFlight format, the simulation and training industry standard for geometry data. Added support for SGI texture format usually used together with OpenFlight.
The plugin imports polygonal geometry, including groups, loads and integrates Level of detail nodes into Unigine LOD system, and converts Degree of freedom nodes into NodePivot nodes for full control over mesh rotation. Due to smart management of external reference nodes, they are loaded only once and instanced. The model is added together with an assigned material and the whole set of textures, converted and compressed into real-time ready formats. Alpha blending for textures and polygon offsets (based on Subface nodes) for materials are also automatically supported. Moreover, the plugin imports infinite, local and spot lights with correct parameters read from the OpenFlight asset.
FBX Import Plugin
New FBX plugin allows for easy FBX import from any digital content creation applications that support this format. Given a FBX file, it loads all scene elements with their full hierarchy. That includes converting meshes into Unigine-native formats and optimizing them on the fly, automatic creation of materials, compression and optimization of textures for real-time rendering, as well as import of skinned animations, lights and cameras.
Make sure to put your FBX assets into the data folder so that they can be converted on-the-fly.
Both OpenFlight and FBX plugins, as well as the Collada plugin introduced previously, work with double precision coordinate builds.
Urban Driving Demo
Urban Driving demo is an example of player-controlled, physics-based vehicle demo in the urban environment, optimized for rendering via occluders. It also goes together with weather presets and a day-night cycle.
- GLSL shaders are now fully compliant with the OpenGL 3.2 core profile specification (instead of the compatibility one), improving compatibility with Intel and Apple OpenGL drivers.
- Added Bokeh flares (Render -> HDR -> Bokeh) available when both HDR and DOF are enabled. With them, bright areas out of focus are rendered with the bokeh effect (you can also set a custom texture for it).
- Improved the quality of HDR flares; a limitation on their length is lifted.
- Added a scattering direction vector (Render -> Scattering -> Direction) for a completely custom direction of scattering. Downward direction is also supported.
- Areal perspective correction for light scattering can be disabled by setting Render -> Scattering -> Areal from 0 (no correction) to 1 (height correction in full effect).
- Added alpha support for all primitives in the visualizer.
- Visualizer checks objects for visibility within the screen before rendering.
- Motion blur effect is available with double coordinate precision builds on huge distances from the world's origin.
- Motion blur flickering is fixed, no more issues in samples.
- Fixed issues with the motion blur effect when DOF is enabled: it is no longer rendered across the blurred areas.
- Billboard clouds (with billboards_cloud_base material) now automatically disappear when the camera is close to them to avoid any possible clipping artifacts.
- Removed UpSample and UpScale options in Materials. Instead, a new Downsize drop-down option allows for a fillrate optimization for transparent materials. It can downscale and filter them, and even render scaled and filtered material on the scene background (can be used for volumetric clouds).
- Fixed random flickering of the scene when multi-threaded physics is enabled.
- No more random sparkles with HDR and anti-aliasing enabled.
- Fixed a rare bug with incorrect lighting of grass, terrain and leaves with Ambient light option enabled in Materials.
- Fixed a bug with Receive shadow flag in Nodes -> Surfaces not working correctly.
- Correct handling of device remove event under DirectX 11 without crashes.
- Issues with DirectX 9 fullscreen mode are gone, handling of device lost event is completely safe.
- A debugging mode can be enabled for AppLevel plugin via the -debug CLI option.
- AppWall plugin safely handles invalid command line parameters.
- Removed iZ3D stereo support.
- Increased performance of LUT color correction when default render settings (such as Gamma, Contrast, etc.) are used.
- Changed the order of video modes: now resolutions with 16x9 aspect ratio come first.
- Added support for 2560x1440 and 2560x1600 resolutions.
- Added support for anti-aliasing for Mac OS X.
- Added full support for SGI image file format.
- Now all GPUs available in the system are detected. If GPUs are the same, they are listed, for example, as GPU name x2.
- Added X and Y flipping options for ObjectGrass, ObjectMeshClutter and WorldClutter to flip masks (if textures are flipped, lightmaps are influenced as well).
- Removed Compaction flag from ObjectMesh and ObjectSkinnedMesh.
- Decals with a new Dynamic flag checked are automatically updated in the non-editor mode. They are reprojected onto a surface when the decal node (or its parent) has been moved, or if they are enabled/disabled. It can be used, for example, to cast a decal-based shadow from a moving car.
- Added Distribute parameter for volumetric clouds of ObjectSky. It controls the density of clouds in the distance for better visual quality (use lower values for that).
Render Console Commands:
- Added a console command d3d9_render_use_alpha_to_coverage for disabling alpha-to-coverage under DirectX 9, if required. Now light scattering and all depth-based effects work impeccably when anti-aliasing is enabled.
- Removed a console command d3d11_render_use_geometry_shader, now it is always on.
- Console commands render_manager_load_* are renamed into render_manager_create_*.
- Console command render_manager_warm_shaders is renamed into render_manager_create_shaders.
- Console command render_manager_load_shaders is renamed into render_manager_check_shaders. This console variable should be used only for shader debugging purposes; its execution can be stopped by ESC key.
- Console command render_force_no_translucent is renamed into skip_translucent.
- If render options are skipped via render_skip_* console commands, they are automatically disabled in the interface.
Bokeh flares in action:
A new sample with a custom shader that calculates world coordinates based on depth buffer values: samples/shaders/coordinate_00.
- Arbitrary directories from outside the data directory can now be added to the file system via *.ulink files (much like mount --bind command in Linux). This link file contains a directory path relative to data and is stored anywhere inside of it. A slash symbol in the end is required, for example ../../my_project/. If a link file is added during engine runtime, filesystem_reload should be run.
- Added a console command filesystem_ignore. It takes a full directory name as a value and ignores all folders found within data with such names. It can be used to ignore version control systems (by default, .svn folders are ignored). Multiple values are comma-separated. This option comes into effect only after filesystem_reload is run.
- Removed FileSystem plugin as no longer necessary one.
- Script functions mkdir() and rmdir() can receive a second optional flag to create/remove all specified directories recursively (for example, a/b/c/d) at once.
- Console command data_icase is renamed into filesystem_icase.
- New NodePivot allows for easy control over node rotation. (It has two matrices inside: one sets the basis of rotation, and another one transforms children nodes.)
- Added Orientation flag for WorldTransform node. If unchecked, the child node preserves its initial orientation rather than being oriented along the spline.
- Fixed issues with large-sized WorldOccluder and WorldOccluderMesh.
- In *.world and *.node files a hidden attribute has been renamed into folded.
Make sure to run the utils/Upgrade/upgrade.py script to update node files format in your projects!
- Collisions with ObjectMeshCluster and ObjectMeshClutter objects are available now. (It can be either collisions with polygons or with simplified collision surfaces.)
- Fixed a bug with ragdoll bodies on saving and restoring the world state.
- Physical objects now interact with geometrical waves on water meshes with BodyWater assigned.
Interaction between water waves and physics:
- For a system GUI a custom font, skin and even a resource file can be loaded in run-time. This allows to change the default look of the engine interface.
- Added padding support (for top, bottom, left and right sides) for all box and window containers.
- New align tag can be used in UI files. Unless overridden in child widgets, it specifies a default align option.
- Added support for tables in all widgets with rich-text formatting (such as labels, buttons, etc.). Use <table/>, <tr/>; and <td/> tags; spacing and border color attributes are supported.
- No more need to use <text/> tags for any of leaf widgets (that cannot have children). For example, now it can be simply <label>text</label>.
- Added setBorder() function for WidgetScrollBox to disable or enable a border around it.
- Fixed memory leaking issue for WidgetCanvas.
- Added a bold font fontb.ttf into data/>core/gui/ to be used for interfaces.
- Fixed a bug with non-rendered space in some fonts.
- Fixed a bug with incorrect scaling of a WidgetWindow title.
- When a fixed framerate is set, WidgetSpriteViewport, WidgetSpriteNode and WidgetSpriteVideo are also rendered with the specified FPS.
- Fixed a bug with incorrect focus on overlapping sprite widgets.
- Added a UnigineScript callback systemSetLanguageCallback() into the system script.
- It is possible to hide text in WidgetDialogMessage and embed any Unigine widget instead of it.
- Improved rendering of alpha-blended objects with textures.
- Fixed a bug with rendering scaled objects.
- Fixed issues with incorrect addressing to movie clips.
- Multi-touch events are now correctly handled on Android when one of the fingers was lifted.
- For iOS, iPhoneOS 6.1 SDK is required.
- Added an extended set of swizzles for matrices. row0...row3 or col0...col3 return the full row/column. row03...row33 or col03...col33 return the first three elements of the row/column as vec3. Plus an underscore symbol is now supported (for example, my_matrix.col33_1).
- Added kill_thread() function to terminate a thread (a thread ID is returned by thread()). Do not call this function from the terminated thread.
- Now in the assertion the full name of the function that caused a crash is output (due to added __FUNC__ predefined constant variables).
- New set/getParameter() functions work with variables that are automatically converted to a property type. getParameter() can also return a custom value (it is an optional second argument) if no value is found to be returned.
- Improved set/getState() and set/getParameter() in Material and Property classes, they can either receive an index or a name.
- Added a new function into system.h to receive multiple localization languages on the system script initialization.
- New dedicated Settings namespace in the system script, in case main settings need to be accessed from it.
- Function engine.config.get() can receive a second optional argument returned if a value is not found in the config.
- Added merge() function that adds one array to another.
Now you can create and manage nodes, as well as load them, directly from C++ code due to a set of new functions.
- New functions grab() and release() in each class specify whether the node is deleted by C++ code (when the reference count goes to 0), or is handled by Unigine scripts. Check a new sample source/samples/Api/Constructors.
- Added a set of functions into UnigineWorld to load nodes from C++ side.
- New UnigineEditor allows for working with editor nodes.
Other C++ API changes are as follows.
- Added Unigine::Callbacks class to handle script callbacks conveniently.
- Added Unigine::Console class to work with available console commands, as well as create new commands and variables.
- Inherited classes can be easily casted to base ones via getNode(), getObject() and getStream() functions.
- Unigine::Stream class can now work with big- and little-endian file formats.
- New UnigineUtils.h comes with a number of useful functions, such as min(), max(), etc.
- Added gui() callback into Unigine::Plugin that can be used to render a custom GUI.
- Function App::needDestroy() is now to be used instead of removed App::destroy(). This method is called when all render resources must be destroyed.
- Added a reverse iterator for UnigineTree container.
- Added comparison operators between vector and matrices into UnigineMathLib.
- Added a reverse iterator for map arrays in Unigine::ArrayMap.
- Added Unigine::Map::append(Map) and Unigine::Set::append(Set) functions to copy a map into another map and a vector into another vector.
- Added support for vec2, dvec2 and ivec2 data types.
- Added Tools -> Plugins -> Core button to select editor plugins available in the data/core directory.
- Increased the number of digits for Density field in ObjectMeshClutter and WorldClutter. Now it's possible to set such values as 0.0001 for it.
- Fixed Tracker layout for Load, Save and Clear buttons.
- The maximum track weight in Tracker can be higher than 1.
- No more resetting of the interpolation type to a default one when Tracker keys are cloned.
- Dimensions of file dialogs are now saved for the next time they are reopened.
- Interface plugin windows restore their positions within available monitors (for example, in case if one of the monitors was turned off).
- No more stalls on node selection when there is a huge number of child nodes in the world.
- Added 3ds Max 2013 import and export plugins.
- Improvements of Collada plugin include Import joints option (not to import the hierarchy of bones), optional texture compression and the animation drop-drop down list.
- Fixed a bug with memory consumption by the Collada import plugin for some meshes.
Added GPUMonitor plugin for Windows, Linux and Mac OS X. If in the main menu Interface -> GPU monitor option is checked, it shows the graphics card temperature, as well as the available, per-frame information on the chip frequency. For NVIDIA GPUs, it is graphics, memory and processor clocks. For AMD GPUs, it is core and memory clocks. On Mac OS X, only temperature information is available.
Check also a new samples/plugins/gpu_monitor_00 sample.
- Versions of plugins, as well as a version Unigine dynamic library (double precision libraries included) are now checked against the binary version on the engine start-up.
- Warning messages regarding sound and video app selection on the engine start-up are now written into the console instead of being shown in a dialog window.
- Added HAS_XAUDIO2 define to be used in scripts.
- Fixed rare crashes on Mac OS X when ALT was pressed concurrently with an alphabetical key.
- The minimum required Mac OS X version is now 10.7.
- SDK browser has been updated to Qt version 4.8.4.
P.S. Good news, everyone! Finally, the Valley demo, improved and polished, is released as a benchmark this week.