Jump to content

Unigine SDK 2014-07-07: City Traffic System, New File Dialog and Node Export Plugin


photo

Recommended Posts

Introducing City Traffic

 

We have a lot of customers developing driving-based application for different purposes. For example, UNIGINE-powered car simulators from INNOSIMULATION (South Korea) are used by driving schools in 20 countries worldwide.

So, we have decided to help our customers and have created City Traffic System, an expandable system that allows you to visualize real city traffic, filled with AI-controlled vehicles and pedestrians, which follow the traffic regulations.

 

140707-driving3_sm.jpg

 

Driving Simulator has the following features:

 

Road Network with Support for Different Configurations
  • Multiple lanes.
  • Two-way and one-way roads.
  • Arbitrary crossroads (T-shaped intersections, roundabouts, etc.).
  • Multi-level roads.
  • Speed limit zones.
  • Overtaking prohibition zones.
  • Priority signs.
  • Configurable traffic lights.

140707-driving4_sm.jpg

 

Vehicle Model

  • Configurable motor, gearbox and drivetrain.
  • Configurable suspension and wheels.
  • Arbitrary number of axles (cars, trucks, special vehicles).
  • Light signals.
  • Can be either AI-driven, or human-controlled.
  • Expandable API.

140707-driving_sm.jpg

 

AI Driver

  • Detects lanes and movement direction.
  • Follows the driving regulation at crossroads and during passing.
  • Obeys the signal lights.
  • Avoids obstacles.
  • Obeys the speed limits.
  • Keeps the average speed of the traffic.
  • Uses the turn signals.
  • Predicts movement of the human-controlled cars.
  • Expandable API.
Traffic Management System
  • Simulation performance control for cars and pedestrians.
  • Automatic distribution of AI-controlled cars.

140707-driving2_sm.jpg

 

Pedestrian Model

  • Animated motion.
  • Follows the rules when crossing streets.

Driving Simulator supports control by keyboard, mouse and joysticks.

 

140707-wheel_sm.jpg

 

Driving Simulator Control with Wheel and Pedals

 

In order to use the system, install "Driving" package from Downloads/Demos - it contains a demo with 1200x1200 meters of urban blocks featuring dense traffic based on the system: data/demos/driving.

 

New File Dialog

 

We updated file dialog interface in UnigineEditor, so navigation and file operations became much easier. Now it provides the following functionality:

  • Adding bookmarks by dragging folders from a file list (or Ctrl+T on the selected folder).
  • Renaming (F2 hotkey) and removal (Delete hotkey) of files, folders and bookmarks.
  • Creation of new folders.
  • Upper navigation panel with buttons for fast and convenient navigation.
  • Fast jump to the required directory by specifying full path in the "Name" field and pressing theEnter button.
  • Images preview.
  • Access to the operating system file browser.

140707-filedialog.png

 

New File Dialog Interface

 

Introducing Node Export Plugin

 

Node Export is UnigineEditor plugin designed for exporting assets (nodes, meshes, textures, materials, properties, etc.) from one project to another.

The plugin provides the following functionality:

  • Copying the node with all of its dependencies (e.g. NodeReferences, NodeLayers, etc.).
  • Replacing of paths inside nodes, materials and properties.
  • Appending the exported materials and properties into existing materials' libraries.

140707-nodeexport.png

 

Node Export Plugin Interface

 

To load the Node Export plugin, open the Tools -> Plugins tab in UnigineEditor, press the Core button and choose the tools/node_export.cpp.

 

California Trees Pack

 

140707-trees_sm.jpg

 

Cool vegetation library has been extanded with the following California plants in high quality (ready-to use, with several LODs set up):

  • blue_oak - a blue oak
  • buckbrush - a buckbrush
  • douglas_fir - a Douglas fir
  • foothill_pine - a foothill pine
  • manzanita - a manzanita

The Node Export plugin, mentioned above, will be of much help while importing these assets. A library can be found in the data/library/vegetation directory.

 

UnigineScript
  • Added a wait argument for the system() function of OS class. It specifies if the program should wait for completion of command execution (for Windows versions only).
  • Added a set_mtime() File System function. It sets the time of the last modification of a given file or directory.
  • Added an engine.filesystem.setMTime() function. It sets the time of the file last modification.
  • Updated an engine.world.saveNodes() function: added an int materials argument, specifying if nodes should be saved with the materials assigned.
  • Added new WidgetDialog class functions:
UnigineEditor Bugfixes
  • Fixed undo mode while editing NodeReference.
  • Fixed object handler: when camera goes far from the object, the handler will be seen.
  • Fixed copying of material and properties in the Surface tab.
  • Fixed .world file version on saving.
  • Added FPS limits to Video Grabber.
  • Fixed Performance Profiler: it works correctly after video grabbing.
  • Fixed decals pivot: it works correctly after pressing the Project button.
  • Fixed position and direction display for the camera.
Documentation

 

 

Download links

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

 

Link to comment

The driving demo itself is an excelllent simulation use-case example ! The functionality and used concepts are both impressive and provide a nice insight how to implement such systems.

 

Nevertheless the more or less fully undocumented script code itself is quite challenging. Not having a powerful state-of-the-art script debugger still remains a nightmare in regard to productivity and maintainability of more complex Unigine script code.    

 

It might be worth noting that the driving demo has to be downloaded for getting access to the scripts code. Based on the description and documentation my first thought was that the code is part of the UNIGINE SDK core download and located somewhere in the data\scripts or data\framework.

Link to comment

Ulf, thank you for the valuable feedback!

 

We are expanding C++ API now and keep looking into improving debugging for UnigineScript.

 

Added note on required download.

Link to comment
the more or less fully undocumented script code itself is quite challenging..

 

The previously provided game framework classes are good exampls for light, but effective script code logic documentation. BTW the articles on driving simulator concepts within the documentation itself are excellent.  

Link to comment
  • 5 months later...

EDIT:

It seems assert makes trouble, as soon as I remove this, things are starting to work.

I need to future analyse this, but something is very strange.

 

 

Did someone got the network plugin running? It seems the plugin does nothing at all. (RakNet)

The linux version works without problems.

 

There are no events fired and it does not care if the ip/port is correct or not for the server.

Link to comment
×
×
  • Create New...