Open FamroFexl opened 4 days ago
As far as wrapping y
values goes, I believe if it can be calculated independently of the x
and z
values, it can stay the same. Besides, I believe a 5D perlin noise implementation will have to be used in order to wrap 3 dimensional noise anyway, and I have yet to find any 5D perlin noise implementations.
Implementations of SuperSimplexNoise might require a commissioned expansion for 4D and 5D implementations, since it appears the results of this implementation are less prone to scaling issues as might be the case with OpenSimplex2S.
The original patent for simplex perlin noise also expired over 2 years ago see here, so implementations using that approach might be easier to implement or use than OpenSimplex2S, which was developed as an alternative to the patent.
Step 1: Before we can convert minecraft 3d perlin noise to our 4d perlin noise, we need to integrate our 3d perlin noise (OpenSimplex2.noise3_Fallback()) into the existing code. This will tell us where we then need to put our 4d perlin noise.
As it turns out, biomes have very little to no effect over noise generation. The minecraft wiki says it does affect terrain generation in specific cases. Here are two comparative images.
WITHOUT biomes
WITH biomes
NormalNoise
uses PerlinNoise
BlendedNoise
uses PerlinNoise
PerlinSimplexNoise
uses SimplexNoise
PerlinNoise
uses ImprovedNoise
Therefore, the only actual noise classes are SimplexNoise
and ImprovedNoise
SimplexNoise
is used for End Islands.
PerlinSimplexNoise
is used for Biome temperature, frozen temperature, and biome info.
ImprovedNoise
is used in PerlinNoise
only.
PerlinNoise
is used in NormalNoise
and BlendedNoise
only.
NormalNoise
is used in a GeodeFeature
.
Noises
for generating terrain patterns like ore veins and pillars which are found in ice biomes, nether biomes, and caves.RandomState
which applies Noises
or uses older noise if required.Blender
to blend biomes together and old chunks together.NoiseBasedStateProvider
to generate vegetation in VegetationFeatures
such as grass, flowers, and cactus.BlendedNoise
is used in base world generation for the overworld, nether, and end. It is also used in DensityFunctions
to generate erosion, continents, jaggedness, ridges, etc.
I created this datapack to create simple overworlds that could quickly be analyzed. simple_overworld.zip
Suggestion
The main methods which need to be modified are in
net/minecraft/world/level/levelgen/synth
. The methodsgetValue(int x, int y)
andgetValue(int x, int y, int z)
inSimplexNoise
and most of the methods inImprovedNoise
need to be modified.The 4D noise generation I have been testing in discussions uses OpenSimplex2S. The simple algorithm I have been using to wrap the noise is below: