WHAT ARE TERRAINS & LANDSCAPES ?
In many 3D video games that have a wide space that players can explore, terrains are used to render the ground of the environment.
In contrast to normal 3D models, terrains usually use a special format, which is optimized for showing large and wide landscapes.
The format is not only relevant for the appearance, but is often also for computing physics and collisions. Mostly, terrains use
so called height maps, which define the shape of the terrain via images or similar data, where the luminance of the image
represent the height of the landscape. The image itself can be seen as a map from the top-view of the environment.
HOW CAN TERRAINS BE USED IN GODOT?
Godot has no terrain or landscape technology included in its core (the editor without any addons). However,
there are several terrain add-ons for different use-cases and wih different features, that are available for Godot.
They have all in common, that they are not only a library for rendering terrains, but also come with an editor,
allowing to create and modify the terrain.
To get started with a terrain, get an overview with the list below and download the corresponding add-on.
HOW ARE TERRAINS RENDERED?
Most terrains typically use special optimized meshes (often referred as clip maps) that usually move with the camera. The mesh itself
does not have the height information, but uses a special shader that can deform the mesh by reading the height map
and control map. For the texturing, the control map data is used to select the textures that are used and blended from the materials.
In the case of the voxel terrain, the meshes work differently. The data is polygon-based and voxel-volumes are stored as chunked meshes, which allows for minecraft alike realtime-editing.
WHAT FORMATS DO TERRAINS USE?
Terrains usually have an implementation-depending format. Often images are used for editing or storing the height map.
Additionally, maps that define the look are stored next to the height maps as control maps.
The control maps can store how textures are blended and oriented and also how they are tinted or rough/smooth they are.
Different implementation have however different needs and so most formats can't be easily exchanged.
HOW ARE TERRAINS CREATED?
All mentioned add-ons have built in editors for Godot with special UIs, specialized toolbars and buttons. The editors come with tools to deform the height or shape of the terrain
with brush like modifiers, that are used with the mouse. By clicking a point in 3D on the terrain, the terrain can be
increased,decreased or smoothed. Also, texture painting tools can be used to add textures for the terrain, which
than can be directly drawn on the terrain. On top of that, depending on the terrain addon, assets like grass, trees, foliage and other
object can be placed.
TERRAIN3D OR TERRABRUSH?
Both addons are very good solutions, but have differences.