Unigine SDK 2013-08-16: Road Decals and UnigineScript Cache


photo

Recommended Posts

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.

 

130815_decalmesh_2_sm.jpg

 

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.

 

130815_field_1.jpg FieldSpacer

 

130815_field_2.jpg FieldAnimation

 

Render

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

GUI

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

C++ API

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

UnigineScript

  • 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

  • GLESAppTablet.mm 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).

Tools

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

Other

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

 

Download links

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

Link to post

On the roadmap is some spline based tool for road/river generation, is there any chance, that it will be available in some of next releases?

Link to post

Exciting steps.

Road tool is closer.

The valley shot looks great with a road... needs more polys though!!!

Link to post

Love the precompiled scripts for release.

Link to post

Decals samples section of the launcher

Link to post

Road decals tool is amazing!!

 

Thanks

Link to post

On the roadmap is some spline based tool for road/river generation, is there any chance, that it will be available in some of next releases?

EasyRoad3D for Unity3D might be one of the best examples for a very powerful interactive road and river builder.

 

http://www.unityterraintools.com/demovid.php

 

In general the Unity3D third party tool plugin concept including marketplace is extremly powerful for providing engine customers additional functionality at low costs. For engine provider this is a big force multiplier. For tool providers this seems to be quite an attractive business model. For customers this can provide specialized features much more quickly at reasonable costs (e.g. even paying 1000 US-$ for such a road tool for professional engine users target group would be much, much more cost effective that developing it all on your own or waiting for UNIGINE core implementation, which might never appear due to simply limited development capacities)

 

Win-Win-Win situation for engine provider, tool builder and customers.Maybe something UNIGINE should also think about ?

Link to post

The decal_deferred is a real time saver and has been very powerful for our workflow, though not as a road tool.  

 

I dont think it can be used easily as a road tool except on quite flat ground.  I think to work on terrain, the terrain should slope up or down to edge of a swept piece of 3d geometry.

 

In general the Unity3D third party tool plugin concept including marketplace is extremly powerful

 

Very true Ulf, I wonder how hard it would be to apart existing unity plugins to Unigine, or suggest a Unigine implementation to the 3rd party developers.

Link to post

The decal_deferred is a real time saver and has been very powerful for our workflow, though not as a road tool.  

Very true Ulf, I wonder how hard it would be to apart existing unity plugins to Unigine, or suggest a Unigine implementation to the 3rd party developers.

 

We were developing on Unity some time ago and these 3rd party tools are not that great as it looks.

 

1) Unity community is huge (thousands and thousands od people), so there is bigger chance to find some skilled people willing/able to develop something. Even thou you can count these capable persons on one hand. True, Unigine community is different, far more proffesional, on the other side almost everybody here is occupied by his own project. So it would make sense to make dedicated company for this, but it is risky bussiness, such feature can appear in next release as a core feature and your bussiness is ruined. It is simple to make extension for your own project/needs, but once you start to sell it, it will became nightmare.

 

2) The biggest problem of 3rd party tools is support (bug fixes...). Usually it ends like this: Somebody makes nice 3rd party plugin, it becames hit, he supports it cca 1/2 year and then disappears. It is logical, number of sales is very low after such time, but supports still cost lots of effort. Few releases of Unity and plugin is incompatible and dead....Then somebody comes and makes same/similar plugin again (gap on market is obvious and Unity is focusing on nonsenes instead of important features) and history repeats itself. Currently there is 3rd "cycle" for ocean plugin, 4th cycle of procedural tools for vegetation placement, 3rd cycle of day/night system, 3rd cycle of vertex morphing tools, 3rd cycle of GUI system, 3rd cycle of terrain streaming, 3rd cycle of voxel terrain..... I know very few cases, when plugin is supported several years in row (for example Amplify virtual textures) and always that person has it has hobby, income is very low (almost zero).

Link to post

Btw, this would be worthy of conversion to Unigine. Technically probably possible, since majority of Amplify is stand alone C code and Unigine API is IMHO ready for this. Question is, how many people here would be interested.

 

http://forum.unity3d.com/threads/198073-Introducing-Amplify-Texture

110% ...a great idea, 

 

Speed, detail and style.

 

This idea of virtual texture space was also being considered and extrapolated for geometry by ID tech (their virtual texture process was called mega texture)

they had an interesting concept of how textures were built up from small textures (via artist placement and paint within the engine) and then baked into the large texture file

Link to post

Well, If Unigine team would be interested, I am quite sure, that there will be no problem to negotiate implementation/licencing of Amplify to Unigine...I know author for some time and he is very open-minded....

Link to post

Waiting since years for such kind of high-end texture streaming solution fully integrated into the engine

Link to post

Some similar virtual texturing SDK is available from Graphine http://graphinesoftware.com/

 

Their SDK 2.0 will also support DX11.2 hardware support for tiled resources streaming.

 

http://graphinesoftware.com/Announcing-Granite-2.0

 

http://channel9.msdn.com/Events/Build/2013/4-063

 

Interesting. Anyway I am quite sure, that if Unigine community shows some interest (=enough people willing to buy), port of the amplify will be on the way...

Link to post
  • 2 weeks later...

Im interested in Amplify or something similar.  I have proposed in suggestions, creating a new forum subheading to talk about 3rd party plugins.

 

I think it would be worth talking to the Amplify devs about getting an SDK to look at.

Link to post
  • 2 weeks later...

Where is our monthly fix?:) We need new update.

Link to post

Next SDK update is planned for October 2-4.

Link to post