With RealisticWorldGenerator you can create a custom Terrain by editing the generators.yml.
A custom Terrain can look like these example:
An terrain is based on multiple noises. RealisticWorldGenerator is using currently three kinds of them: Simplex-Octave, Perlin-Noise and Simplex-Noise. All these noise-functions will give you values between -1 and 1 which will be multiplied by an value you select to get an y-height. Via these noises you will create awesome mountains and can also create an eroded terrain and oceans.
As examples here are some visualized noises:
Simplex Octave:
Simplex Noise:
Perlin Noise:
By adding multiple of these noises you will have your final noise which defines the height of your terrain at the given Location.
To simplify these system we will look at 1D-Noise:
By changing values like the frequency and the amplitude we will get different noises with different values between -1 and 1 by multipling these noises with an height-value for each noise we will get multiple heights, that have all together and complete noise. To prevent noise in the void we add an min-height, so that our terrain will based on:
min-height+noise(This noise can be +/-heigth of all noises)
For more detailed Info you should check out the Article by redblobgames
After figuring out how noise is working and how to create an terrain with it, we will start with implementing it into our World-Generator.
First we have to open the generators.yml, here two ways:
These file should look like this here:
Generators:
noises:
- SIMPLEX_OCTAVE:RAND_1:1:9.999999999999999E-26:9.999999999999999E-26:1.0:1.0:30.0:320.0:1
- SIMPLEX_OCTAVE:RAND_1:1:9.999999999999999E-26:9.999999999999999E-26:1.0:1.0:25.0:430.0:1
- SIMPLEX_OCTAVE:RAND_1:1:0.5:0.5:1.0:1.0:3.0:430.0:1
- SIMPLEX_OCTAVE:RAND_1:1:5.0E-5:5.0E-5:1.0:1.0:3.5:430.0:1
- SIMPLEX_OCTAVE:RAND_1:1:5.0E-11:5.0E-11:1.0:1.0:5.6000000000000005:430.0:1
- SIMPLEX_OCTAVE:RAND_1:1:0.03:0.03:1.0:1.0:9.0:430.0:1
- SIMPLEX_OCTAVE:RAND_1:1:0.03:0.03:1.0:1.0:12.5:75.0:8
- SIMPLEX_OCTAVE:RAND_1:1:0.03:0.03:1.0:1.0:24.0:84.0:4
- PERLIN_NOISE:RAND_1:1:1.0:1.0:0.01:0.01:2.0:0.0:0
- PERLIN_NOISE:RAND_1:1:1.0:1.0:0.02:0.02:1.0:0.0:0
- PERLIN_NOISE:RAND_1:1:1.0:1.0:0.04:0.04:0.5:0.0:0
- PERLIN_NOISE:RAND_1:1:1.0:1.0:0.001:0.001:4.0:0.0:0
- PERLIN_NOISE:RAND_1:1:1.0:1.0:0.002:0.002:2.0:0.0:0
- PERLIN_NOISE:RAND_1:1:1.0:1.0:0.004:0.004:3.0:0.0:0
min-height: 54
change-settings: false
eroded-terrain: false
But what does these values mean?
noises:
- SIMPLEX_OCTAVE:RAND_1:1:9.999999999999999E-26:9.999999999999999E-26:1.0:1.0:30.0:320.0:1
In the list noises you can add/remove noises, as described all noises together will create the terrain-height.
To add an noise you have to add the values for an noise as following:
(Noise-Type):(Random):(Octaves):(Frequenzy):(Amplitude):(X-Multiplier):(Z-Multiplier):(Height):(Height for SimplexOctave(If not SimplexOctave set to 0)):(Additinal for SimplexOctave(If not SimplexOctave set to 0))
Important!
The Multipliers should have an value between 0 and 1
Following Noise-Types can be slected:
PERLIN_NOISE, SIMPLEX_NOISE, SIMPLEX_OCTAVE
Following Random-Types can be selected:
RAND_1, RAND_2, RAND_3, RAND_4, RAND_5, RAND_6
The randoms define following values:
RAND_1: Random with value WorldSeed
RAND_2: Random with value WorldSeed+1
RAND_3: Random with value WorldSeed*2
RAND_4: Random with value WorldSeed*4
RAND_5: Random with value WorldSeed-45
RAND_6: Random with value WorldSeed*5
The min-height defines the base-level on which the terrain will be added. This value should be bigger than the height of all noises!
The change-settings have to set to true, if you want to use your noise-settings, if you want to use the default-noise you should set this value to false.
By setting eroded-terrain to true the plugin will erode the terrain, this value work with default-terrain, but also with your custom terrain.
The last thing you have to do now is to activate the generators.yml. This can be done by setting Generate-Config in plugins/RealisticWorldGenerator/config.yml to true.