This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Rebuilding the Engine 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
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Creating a Terrain

Warning
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to Engineering / Sim SDK edition to use it.

The Landscape Tool allows creating a terrain based on ordinary raster images (with no geodata). Follow the steps described in the chapters below to generate the terrain.

Notice
If you use the Sim version of UNIGINE SDK, and you need to create a terrain based on raster images only (with no geo referencing), set the Mode to Flat and follow the instructions given below.

See Also

  • Creating a Geo-Referenced Terrain article if you need to:
    • Create a terrain based on the real geodata sources.
    • Create a terrain based on both the ordinary images and geodata sources.

1. Specifying Data Sources#

The data sources should be specified before proceeding.

Notice
Specifying data sources is shown in the dedicated tutorial.

They are divided into five types (layers), however, only the following support loading the raster images with no geodata:

  • Height (Elevation) (optional) - this type of data is used to generate terrain geometry. Here the height maps of the R8, R16 or R32f format should be loaded.
    Notice
    The indexed black-and-white data sources are interpreted as RGB images, so they cannot be used for the elevation data sources.
  • Albedo (Imagery) - this type of data is used to generate textures for the terrain surface. Here the albedo textures of the RGB8/16/32f and RGBA8/16/32f formats should be loaded. Alpha-channel in the second case is used to mark "no data" areas.
  • Masks (Landcover) (optional) - this type of data is used to generate natural features of the landscape (details, grass, trees, etc.). Here the detail masks the R8/16/32f or RGB8/16/32f formats should be loaded.
If required, the data sources for procedural refinement can also be loaded (the Procedural data source that is used for procedural refinement).

To add a new source, click the Add Source button.

In the opened window, specify the following fields:

Layer The albedo, height, masks or procedural layer of the data source.
Name The name of the layer that will be displayed in the Sources panel.
Path The path to the data source file(s). The data source can be represented as a single raster image or as a source tileset (a set of raster images). In the second case, the first file of the source tileset should be specified: the other files will be detected in the same folder automatically according to the Naming Type and Expression values. The following formats are supported: .png, .tif, .jpg, .psd, .dds, .tga. To specify the path, click the ... button.
Notice
The source tileset isn't related to the tileset used for the generated terrain.
Notice
Do not store the data source files in the data folder of the project as it will cause the following issues:
  • The unnecessary runtime files will be generated.
  • You won't be able to load such files as data sources as the engine file system will use the generated runtimes instead. For example, if you specify a .png file, the file system will load the generated .dds runtime file that doesn't supported.
Naming Type The source tileset layout type. The following values are available:
  • row column - the row-column based tileset. When set, each tile of the source tileset is determined by the row and column numbers.
  • index number - the index-based tileset. When set, each tile of the source tileset is determined by the index. The number of columns of the source tileset is specified in the Number of columns field.
Source Tileset of 2 Rows and 2 Columns
Indexed Source Tileset of 2 Columns
Row-columns or indices are determined automatically according to names of the files loaded for the source tileset. Each tile corresponds to a raster image file. The name of such file should contain info on the row and column or the index, otherwise, such file won't be included into the source tileset.
Expression A regular expression string used to find files that should be loaded for the source tileset and to determine its indices (or rows and columns, depending on the Naming Type):
  • For the row column layout, the default _%X_%Y expression is used: %X determines the row, and %Y determines the column.
  • For the index number layout, the default _%X expression is used: %X determines the index.
You can specify any desired expression, however, it should be able to determine indices of tiles by their file names.
Preview Shows the index (or the row and column) of the first file and the total number of the files added to the source tileset.

The files of the source tileset (except the first one specified in the Path field) will be automatically detected and loaded according to the values described above.

For example, to load the source tileset that contains 4 tiles, you can name them as follows: Tile_0-0.png, Tile_1-0.png, Tile_0-1.png, Tile_1-1.png. And then perform the following:

  1. Specify the Tile_0-0.png as the first file of the source tileset.
  2. Choose the row column layout.
  3. Specify the _%X-%Y expression.
In the result, the following string will be displayed in the Preview field: First file: row 0 column 0, num files found: 4.

When you add the imagery, elevation, landcover or procedural data sources 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 magenta for procedural. Area size of procedural sources is adjustable.

The minus sign button deletes selected data source.

2. Specifying Data Source Parameters#

When you select the loaded data source, you can see its parameters in the Parameters panel.

Elevation Parameters#

Tileset Loading Order Determines the loading order of the tiles of the source tileset. The following options are available:
  • To change the loading priority of the rows and columns in the source tileset, click .... By default, columns (vertical order) are loaded first.
  • To change loading direction of rows/columns, change values of the vertical order and the horizontal order options.
Tileset Area Settings
  • Largest size (km) is the size of the largest side of the data source in kilometres. This value indicates how many kilometres correspond to the resolution of the largest side of the source tileset.
  • Density is the density of the current data source in meters/pixel. This value indicates how many meters correspond to one pixel of the largest side of the source tileset.
By default, the values are set automatically according to the size of the loaded files.
Tileset Position Specifies coordinates of the source tileset.
Tileset Elevation Settings
  • In case of float elevation data, you can change the Elevation scale value, by which the heights (float values) will be multiplied during terrain generation.
  • In case of non-float elevation data, it should be normalized: enable Normalization and specify the following values:
    • Max Elevation sets the value (in kilometres) that should be used as the maximum height of the terrain.
    • Min Elevation sets the value (in kilometres) that should be used as the minimum height of the terrain.

Imagery Parameters#

The parameters are the same as for the elevation source (except Tileset Elevation Settings). You can also specify the following parameter:

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

Landcover Parameters#

Landcover data source parameters are described here. This type of data source is optional and should be added when generation of terrain details or vegetation is needed.

Procedural Parameters#

Procedural data source parameters are described here. This type of data source is optional and should be added when it is necessary to refine data from elevation, landcover or other procedural data sources.

Notice
You can specify processing order for all data sources except vector ones. This can be done either using the Processing order field of the data source, or via Processing Priority in the Settings panel.

3. Setting Up Natural Layer#

At this step you can check out the parameters of Terrain LODs to be generated for all data layers (elevation, imagery, normal, and detail masks) and determine the natural features of the landscape.

LOD Settings#

To access LOD settings of the particular data layer of your terrain, select the data source group in the list: all available settings will be displayed on the Parameters panel.

The Landscape Tool sets the number of LODs, their visibility distances and densities automatically. You can change these settings when necessary. To modify LOD settings for the desired data layer you should set Manual mode by checking the corresponding option located just under the list of LODs (see the picture below).

In the manual mode you can modify density and visibility distance values by simply double-clicking on the corresponding cell and entering the desired value. Use + (plus) button to add a LOD, or - (minus) to remove one.

Notice
In the manual mode, the LOD density should be specified more accurate, as this value determines the size of the tileset of the generated LOD: the higher the LOD density, the bigger the LOD tileset (the density is multiplied by 128 (the size of a single tile)). Specifying high values may lead to visual artifacts at the edges of the terrain.

Natural Features#

You can also determine, which natural features of the landscape are to be generated: select the Masks (Landcover) data source type and get access to the following settings on the Parameters panel:

Notice
You may skip this step, if you don't need procedural generation of natural features of the landscape for your project.

4. Specifying Settings#

Landscape tool generates a terrain according to the specified settings. Set the following parameters before starting terrain generation:

Modes and Projections#

To generate the terrain based on the raster images with no geodata, the Flat mode should be set. In this mode, no reprojection is performed for the loaded data sources.

Play Area#

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

Play Area in Flat Mode

Play Area represents a gray outlined rectangular area in the Preview panel.

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.
Notice
The size should coincide the Largest size values set for the data sources. If the Play Area too large, the generated terrain may be outlined with the grey area.
Max visibility distance (km) The maximum visibility distance of the Play Area in kilometres.

Processing Priority#

Here you can specify the order in which data sources will be processed. By default, data sources are processed in the order from the most detailed to the less detailed ones (e.g. a data source having the density of 3 meters/pixel will be processed before a data source having the density of 30 meters/pixel). But in some cases it might be necessary to change the order of processing for certain types of data sources. To do so, pefrorm the following actions:

  1. On the Parameters panel select a tab, corresponding to a group of data sources, for which the processing order is to be changed.
  2. For each item in the list of data sources displayed click a cell in the Order column and set the desired processing priority value.
    Notice
    A data source having the priority value of 2 will be processed before the one that has the priority value of 3.
  3. After setting new processing priorities for data sources click Apply.

Example#

Let us consider an example of a case when you need to change default priority. Suppose You have the following data sources:

  • A coarse 100 m/px elevation data source Elev1.
  • A procedural data source Proc1 with the density of 10 m/px which refines the data from Elev1.
  • A procedural data source Proc2 with the same density of 10 m/px which operates with the data refined by Proc1.

So, the expected data flow diagram would be: Elev1 -> Proc1 -> Proc2.

But generally, as both procedural data sources have the same density, default prioritization may result in the following data flow diagram: Elev1 -> Proc2 -> Proc1.

Which definitely is not the same. This situation can be avoided by setting the priority of the Proc1 source equal to 2 (as the default priority value for Houdini assets is 1).

Distributed Computing#

Here you can set up distributed computing to be used for terrain generation. For details, check the Distributed Computing article.

Output File Locations#

Here you can specify the output path for your terrain data and cache parameters. When the Landscape tool faces a large amount of source data, it automatically cuts the data to small tiles and uses them as cache. The cache is used to speed up subsequent terrain re-generation.

Notice
  • Landscape tool doesn't clear the cache automatically, you should do it manually if necessary.
  • When clearing the cache remember, that next terrain re-generation will require more time.

Output path Output path for generated terrain files. By default, a new folder in your project's data folder will be created.
Cache path Path to cache files.

Generating a Terrain#

The Landscape Tool stores the paths to all data sources as well as all generation parameters in an asset. So, after setting up all these parameters, you should save them by choosing File -> Save Asset and specifying the name and path for your asset.

Now you can generate the terrain by clicking the Generate button. In the Steps window, that appears, you can select what is to be generated.

Notice
You can modify these options each time you need to re-generate specific part of the terrain data, saving the time required for regeneration of the whole terrain.

Generate all The whole terrain with detail masks, landcover objects and vector objects (spline, vector, and point) will be generated. This option is selected by default.
Terrain Only terrain will be generated. Here you can select parts of terrain data used for generation (Elevation, Imagery, Details)
Imagery previews The flag indicating if imagery previews are to be generated and placed at the corresponding location on the area displayed on the Preview panel.

Also you can specify or change the output path for your terrain data and cache parameters.

If you have any unsaved changes, then after clicking OK in the Generation Steps window, you will see the window for saving the asset. Specify the name and the path for your 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 World Hierarchy window, you can see that the Landscape tool created the following instances:

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

Video Tutorial: Arbitrary Terrain Generation#

Last update: 2021-12-13
Build: ()