Global terrain is a virtually limitless terrain representing a certain fragment of Earth's surface. It can be generated on the basis of ordinary raster images and/or GIS data. In case of using GIS data, appearance of the global terrain object is determined by the accuracy and availability of geospatial data. It should be noted that there are areas of Earth's surface with only low-resolution data available or even no geospatial data at all.

This type of terrain can be successfully used for flight simulators: most of the time the plane remains at a very high altitude and low-resolution data is sufficient. High-resolution data is necessary only around landing and take-off areas.

Notice

There can be only one Global Terrain object on the scene.

Memory consumption increases significantly when several viewports are used.

Terrain Structure

Height data generated on the basis of GIS elevation data or height maps (if non-georeferenced data is used for terrain generation).

Albedo data generated on the basis of GIS satellite imagery data or albedo textures (if non-georeferenced data is used for terrain generation).

Normal data generated on the basis of height data.

Masks data generated on the basis of landcover data.

Tiling

Global terrain has a regular grid and is represented as a tileset. Each tile has a fixed size of 128 x 128 pixels. The number of tiles in each dimension (X and Y) is determined by the area size and data density. The higher the density the more tiles will be generated for the corresponding tileset.

E.g. suppose we have a height data texture with the density of 100 meters per pixel for an area of 50 square kilometers. Thus, we need (50000/100) x (50000/100) = 500 x 500 pixels which can be covered by 4 x 4 tiles.

Terrain tiles are stored on disk using a special format. The number of tiles, that can be stored on a disk is limited only to its capacity.

At run time, the tiles around the viewpoint are automatically loaded to GPU memory according to visibility distances specified for corresponding LODs. These visibility distances determine the number of tiles to be loaded and can be automatically reduced by the Engine in case if a GPU memory limit was reached.

Visible tiles change as the viewpoint moves along the terrain.

Changing visible tiles while moving the viewpoint.

LODs

A level of detail (LOD) system automatically adapts the available resolution of terrain grid according to the distance and loads corresponding tiles.

Every particular data layer has its own number of LODs. Each LOD of a particular data layer is represented by a separate tileset and has a number of parameters according to data layer type. Each LOD has its own density (in meters per pixel) which determines the size of its tileset. The higher the LOD density, the bigger the LOD tileset (the density is multiplied by the size of a single tile).

Notice

The maximum number of LODs for each of the data layers is limited to 32.

LODs are loaded and cleared in accordance with corresponding distances specified in the TerrainGlobal tab. These distances are to be used to avoid delays and provide smoothness when switching between LODs as well as to ensure efficient memory use.

Resolution and visibility distance together determine the number of tiles to be loaded around the viewpoint.

Blending of LODs

As it was mentioned, there might be no data available for a more detailed LOD of a certain area. In this case the values of the two adjacent LODs are blended together to provide a smooth look without sharp edges or black holes. Blending is performed by means of linear interpolation on the basis of masks generated by the Landscape Tool for a certain tile.

Notice

Masks are generated only for those tiles that contain the border between areas with different resolution.

Let us consider the following example. Suppose we have two LODs:

LOD1 with the resolution of 100 meters per pixel - green area.

LOD0 with the resolution of 30 meters per pixel - orange area.

In this case masks will be generated only for the tiles marked with M.

Height Data

You can add a new LOD or remove an existing one by clicking Insert or Remove respectively.

TerrainGlobal parameters, Height LODs group.

The following parameters are available for the Height LODs:

Enabled - enable or disable the current height LOD.

Intersectable - enable or disable intersection detection for the current height LOD.

Collidable - enable or disable collision detection for the current height LOD.

Cast Shadow - enable or disable shadows casting for the current height LOD. You can use this parameter for performance optimization: disable shadows casting for the high poly LODs and enable for the low poly ones.

Notice

When only the low poly LOD casts shadows, the high poly LOD may be shadowed in areas where it shouldn't be. To reduce such an effect, use the Shadow Offset parameter of the terrain material.

Global Terrain Physics Simulation

The terrain takes part in physics simulation if it has a standard surface_base property assigned. Collisions with physical bodies use the most detailed LOD 0 and are handled within a set distance, where simulation of physics is in effect.

To provide the most accurate collision detection use the most detailed LOD.

Collisions are calculated for untesselated terrain geometry which may differ from the rendered geometry that is seen. Thus, in certain cases objects may seem "flying" above the terrain surface.

Notice

Hardware tesselation is controlled by the GPU, not the engine. Therefore, tesselated geometry may vary.

Planar Reflections and Oblique Frustum

Some performance optimizations of the global terrain object, such as oblique frustum and backface culling, may lead to graphic artefacts in case if planar reflections or oblique frustum are used with a low-poly terrain.

In case of excessive culling, when too many polygons are removed (e.g., can be noticed in incorrect water reflections of the terrain), it is recommended to reduce the values of Oblique Frustum Culling and Back Face Culling parameters of the terrain_global_base material.

Creating Decal-Based Holes

In some cases you may need to cut out an area of the terrain surface. For this purpose the Decal-Based Holes feature is supported by Global Terrain.

The feature is suitable for creating caves and tunnels through mountains on the terrain. As an example, on the following image a tunnel is integrated by just cutting some area of the terrain with a decal and replacing it with a mesh with the Terrain Lerp parameter enabled.