This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Version Control
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
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
Materials and Shaders
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.

Landscape Layer Map

Landscape Layer Map object represents a rectangular Landscape Terrain layer and stores the data used for rendering in an .lmap asset:

  • Height map used to generate the geometry of Landscape Terrain,
  • Albedo texture representing color data,
  • 20 single-channel mask textures.

You can create a new Landscape Layer Map either from scratch, sculpting it with an extendable set of brushes available out-of-the-box, or using imported data (images or tilesets), be it an arbitrary terrain generated in terrain generator software (e.g., World Machine), or real digital elevation maps and satellite imagery data.

Notice
Landscape Layer Map is designed as a shared data pool, the graphic data of which can be used to add details to the Landscape Terrain surface, used in logic (e.g. as a land cover classification map) and by other objects as well, such as Grass, for example.

You can place layer maps anywhere in the scene by moving, scaling and rotating the node (rotation is available around the Z axis only). By blending different Landscape Layer Maps you can modify the terrain even at run time.

Depending on the size and resolution of your landscape, the size of the data can be quite large. You can use lossless and lossy compression options to reduce the size of the .lmap file.

See Also#

Creating a Landscape Layer Map#

Create a new Landscape Layer Map via either of the following ways:

  • By creating a node:

    1. In the Create menu, select Landscape -> Landscape Layer Map and place the new Landscape Layer Map node in the scene.

    2. By default, the map has the white, flat and read-only landscape_layer_map_base.lmap asset set in the Landscape parameter. Click Create to create a new landscape layer asset.

  • By creating an asset:

    1. In the Asset Browser click Create -> Create Landscape Layer Map and specify a name for the new lmap asset.

    2. Then drag the asset to the Editor viewport and place a new Landscape Layer Map in the scene.
Notice
If the current world contains no Landscape Terrain object, which is required for terrain rendering, a new one will be created automatically and set as the parent node for the new Landscape Layer Map.

Specifying Graphic Data#

  • Generating from files:

    1. Set the Data Filling option to From Tileset.
    2. Depending on the desired way to access to the resources, choose the value of the Data Sources parameter:

      • Assets. Use available imported textures, which is a pretty good option for small and moderate terrains.
      • External Files. Provide full paths to the resources (e.g. a network drive). A better option for large terrains with extremely dense graphic data.
    3. Specify the resources: albedo and height textures (or texture tilesets) and up to 20 mask textures. In the case of using tilesets, specify only first tiles and appropriate naming patterns.
    4. Adjust other import settings. For instance, you can redefine the Resolutionof the Landscape Layer Maptextures.
    5. Click Reimportto load the provided resources.
    6. Modify the layer using Brush Editor.
  • Sculpting from scratch:

    1. Set the Data Fillingoption to Manual.
    2. Choose the Resolutionof the LandscapeLayerMap textures and click Reimportto apply changes.
    3. Click Brush Editand open Brush Editorto draw over the layer map surface and thus sculpt the layer from scratch.
Notice
Keep in mind that reimporting will clear all modifications made via the Brush Editor tool earlier!

Watch a quick video guide below on creating and editing a Landscape Terrain and Layer Maps:

Size and Density of Graphic Data#

The spatial size of Landscape Layer Maps is limited only by precision of coordinates. However, the resolution of graphic data used has the direct influence on the size of an *.lmap asset on the hard drive.

The density of a Landscape Layer Map data is calculated as its Spatial Size divided by the Resolution of graphic data and expressed in meters/pixel (mpx). Knowing the target size and density of your Landscape Terrain layer, you can estimate the resolution of input textures required for achieving the desired quality as follows:

ResolutionX = SizeX / Density
ResolutionY = SizeY / Density
Notice
The final density of the terrain graphic data is limited by the render parameters.

For example, if you need to create a square terrain 100 × 100 km and with 3 mpx density, you will need to prepare 32768 × 32768 px textures. You can slice huge textures to tilesets with proper naming, to operate on regular size textures (e.g., 8×8 textures each of 4096×4096 pixels).

Regardless of the bit depth of input textures, uncompressed graphic data of any Landscape Layer Map is saved using the following formats:

  • Two R32F textures are used to store the Height and Height Opacity data (32 bits per pixel for each one).
  • A single RGBA8 texture keeps the Albedo data including opacity (four 8-bit-per-pixel channels).
  • Five RGBA8 textures are used to store 20 Masks and the same number of textures is used for Masks Opacity data (four 8-bit-per-pixel channels for each one).

Thus, if all components are used each pixel of graphic data takes more than 50 bytes on the hard drive, without service data taken into account. Putting it all together, this is how the size of an *.lmap asset depends on the resolution of the data used and components enabled approximately:

Resolution, px* Approximate size Height Albedo Each 4 Masks
Color Opacity Color Opacity
1024×1024 74 Mb 5.7 Mb 5.7 Mb 5.7 Mb 5.7 Mb 5.7 Mb
2048×2048 295 Mb 22.7 Mb 22.7 Mb 22.7 Mb 22.7 Mb 22.7 Mb
4096×4096 1.1 Gb 91 Mb 91 Mb 91 Mb 91 Mb 91 Mb
8192×8192 4.6 Gb 364 Mb 364 Mb 364 Mb 364 Mb 364 Mb
16384×16384 18.3 Gb 1.41 Gb 1.41 Gb 1.41 Gb 1.41 Gb 1.41 Gb
32768×32768 74 Gb 5.7 Gb 5.7 Gb 5.7 Gb 5.7 Gb 5.7 Gb
65536×65536 295 Gb 22.7 Gb 22.7 Gb 22.7 Gb 22.7 Gb 22.7 Gb

*The highest resolution is taken from the input textures.

When enabling/disabling any component in the Import Settings and reimporting data, the size of the file increases or decreases correspondingly. 20 Masks are grouped into 5 textures each of four channels (Masks 0-3, .., Masks 16-19), therefore, enabling at least one mask in a group of four will be treated as if all four masks in the group were enabled in terms of the asset size.

Although, the format of Landscape Layer Map assets implies asynchronous streaming of data of only necessary tiles, the perfomance might be an issue on workstations utilizing hard drives with poor throughput capacity. In this case, consider splitting a huge Landscape Layer Map into several smaller ones and engaging compression. Make note that using performant SSDs is preferable.

Notice
Refinement of the Landscape Terrain graphic data using details enables you to achieve higher density without affecting the size of Landscape Layer Maps.

Compression#

Compression options serve for reduction of the size of the *.lmap file, which may also speed up asynchronous streaming of tiles. In some cases, compression ratio may exceed 100:1.

Supported compression methods:

  • Our Method — recommended. UNIGINE compression method optimized for compressing 2D and 3D textures. It provides better results than LZ4 and Zlib without quality reduction.
  • Zlib — for high compression ratio (can provide up to 2 times higher compression ratio, but takes up to 20 times longer).
  • LZ4 — temporary option, planned to be removed in the upcoming releases.

Lossless and Lossy compression options are available. When it is needed to apply any changes, the graphic data needs to be decompressed first. Therefore, depending on applicability, these options have different advantages:

  • Lossless compression ensures absence of quality deterioration and decompresses graphic data to its original state.
  • Lossy compression provides a higher compression ratio but some information may be lost.
Warning
When you repeatedly decompress/compress the data using Lossy algorithm, the quality will deteriorate every time the data is compressed.

It is recommended to develop projects against Lossless compression algorithms (or with compression disabled) and apply a Lossy compression option when making the final build.

Landscape Layer Map Parameters#

Landscape Asset Parameters#

Size Width and Length, in units (meters). Click Edit Size to toggle the size editing mode.
Attenuation Distance Distance of the transparency attenuation, starting from the edge of the map.
Current Data Density

Landscape Layer Map density calculated as the ratio of the Size to the Resolution, in meters/pixel.

Notice
The ratio is calculated for both dimensions separately: the spatial Width is divided by the texture Width, the same is done for the Length and the texture Height, and the maximum ratio value is considered the Current Data Density in meters/pixel.
Landscape

.lmap asset to store the landscape data. By default, it is the blank read-only landscape_layer_map_base.lmap asset, to edit the layer map you can create a new asset by using the Create button or specify an existing one. Brush Edit opens the Brush Editor.

Notice
Several Landscape Layer Maps can refer to the same .lmap asset without extra memory required.
Height Scale Scale multiplier along the Z axis.
Order The layer rendering order used in layers blending (higher numbers on top).
Collision Collision with the map.
Intersection Intersection with the map.
Intersection Bicubic Filter Enables bicubic filtering for intersection detection.
Culling Streaming is based on using previously loaded geometry to define what is going to be streamed next. This option enables uploading preliminary low-level data of all maps to CPU to be used for initializing the streaming. If disabled, only low-level data of the base map is uploaded on CPU.

Import Settings#

Import Settings are the settings of the .lmap asset associated with the Landscape Layer Map node.

There is a set of buttons to work with import settings:

Restore Defaults Reset all settings to the default values.
Apply Save and apply changes to the import parameters without reloading graphic resources. Click Apply after selecting a compression method option.
Reimport Reload all graphic resources with respect to the specified import parameters. Click Reimport after making any changes to the import settings to apply them.
Cancel Discard changes made to the import parameters.

Import settings:

Compression

Compression options:

  • Off — compression is disabled (maximum file size).
  • Lossless — lossless compression Our Method is enabled, all lossy compressions are disabled.
  • Lossy — lossless compression Our Method is enabled, all lossy compressions are enabled for all data (Lossy Compression checkboxes are checked).

    Warning
    Use of Lossy compression will lead to quality deterioration every time the data is compressed.
  • CustomCompression Method combo box appears below, Lossy Compression checkbox appears for Albedo and Masks.
Compression Method

Compression method options:

  • Our Method — recommended. UNIGINE compression method optimized for compressing 2D and 3D textures. It provides better results than LZ4 and Zlib without deteriorating the quality.
  • Zlib — for high compression ratio (can provide up to 2 times higher compression ratio, but takes up to 20 times longer).
  • LZ4 — temporary option, planned to be removed in the upcoming releases.
Data Filling

Origin of terrain data:

  • Manual — this type of data is selected for work with brushes.

    Notice
    The only setting available for this option is Resolution.
  • From Tileset — this type of data is used to add any available data sources.
Data Sources

Where data is taken from:

  • Assets — available asset files. This option is good for small terrains.
  • External files — absolute path to the file is indicated (for example, network disk). A recommended option in case of creating a huge terrain using high-density graphic data.
Notice
The engine doesn't track the changes made to external files. If there are some changes, you can update graphic data via the Reimport button.
Resolution

Resolution of maps limited only by available video memory. The following values are available:

  • Manual — set by the user. Graphic data from textures is remapped to fit the resolution.
  • Auto — automatically detected from the specified textures, the resolution of the biggest texture is used. If a tileset is specified the resulting resolution of all tiles combined will be considered.
Flip Y Flip tiles along the Y axis.
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 (e.g. tileset_x0_y2.png).
  • Indexed — the index-based tileset. When set, each tile of the source tileset is determined by the index (e.g. tileset_0.png). The number of columns of the source tileset is specified in the Number of Columns field.
Pattern Matching
  • Auto — automatically select the naming pattern.
  • Manual — manually specify the naming pattern.
Pattern A string naming pattern (e.g. _x%X_y%Y for the Row Column naming type or _%X for the Indexed type).
Number of Columns The number of columns in the tileset.
Horizontal Order

Horizontal loading direction of the source tileset.

  • Left -> Right
  • Right -> Left
Vertical Order

Vertical loading direction of the source tileset.

  • Top -> Down
  • Down -> Top

Heightmap#

Notice
When Data Filling is Manual, the only settings available are Opacity Lossy compression and Blending Mode.

Heightmap data
  • None — no data of this type is available at all.
  • Only Heightmap — load the specified heightmap as is. In this case, data of this layer will always overlap data of underlying layers.
  • Heightmap with Opacity — load the specified heightmap with an additional opacity mask applied. The mode is useful for blending height data with data of underlying layers.
Heightmap

A single-channel texture to be treated as the Heightmap. To use a tileset, specify the first tile here. Height values can be interpreted the following ways:

  • Normalized — normalized height values are mapped to the range specified by the Min and Max Height values.
  • Unnormalized — the height values are used as is.

It is recommended to use 16bit or 32bit sources for height as lower bit depth may not provide sufficient quality:

Height Min/Max — the values used to transform the value [0,1] stored in the heightmap to meters.
Attenuation Distance Distance of the transparency attenuation, starting from the edge of the map.
Height opacity Sets the height opacity map and channel where data is stored.
Opacity Lossy Compression Enables lossy compression.
Blending mode
  • Alpha-Blend — the colors of the heightmap of this layer map and the underlying one are blended.
  • Additive — data of the layer map is added atop.

Albedo#

Notice
When Data Filling is Manual, the only settings available are Lossy Compression and Albedo Blending.

Lossy Compression Enables lossy compression.
Albedo Data
  • None — no data of this type is available at all.
  • Only Albedo — load the specified albedo data as is. In this case, data of this layer will always overlap data of underlying layers.
  • Albedo with Opacity — load the specified albedo map with an additional opacity mask applied. The mode is useful for blending albedo data with data of underlying layers.
Albedo Color Albedo color image.
Attenuation Distance Distance of the transparency attenuation, starting from the edge of the map.
Albedo opacity Sets the albedo opacity map and channel where data is stored.
Albedo Blending
  • Alpha-Blend — the colors of this layer map and the underlying one are blended.
  • Additive — data of the layer map is added atop.
  • Overlay — added data replaces the data below it.
  • Multiplicative — the albedo colors are multiplied.

Masks#

Notice
When Data Filling is Manual, the only settings available are Lossy Compression, Name and Blending.

Lossy Compression Enables lossy compression.
Name

The mask name, which is synchronized with the current active ObjectLandscapeTerrain. On change, no reimport required.

Notice
Names of masks are stored by Landscape Terrain objects, i.e. names shown in the parameters of a Landscape Layer Map will change in correspondence with the current enabled Landscape Terrain.
Data
  • None — no data of this type is available at all.
  • Only Mask — load the specified texture as is. In this case, data of this layer will always overlap data of underlying layers.
  • Mask with Opacity — load the specified mask with an additional opacity mask applied. The mode is useful for blending the mask with data of underlying layers.
Color

The image and its channel to be applied as mask to the LandscapeLayerMap.

Notice
Instead of specifying a single-color image for the mask, you can set the Default Value for it and avoid excessive data loading.
Attenuation Distance Distance of the transparency attenuation, starting from the edge of the map.
Opacity Sets the opacity map and channel where data is stored.
Blending

Mode of blending this detail layer with other data layers:

  • Alpha-Blend — the corresponding masks of this layer map and the underlying one are blended.
  • Additive — data of the layer map is added atop.
  • Overlay — added data replaces the data below it.
  • Multiplicative — the colors of the masks are multiplied.
Notice
Enter the Masks Debug mode by using the Landscape Masks helper in the Editor or via the render_show_landscape_mask N console command, where N is the index of a mask from 1 to 20.
Last update: 2023-06-23
Build: ()