List of Terrain Expressions

Below is a list of terrain expressions you can try out and use for your world generation.

If you haven’t already, please read the Terrain From Scratch & Creating A Pack From Scratch

The terrain expressions shown below can be found in the default overworld pack that comes prepacked with Terra, which can be viewed through GitHub.

Plain

eq_plain.yml
 1# Basic relatively flat terrain.
 2
 3vars: &variables
 4  base: 64
 5  height: 10
 6
 7terrain:
 8  sampler:
 9    type: EXPRESSION
10    dimensions: 3
11    variables: *variables
12    expression: -y + base
13
14  sampler-2d:
15    dimensions: 2
16    type: EXPRESSION
17    variables: *variables
18    expression: (simplex(x, z)+1)/2 * height
19    samplers:
20      simplex:
21        dimensions: 2
22        type: FBM
23        octaves: 4
24        sampler:
25          type: OPEN_SIMPLEX_2
26          frequency: 0.0075

Desert

eq_desert.yml
 1# Flat low elevation desert terrain
 2
 3vars: &variables
 4  base: 64 # Base terrain y level
 5  groundHeight: 5 # Block height of base noise
 6
 7  duneHeight: 10 # Block height of dunes
 8  duneSpacing: 20 # Higher number = more spacing between dunes
 9  duneFrequency: 0.7 # Overall dune frequency
10  duneRotationRange: pi/3 # How much dune cells are randomly rotated, 0 = anisotrophic, pi = isotrophic
11
12terrain:
13  sampler:
14    dimensions: 3
15    type: EXPRESSION
16    variables: *variables
17    expression: -y + base
18
19  sampler-2d:
20    dimensions: 2
21    type: EXPRESSION
22    variables: *variables
23    expression: |
24      duneHeight * dunes(x*duneFrequency, z*duneFrequency) * ((duneHeightVariation(x,z)/4)+0.75)
25      + groundHeight * (ground(x, z)+1)/2
26    samplers:
27      duneHeightVariation:
28        dimensions: 2
29        type: FBM
30        octaves: 2
31        sampler:
32          type: OPEN_SIMPLEX_2
33          frequency: 0.02
34      dunes: # Dune height map [0, 1]
35        dimensions: 2
36        type: DOMAIN_WARP
37        amplitude: 5
38        warp:
39          type: OPEN_SIMPLEX_2
40          frequency: 0.04
41        sampler:
42          type: DOMAIN_WARP
43          amplitude: 15
44          warp:
45            type: OPEN_SIMPLEX_2
46            frequency: 0.02
47            salt: 1
48          sampler: # Absolute sine wave domain rotated via CELL_VALUE, cell edges are hidden by DISTANCE_2_DIV
49            type: EXPRESSION
50            variables: *variables
51            expression: |
52              -mask(x, z) * (-|sin((
53                 x*sin(rotation(x,z)*duneRotationRange)
54                +z*cos(rotation(x,z)*duneRotationRange))/duneSpacing)|+1)
55            samplers:
56              height: &cell
57                dimensions: 2
58                type: CELLULAR
59                frequency: 0.01
60              rotation:
61                <<: *cell
62                return: CellValue
63              mask:
64                <<: *cell
65                return: Distance2Div
66
67      ground:
68        dimensions: 2
69        type: FBM
70        sampler:
71          type: OPEN_SIMPLEX_2
72          frequency: 0.005

Mountains

eq_mountains.yml
 1# Basic peaked mountains.
 2
 3vars: &variables
 4  base: 80
 5  height: 150
 6
 7terrain:
 8  sampler:
 9    dimensions: 3
10    type: EXPRESSION
11    variables: *variables
12    expression: -y + base
13    samplers:
14  sampler-2d:
15    dimensions: 2
16    type: EXPRESSION
17    expression: (noise(x, z)+1)/2 * height
18    variables: *variables
19    samplers:
20      noise:
21        dimensions: 2
22        type: DOMAIN_WARP
23        amplitude: 5
24        warp:
25          type: OPEN_SIMPLEX_2
26          frequency: 0.03
27        sampler:
28          type: FBM
29          octaves: 4
30          sampler:
31            type: LINEAR
32            min: -1
33            max: 0.2
34            sampler:
35              type: CELLULAR
36              frequency: 0.008

Overhangs

eq_overhangs.yml
 1# Shattered hills
 2
 3vars: &variables
 4  base: 80
 5  height: 35
 6  shatterHeight: 78
 7
 8terrain:
 9  sampler:
10    dimensions: 3
11    type: EXPRESSION
12    variables: *variables
13    expression: -y + base + (simplex(x, z)+1)/2 * height + |shatter(x/3, y, z/3)*shatterHeight|
14    samplers:
15      shatter:
16        type: CLAMP
17        min: -1
18        max: 1
19        dimensions: 3
20        sampler:
21          type: FBM
22          dimensions: 3
23          octaves: 4
24          sampler:
25            type: OPEN_SIMPLEX_2
26            frequency: 0.025
27      simplex:
28        dimensions: 2
29        type: FBM
30        octaves: 4
31        sampler:
32          type: OPEN_SIMPLEX_2
33          frequency: 0.0075

Tip

You can check out even more terrain samplers from the default Overworld config pack, which can be viewed through Github.