Jump to content

Unigine SDK 2013-04-30: Oculus Rift, Improved Decals, WebGL alpha, Asynchronous UnigineScript


photo

Recommended Posts

Support for Oculus Rift

 

Integration of Oculus Rift into UNIGINE Engine is completed, now you can navigate virtual worlds with increased immersion by means of AppOculus engine plugin (available for Windows, Linux and Mac). As you see, we are also preparing Oculus-compatible updates of Heaven and Valley benchmarks to be publicly released soon.

 

130430_oculus_sm.jpg

 

Render

  • Completely new decals system (see details below), all decals must be re-baked via UnigineEditor.
  • Added new material option: Group (up to 4 groups available). It affects opacity objects rendering, inside a group all renderable objects will be sorted with respect to Material Order, decals are always rendered after all opacity objects in the group.
  • Improved performance on AMD cards in OpenGL mode.
  • Added access to CameraOffset parameter via UnigineScript for multi-channel rendering mode.
  • Added support for procedural textures that can be used in complex post-processing with chain dependencies via additional filter attribute: <texture name="selection" pass="post" type="filter" materials="post_filter_selection_sample,post_hblur_2d,post_vblur_2d">. See data/samples/shaders/selection as an example.
  • Increased speed of billboards bounds recalculation on multiple position updates.
  • Added support for GL_EXT_texture_rg OpenGL ES extension (useful on iOS devices to store normal maps in PVR4 format).
  • AppStereo plugin has been splitted into AppQuadBuffer (OpenGL mode only, for professional cards: NVIDIA Quadro and AMD FireGL) and AppSeparate (DX9/DX11, creates a separate window for each eye).
  • AppSurround, AppPanorama and AppProjection plugins are now available for Mac OS X.
  • Added a sample with oblique projection matrices.
  • Added a sample with object halo selection sample based on auxiliary buffer.
  • Added Angle power parameter for mesh_leaf material.
  • Added min/max mask values for all clutter and grass objects: now multiple clutter/grass objects can share the same mask, but use different levels.
Bugfixes
  • Fixed trees jittering and water waves in double precision builds (via virtual shader coordinate system).
  • Fixed bounding frustum calculation in double precision builds.
  • Fixed a bug with adding new surfaces into ObjectMesh, ObjectMeshSkinned and ObjectMeshDynamic nodes.
  • Fixed horizontal texture flip in LightProj light sources.
  • Fixed a bug with incorrect clutter rendering bug on extremely large visible distances.

 

Improved Decals

 

There are several types of decals available now:

  • DecalObjectOmni
  • DecalObjectProj
  • DecalObjectOrtho
  • DecalTerrainProj
  • DecalTerrainOrtho
  • DecalDeferredProj
  • DecalDeferredOrtho

130430_decaldeferred_sm.jpg

 

DecalObject* are old geometry decals. However, they can't be projected on GUI objects as before. Use rendering groups to hide large polygon offset side effects. These decals support decal_base material only.

 

DecalTerrain* decals are special decals for efficient projection on terrain with correct LOD transitions of vertices. A node of such type must be a child of an ObjectTerrain. These decals can handle complex material called decal_terrain_base similar to other terrain materials (masks, 4 detail diffuse/normal textures). They support decal_base (with support of parallax occlusion mapping) and decal_terrain_base materials.

 

DecalDeferred* nodes calculate decal position based on depth value from the deferred buffer. So there is no real geometry rendered at all, therefore from performance standpoint DecalDeferred* nodes are the best choice (though they don't support instancing, thus each decal costs at least a DIP). Moreover, these decals are compatible with hardware tessellation and terrain LOD transition. However, the scene must be divided into the rendering groups (up to four groups for opacity object and decals available) to prevent unnecessary deferred decals projection on geometry. These decals support decal_deferred_base material only.

 

Each decal has unique visible and fade distances for optimizations. Take a look into samples: data/samples/decals.

 

130430_decals_sm.jpg

 

Unigine GUI

  • Speedup of font rendering.
  • User interface (*.ui) files can refer to their blocks with text: declare reference="1" attribute for an element, after that you can use <reference name="ELEMENT_NAME"/> tag (see data/core/editor/editor_decals.ui file as an example).
  • Visuaizer doesn't scale object handles on object scaling.
  • Added Order property for Widget classes: multiple Z-orders are now available.
Flash GUI
  • Correct MovieClip scaling and rotating.
  • MovieClip class has all base functions from base Flash Object.
  • Correct resizing of scaled MovieClip objects.
  • Added support for textColor property of ObjectEdit.
UnigineScript
  • New way to set per-function breakpoints: system_breakpoint, world_breakpoint and editor_breakpoint console commands (syntax: world_breakpoint set/remove function_name number_of_arguments). Note that if you want to step forward, you need to remove the current breakpoint via system console ('b' in the debugger mode).
  • Now it's possible to use engine.system|world|editor.call() functions with integer function ID.
  • An issue with incorrect class declaration when the name is written without space delimiter to the base class has been fixed.
  • preprocessor() function can work with file names and source code strings as well.
  • foreach operator will not fail after removing of the last element.
  • Expressions print a file name and a line number on compilation errors.
  • Added is_thread() function that checks if a thread is still active.
  • Added Async core script class for asynchronious operations.
  • Updated documentation on language features and syntax.

Asynchronous operations in scripts

 

All calls of extern C++ functions or C++ object methods can be performed in asynchronious way via Async UnigineScript class now. For example, asynchronious network socket handling can be done this way: async.run(socket,"connect"); After that you can check status of the running function and get the return value somewhere else in the code.

Multiple asynchronious calls can be submitted into the same Async object instance. Each Async instance creates a working thread, so if you want to utilize all available CPU cores you need to create the same number of Async objects.

Take a look into the corresponding samples: data/samples/systems/async*

 

C++ API

  • Added access to ObjectTerrain with basic import/export interface.
  • ObjectMeshDynamic now has functions for multiple vertex/index data adding/seting by a single call.
  • Added ObjectMeshSkinned::getNumAnimations() function.
  • Added StreamBase class that allows to create custom data stream objects.
  • GLAppSDL sample has been fixed.
  • Added empty() method for String, Vector and Tree containers.
  • Added setArgName() and setArgValue() methods into Xml class.
  • All vectors, matrices and quaternions have a get(Type*) method to fill an array with their values now.
Tools
  • Multi-threaded image compression/decompression in UnigineEditor.
  • ImageDDS can flip images in both directions now (-fx and -fy options).
  • Added "Fold all nodes" button into Nodes window of UnigineEditor.
  • Added new "Tools -> Node materials" option in UnigineEditor: all nodes will save their references on material libraries, if enabled (by default, as before).
  • Improved COLLADA format support.
  • Added support for multi-decal editing in UnigineEditor.
  • Correct loading of OBJ geometry files with polygons containing more than four vertices.
  • Improved terrain painting tool visualization in UnigineEditor.
Network
  • Added SSLSocket engine plugin via StreamBase API and axTLS library (it allows to initialize secure TLS connection over sockets).
  • Restructured SConstruct files for 3rd-party libraries.
  • RakNet integration plugin is moved to plugins/network/RakNet.
  • Added ssl_socket server/client samples.

WebGL

 

Added support for WebGL platform (early alpha stage) via Emscripten cross-compiler into JavaScript. WebGL binaries can be created via "scons platform=webgl" command.

Due to incoplete support of WebGL standard by browsers at the moment, support of this platform is in the early alpha stage - you can use it on your own risk. Supported browsers are recent Chrome and Firefox only.

 

Other Changes

  • Buffer class can be encoded/decoded into/from base64 strings.
  • Added a sample with fixed physics FPS.
  • Added support of mouse wheel counter on all operational systems.
  • Fixed a bug with broken cloning of Body's frozen and gravity flags.
  • engine_threaded console variable can globally disable or enable all *_threaded console variables.
  • Terrain format has been changed to more compact one, please use utils/Upgrade/terrain.usc script to compress old data.

 

 

Download links

All files can be found in "Downloads" section of the portal: https://developer.unigine.com/fileserver/index

 

Link to comment

Cool nice update.
I hoping my occulus rift (and my leap motion), i am impatient to do some test ...

BTW thanks for add WebGL, i hope have the openal part soon inside Unigine using WebAudio api.

 

Link to comment

Please note that WebGL is in the early alpha, it's not ready for production use yet.

However, web browsers are improving support of WebGL, so we'll see.

Link to comment

Please note that Evaluation Kit now requires authentication on startup (with developer.unigine.com credentials) and sometimes sends back to the server anonymous statistics on hardware (CPU, GPU, RAM) and settings used.

Link to comment

Thank you!

Cannot wait working with the new decals. Also tools for terrain have improved. Great.

 

b.w.

Link to comment

Really cool stuff guys.

 

Its good to see you pushing out more of the core features to the evaluation -> I've had a fairly hard time trying to figure out where Uningine sits in the end-to-end pipeline without the C++ API, so thanks for getting that in. Can't wait to dig into it.

Link to comment

DecalDeferred* nodes calculate decal position based on depth value from the deferred buffer. So there is no real geometry rendered at all, therefore from performance standpoint DecalDeferred* nodes are the best choice (though they don't support instancing, thus each decal costs at least a DIP). Moreover, these decals are compatible with hardware tessellation and terrain LOD transition. However, the scene must be divided into the rendering groups (up to four groups for opacity object and decals available) to prevent unnecessary deferred decals projection on geometry.

Hi frustum, can you clarify new render group concept a little bit more. Especially I don't understand the last statement as DecalDeferred should be fully independent from geometry complexity as depth buffer is used ?!? The explanations for render groups for DecalDeferred and DecalObject seems to be 'flipped' somehow. What am I getting wrong here ?

Link to comment

Rendering group is a set of opacity object surfaces and decals.
The object surfaces are rendered first. After that decals are rendered.
We can set up to four rendering groups for rendering.
Deferred decals shade all scene objects with respect only to depth buffer (less equal test).
So it's impossible to use this decals for terrain refinement for example.

But with rendering groups we can do that easily:
The first group: terrain and terrain decals.
The second group: stones, vegetation and their decals.
The third and fourth group: what ever with their decals.

 

The girl is using same rendering group as terrain and decal:

00001.jpg

 

The girl is in the next rendering group:

00000.jpg

Link to comment

Thanks for the explanations. Having a look on the screenshots: do DeferredDecals do not support anti-aliasing like deferred shading in general ?

Link to comment

They are working in screen space. Multi-sample information is available from deferred textures but shader doesn't use because of performance.

Link to comment
  • 1 year later...
×
×
  • Create New...