Quickly create natural-looking terrain with customizable noise parameters. This tool is designed to create simple terrains that do not require manual painting
·
Report Bug
·
Request Features
- 📦 Installation
- Getting started 📝
- Parameters
- TerrainConfiguration
- Common configuration parameters
- TerrainNoiseConfiguration
- TerrainNoiseTextureConfiguration
- TerrainHeightmapConfiguration
- Generation examples
- Terrain shaders
- Procedural terrain (Work in progress)
- Runtime Brush (Work in progress)
- Download Latest Release
- Unpack the
addons/terrainyfolder into your/addonsfolder within the Godot project - Enable this addon within the Godot settings:
Project > Project Settings > Plugins
To better understand what branch to choose from for which Godot version, please refer to this table:
| Godot Version | terrainy Branch | terrainy Version |
|---|---|---|
main |
1.x |
Creating a new terrain is as easy as adding the Terrainy node to your scene and configuring its parameters. The basic workflow involves assigning a TerrainConfiguration that will shape a MeshInstance3D into a Terrain by generating a new ArrayMesh for it. You have the flexibility to assign multiple mesh instances to the Terrainy node to generate all terrains simultaneously, either within the editor or at runtime.
To generate all currently configured terrains, simply select the Terrainy node in the Scene tree and press the Generate Terrains button found in the Inspector or the node's toolbar. The process will execute immediately.
Terrains can also be generated dynamically at runtime using the Terrainy node's dedicated generation function. This is an async process so to confirm and run code after it finish you need to awair or connect a callback to the signal terrain_generation_finished
signal terrain_generation_finished(terrains: Dictionary[MeshInstance3D, TerrainConfiguration])
// Don't use procedural just yet even though it works, performance is not yet optimal
func generate_terrains(
selected_terrains: Dictionary[MeshInstance3D, TerrainConfiguration] = {},
spawn_node: Node3D = procedural_terrain_spawn_node,
procedural: bool = false) -> voidThe image below illustrates the parameters you can configure for terrain generation:
This is the basic resource which provides the parameters that you can alter to generate the desired terrain.
Important
This resource is not used directly, but rather those that extend from it.
A unique identifier used to access this specific Terrain resource externally (e.g., via code or configuration files).
A descriptive and readable name for this terrain, primarily for identification within the editor or UI.
An extended text field to provide additional context and detailed specifications about the characteristics or usage of this terrain resource.
An optional offset applied to the terrain's local position. This value shifts the terrain's origin relative to the parent node's transform (i.e., its local coordinate system) when it is spawned or instantiated in the scene.
More resolution means more detail (more dense vertex) in the terrain generation, this increases the mesh subdivisions and could reduce the performance in low-spec pcs.
The depth size of the mesh (z) in godot units (meters)
The width size of the mesh (x) in godot units (meters)
The maximum height (y) at which this terrain can be generated in godot units (meters). The noises values are in a range of (0, 1). So if the noise value in a specific vertex point it's 0.5 the height returned for a max_terrain_height of 50 the result will be 50 * 0.5 = 25
Include the collision shape when the terrain is generated
The basic material you want to apply when the terrain is generated. By default assign a green prototype textured material
This curve can adjust what the maximum height on the ground will be according to the graph from left to right in the generated noise image. This allows you to create flat mountains or holes in the generated terrain
Enable or disable the elevation curve for this terrain, when no curve is assigned is disabled by default
To generate a more noticed mountain shapes that go through negative values instead of stopping on 0.
Use an image to smooth the edges on the terrain. This addon provide a few images to get some extra shapes in the generated terrains by being able to create islands, cliffs and so on, can be found on res://addons/terrainy/assets/falloff_images.
Enable or disable the fall off for this terrain, when no fall off texture is assigned is disabled by default
Generate the terrain in a radial pattern, useful for creating volcanoes, islands, etc.
The strength of the radial shape applied to the terrain
Generates a volumetric mirror terrain situated directly beneath the main terrain. This secondary terrain is designed to enhance the sense of solidity and depth for the terrain mass, effectively replacing the visual perception of a thin, molded surface.
Enable or disable to include the mirror generation when the terrain is generated.
Generate the collision shape for this new terrain.
The separation between the main terrain and the mirror, this value is not recommended to update but is exposed in case you need it
The height of the mirror to the bottom
An optional FastNoiseLite in case you want more control in the output generation of this mirror terrain. Gives better results in terms of smooth visuals.
An optional material de apply on this mirror terrain. By default assign a brown prototype textured material
A configuration where you can provide a FastNoiseLite to shape the terrain.
When enabled, in each generation the seed of the selected noise will be randomized. Disable it to do it manually and keep the same seed for the generated land and not lose the structure.
This is a FastNoiseLite instance. Noise values are perfect to generate a variety of surfaces, higher frequencies tend to generate more mountainous terrain.
A configuration where you can provide a noise in texture format to shape the terrain
An image that represents a noise, this addon provides few ones to test more complex shapes that maybe could not be achieved with a FastNoiseLite on path res://addons/terrainy/assets/noise_textures.
You can find a lot more for free on ScreamingBrainStudios
A configuration where you can provide an Heightmap image to shape the terrain. You can generate heightmap images using This free generator for Unreal engine but the output can be use inside Godot as well.
A valid heightmap image on black white pattern that represents a shaped terrain.
Auto scale the correct height from the heightmap for a more accurate result.
Below you have a generated heightmap with the tool linked before
With generate_mirror enabled on configuration
The following terrain images were captured generating a terrain using TerrainNoiseConfiguration with Perlin noise with a frequency of 0.005 and the following elevation curve:
This addon provides multiple shaders to achieve terrain texturing based on world height and triplanar mapping, designed to avoid visible UV seams and texture stretching.
All shaders are located at: res://addons/terrainy/shaders/terrain
- Create a new
ShaderMaterial - Assign the desired shader
- Apply the material to the
MeshInstance3Dthat contains your terrain mesh
The shader triplanar_terrain.gdshader projects textures in three axes (X/Y/Z) and blends them based on surface normals. It eliminates visible seams and UV stretching.
A small set of test terrain textures is included at: res://addons/terrainy/shaders/terrain
This shader triplanar_gradient_terrain.gdshader variant replaces texture-based blending with smooth gradient transitions that uses GradientTexture2D, useful for stylized terrain or color-based materials for low-poly environments. This shader ensures visually clean gradients even on high resolution meshes.
Several pre-made gradients can be found at: res://addons/terrainy/shaders/terrain/gradients
A modified version of the original water shader from LesusX.
A ready-to-use material is included at: res://addons/terrainy/shaders/terrain/water/ocean_water.tres
- Create a new
MeshInstance3D - Assign a
PlaneMeshorQuadMesh - Apply the provided water material
- Set the mesh size, it's recommended to have at least subdivisions from 100 for better detail.