Problem with smooth biome transition(WorldGenerating)

Discussion in 'Spigot Plugin Development' started by szaros123, Dec 8, 2018 at 3:29 PM.

  1. Hi everyone! I am writing my own custom worldgenerator plugin which is going well.

    But unfortunately i got stuck when it comes to different biomes , i have two biome BiomeA(SANDSTONE) which is more hilly than BiomeB(STONE) which is flat, like plains. They use same noise(simplex) but with different settings. The problem is when they connect there is a rough transition between them , and i want to make it smooth. How can i make the connection more smooth, more natural?

    Here how it looks like.
    [​IMG]
    And how it should look like.(Just a picture from minecraft).
    [​IMG]


    Thanks for any advice.
     
  2. md_5

    Administrator Developer

    I think you should try stacking noise rather than having multiple discrete noise generators.

    e.g. the sand would be simplex 1, then the stone would be simplex 1 + 2.


    Terrain gen is black magic to me anyway
     
    • Agree Agree x 1
  3. Well a i tried , got the same result, maybe got worse


    [​IMG]


    If anyone has an idea. here is my code.



    Code (Java):
    for (int x=0; x  < 16;  x++){
                for (int z = 0; z < 16; z++) {
                    double noise =  90;
                    biome.setBiome(x,z,Biome.DESERT);
                    int nx =CHUNKX*16+x;
                    int nz =CHUNKZ*16+z;
                    double worley_biome_noise = BiomeSchemeNoise.GetNoise(nx,nz);
                    double simplexnoise = SimplexNoise_LOW.GetNoise(nx,nz)*8;
                    double simplexnoise_high = SimplexNoise_HIGH.GetNoise(nx,nz)*32;


                    if (worley_biome_noise > 0.3) { //Cellular noise biome selection
                        noise = noise + simplexnoise + simplexnoise_high;
                        for (int y = 0; y < noise; y++) {
                            data.setBlock(x,y,z,Material.SANDSTONE);
                        }
                    }
                    else {
                        noise = noise + simplexnoise ;
                        for (int y =  0; y < noise; y++) {
                            data.setBlock(x,y,z,Material.STONE);
                        }
                    }

                }
            }
     
  4. I am no expert in noise generation, but it is possible that a simple blending technique can fix the issues you have. It won't be perfect, but it will probably do the job.
     
  5. I have a solution to this, but it involves having gradual shifts between biomes instead of sharp changes.

    The only real solution without rewriting your generator would be to average the height settings for a given column. Sample the biomes surrounding it, add them together, divide them by the number of samples, for example.
     

Share This Page