This page has been translated automatically.
Программирование
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Landscape Tool

Landscape Tool is used to create rectangular sized terrain areas according to provided geodata sources but it is not used to create a whole planet. This tool helps to create up to 10000km x 10000km areas of the real world: it's enough to create a terrain of a big city or a country.

By using real world elevation and imagery data, Landscape Tool creates a terrain. Both imagery and elevation data are processed by using the GDAL - Geospatial Data Abstraction Library. It supports various raster formats with different map projections for input data.

RGB8 and RGBA formats for imagery data are supported. Alpha-channel in the second case is used to mark "no data" areas.

Unigine Landscape Tool supports multiple data layers aligned by geo-coordinates: you can easily add a high-detailed landscape area over the low-detailed one.

Overview

The Landscape tool has 6 panels (Data Sources, Settings, Natural Layer, Cultural Layer, Preview and Parameters panels) and the Generate button.

  • In the Data Sources panel, you should specify the elevation and imagery sources for the landscape generation, as well as landcover and vector data for generation of landcover objects and roads if necessary.
  • Settings panel contains a bunch of generation settings: Play Area and Files.
  • In the Preview panel, you can specify the play area of the landscape generation. Preview panel depicts the world map in the equirectangular projection.
  • Parameters panel depicts parameters of the selected settings or information of the selected data source.

See Also

Creating Landscape

To create a landscape perform the steps described in the chapters below.

Specifying Data Sources

Landscape tool creates the terrain based on the real geodata sources, hence you should specify the data sources before proceeding.

Notice
It is recommended to use WGS84 "Geographic" projection (latitude/longitude) data sources to increase terrain generation speed up to 30%.

To add a new source, click the Add Source button. In the opened windows specify the following fields:

Layer The imagery, elevation, landcover or vector layer of the data source.
Name The name of the layer that will be displayed in the Data Sources panel.
Path The path to the data source file or folder. Select the corresponding type of the data source Add Files or Add Folder.

When you add the imagery, elevation, landcover and vector data to the landscape tool, their areas will be highlighted on the Preview panel with corresponding colors: blue for elevation, green for imagery, red for landcover and yellow for vector.

The minus sign button deletes selected data source.

Specifying Data Source Parameters

When you select a data source, you can see the parameters of the added source in the Parameters panel.

Elevation data source parameters are as shown below.

You can specify the following parameter:

Elevation scale The scale factor used for elevation data.

Imagery data source parameters are as shown below.

You can specify the following parameter:

No data color The color to be used for areas with no data available.

Landcover data source parameters are described here. This type of data source is optional and should be added when generation of landcover objects is needed.

Vector data source parameters are described here. This type of data source is optional and should be added when generation of roads and communications is needed.

Specifying Settings

Landscape tool generates a terrain according to the specified output settings. Specify the following parameters:

Play Area

Play Area is a rectangular area of a landscape to be generated.

Play Area represents a gray outlined rectangular in the Preview panel. Due to the equirectangular projection, it looks like a trapezium near the terrestrial poles.

Click on the Play Area settings. In the Parameters panel the available parameters for Play Area will appear:

You can specify the following parameters:

Center The central point coordinates of the Play Area.
Size (km) The size of the Play Area: width x height
Curved terrain The flag indicating if the generating landscape should be curved (WGS-84 ellipsoid datum).
Notice
Landscape tool uses WGS-84 ellipsoid by default. After landscape generation, you can specify the Geodetic Pivot object's settings and choose another ellipsoid reference (including custom).

Files

Here you can specify the output path for your terrain data and cache parameters. When the Landscape tool faced with the big source data, it automatically cuts source data to small tiles and uses them like the cache.

Notice
Landscape tool doesn't clear cache automatically, you should do it manually if necessary.

Output path The output path for generating terrain's files. By default, a new folder in your project's data folder will be created.
Cache path The path to the cache files.
Max cache size (GB) The maximum size of the cache files on the hard drive (in GB)
Cache size on disk (GB) A size of the existing cache files on the hard drive (in GB)
Clear cache Button to delete all the cache for the current landscape asset.

Generating Landscape

After specifying all the necessary settings, you can generate the landscape by clicking the Generate button.

Landscape tool stores the source data with specified parameters as assets. Therefore, when you click on the Generate button, the window for saving the asset will appear. Specify the name and the path for an asset and click Save.

The generation status window will appear.

After successful generation process, the Landscape tool may offer your world settings optimizations. We recommend you to apply them, however, you can ignore.

If you open the Nodes window, you can see that the Landscape tool created the following instances:

  • The landscape_geodetic_pivot Geodetic Pivot object for curving the landscape according to WGS-84 ellipsoid.
  • TerrainGlobal Landscape object.
  • Beacons - NodeDummy objects generated for all elevation sources in the Play Area. These beacons can be used to quickly move to certain terrain location.
  • The Landscape Camera camera object which is placed in the center point of the landscape with specified all the necessary parameters (far and near clipping planes).
Notice
The coordinate system for generated terrain is Cartesian ENU (east-north-up) with the origin taken from the play area center in landscape tool. If you're using Global Mapper, current projection can be objtained using orthographic projection, datum 84, and CENTRAL_LONGITUDE / LATITUDE parameters set equal to your play area center.

Generating Roads and Communications

Roads are generated on the basis of vector data available. The basic workflow is as follows (assuming the landscape is generated, see Creating Landscape section).

1. Preparing a Basic Mesh

First, we create a MeshStatic object, that will be used as a building block for generation of roads or communications (e.g., pipelines).

Notice
The MeshStatic object must be located and have a pivot at the origin (0, 0, 0).
  1. Create a mesh (we use a plane for the road), for this purpose on the Menu bar, click Create -> Primitive -> Plane.

  2. Specify mesh parameters, for our road we set the following.

    Notice
    It is recommended to use more than a single segment to make road curves smoother.
  3. Move the mesh to the origin.

  4. Inherit a material from the mesh_base, set all necessary textures and parameters and assign it to the mesh.

  5. Roads and communications are generated by means of extrusion or tiling of the basic mesh along one of the axes X, Y or Z (forward axis). Make sure that you mesh is oriented properly - in this case the forward axis is X (red arrow).

  6. Export your mesh to a mesh file by clicking the following button in the Nodes window. And delete the node.

  7. Create a MeshStatic object using the mesh and material you prepared. Move the mesh to the origin and export your mesh to a node file (e.g. road.node) by clicking the following button in the Nodes window.

  8. Now our basic mesh for roads (road.node) is ready to use and you can delete it from the scene.

2. Adding a Vector Data Source and Specifying Its Parameters

Now, we add a vector data source to be used for generation.

  1. Open the Landscape Tool window, for this purpose on the Menu bar, click Windows -> Landscape.

  2. In the Data Sources panel, specify necessary vector data sources (see Specifying Data Sources section).

    Notice
    Currently only *.shp files are supported.
  3. Select each vector data source from the ones you added in the Data Sources panel and specify parameters in the Parameters panel.

  4. Add tags for each type of roads and communications you are going to generate by clicking Add and specifying a tag name.

  5. For each tag you can specify a filter to select certain data from the vector source. You can add as many filters as necessary. This can be done by selecting attributes from the list and specifying necessary values for each attribute. You can specify as many conditions as you need by clicking Add button under the list of values.

    Notice

    Use "+" (plus) button to add a filter, or "-" (minus) to remove one.

    If no filters are specified, all the data from the vector source will be used for generation.

  6. Now all necessary tags and filters are added and you can proceed to the next step.

3. Specifying Cultural Layer Parameters

Now, we must specify basic objects created at the first step and bind them to the tags.

  1. In the Cultural Layer panel, select Roads&Communications and the following settings will be displayed in the Parameters panel.

  2. Add a basic mesh object for generation by clicking Add button at the top of the Parameters panel and specify object's name. You can add as many objects as nesessary.

  3. For each basic object specify the following parameters:

    Tag The tag to be used for the selected basic object from the list of the tags specified at the second step.
    Node The path to the basic mesh object's *.node file and the type of the node.
    Drop to ground Flag indicating if the generated object will be aligned with the landscape surface.
    Height offset Distance from the lanscape surface along the Z-axis, in units.
    Notice
    If you see the generated object partially, You can try to increase this value to lift it above the landscape surface.
    Split segments Flag indicating if segment splitting is enabled.
    Notice
    This parameter can be used to provide better alignment of roads and communications with the terrain.
    Split segment length Length of the segment for splitting mode, in units.
    Notice
    The lower the value the more segments will be generated. Setting too low values may significantly reduce performance.
    Forward axis Axis along which the basic mesh is to be extruded or tiled.
    Mode One of the following:
    • stretch - in this case the basic mesh will be extruded along spline segments.
    • tiling - in this case the basic mesh will be tiled along spline segments.
    Notice
    If the stretch mode is selected the number of meshes in the generated object is significantly lower which makes it more performance friendly.
    Max visible distance Maximum visibility distance for the generated object, in units.
    Notice
    Larger values make it possible to see the object from distant positions.
    Min visible distance Minimum visibility distance for the generated object, in units.
  4. Now all necessary basic objects are specified and bound to tags.

4. Generating Roads and Communications

Now you can generate roads and communications by clicking a dropdown of the Generate button and selecting Roads only option, in this case only roads will be generated.

Notice
You can use the dropdown of the Generate button each time you need to regenerate roads and communications or landcover objects, saving the time required for regeneration of the whole landscape.

Here is a landscape fragment with roads generated on the basis of vector data using the basic mesh object we created.

Generating Landcovers

Landcovers are generated on the basis of landcover data available. The basic workflow is as follows (assuming the landscape is generated, see Creating Landscape section).

1. Preparing a Basic Object

First, we create a basic object that will be used as a building block for generation of landcovers (e.g., grass, trees etc.). The following types of basic objects are supported:

  1. Create a basic object of the desired type.

  2. Specify parameters of the basic object.

    Notice
    Intersections with parent object must be enabled for all types of basic objects! The intersection flag can be found on the tab of the Nodes window corresponding to the type of the object.

  3. Inherit a material, set all necessary textures and parameters and assign it to the basic object.

  4. Export your mesh to a node file (e.g. grass.node) by clicking the following button in the Nodes window. And delete the node.

  5. Now our basic object for grass (grass.node) is ready to use and you can delete it from the scene.

2. Adding a Landcover Data Source and Specifying Its Parameters

Now, we add a landcover data source to be used for generation.

  1. Open the Landscape Tool window, for this purpose on the Menu bar, click Windows -> Landscape.

  2. In the Data Sources panel, specify necessary landcover data sources (see Specifying Data Sources section).

    Notice
    R8 and RGB8 mask textures are supported.
  3. Select each landcover data source from the ones you added in the Data Sources panel and specify parameters in the Parameters panel.

  4. Add tags for each type of landcover objects you are going to generate by clicking Add button at the bottom of the Parameters panel and specifying a tag name. To remove a tag use Remove button.

  5. For each tag you can specify a set of filters (OR) to select certain data from the landcover data source. You can add as many filters as necessary. This can be done as follows depending on the type of the landcover data source:

    • For an R8 texture data source - by setting the range of bits (from value, to value) to be treated as a certain type of landcover objects.
    • For an RGB8 texture data source - by selecting a base color and setting threshold value for a color gradient to be treated as a certain type of landcover objects.
    Notice
    Use "+" (plus) button to add a filter, or "-" (minus) to remove one.
    1-channel R8 texture. 3-channel RGB8 texture.
  6. Now all necessary tags and filters are added and you can proceed to the next step.

3. Specifying Natural Layer Parameters

Now, we must specify basic objects created at the first step and bind them to the tags.

  1. In the Natural Layer panel, select Vegetation and the following settings will be displayed in the Parameters panel.

  2. Add a basic object for generation by clicking Add button and specify object's type and name. You can add as many objects as nesessary.

  3. For each basic object specify the following parameters:

    Node The path to the basic mesh object's *.node file.
    Tag The tag for the selected landcover object from the list of tags specified at the second step.
  4. Now all necessary basic objects are specified and bound to tags.

4. Generating Landcover Objects

Now you can generate landcover objects by clicking a dropdown of the Generate button and selecting Landcovers only option, in this case only landcover objects will be generated.

Notice
You can use the dropdown of the Generate button each time you need to regenerate roads and communications or landcover objects, saving the time required for regeneration of the whole landscape.

Here is a landscape fragment with grass generated on the basis of landcover data using the basic grass object created.

Last update: 03.07.2017
Build: ()