4

I've been trying to generate a 3D Minecraft world with noise maps, but no matter how I overlap sounds, I can't get a noise map that has both flat areas and mountainous areas.

So far I tried overlapping different noise maps, with varying results, and my best result looks something like this: https://imgur.com/0N2x5Ck.png (Sorry, didn't let me embed it here)

It looks "okay" but the closer you look the more you can see how there are 2 different noise waves, and the transitions are horrendously rough. And the whole world is just that kind of terrain, with no significant variation.

I'm not sure what aspect of noise I need to vary. I've tried tuning the scale, frequencies and generally just hacking it with anything I can think of, including:

  • Making negative sounds 0 (sort of worked and the spaces between each mountain increased, but it wasn't enough and didn't help with blending)
  • Averaging different noise maps (made a really flat world with a very slanted gradient. Looked terrible)
  • Capping values that were too high or low (Made some plateaus, but there's ultimately still no far-reaching flat ground, still has an islands look)

Anything I did so far always, without fail, looks like a petri dish (https://i.stack.imgur.com/OAX8L.jpg)

To reiterate, I'm trying to get a final noise map that includes:

  • Flat, low-lying land
  • Flat-ish Ocean floor that can reach medium depth to deep-depth
  • Mountainous terrain

all in the same map, smoothly. How do I do it?

UPDATE: Minecraft's inbuilt SimplexOctaveGenerator doesn't seem to be properly generating octaves. I replaced it with a generator library I found (https://github.com/Auburns/FastNoise/). The octaves are now working as intended, and I no longer have a petri dish look, and I've achieved some flat land and deep oceans. Now all that's needed is mountainous terrain. (https://i.stack.imgur.com/1pvad.jpg)

Hex_27
  • 103
  • 7
  • Minecraft achieves its plains areas by squashing the noise map down to ~3 blocks worth of difference, while mountains expand it out to 128 blocks. – Draco18s no longer trusts SE Jan 10 '20 at 20:32
  • So it's the same noisemap, but with a multiplier applied? When I tried it, there would be awkward jagged areas (Chunks that had different heights, etc) – Hex_27 Jan 11 '20 at 02:17
  • 1
    Those borders are where Minecraft fills in with transition biomes. Jungle Edge, Extreme Hills Edge, etc. They are very narrow biomes that have individual blockpos heights calculated specifically to transition from one heightmap to another. – Draco18s no longer trusts SE Jan 11 '20 at 03:26
  • That makes sense. But how does that method avoid recursion? Like it'd have to get adjacent chunks to calculate the new height, but by getting adjacent chunks, it causes more generation and it leads to an infinite recursion and a stackoverflow error. – Hex_27 Jan 11 '20 at 06:42
  • *Determining surface height* does not require loading chunks in Minecraft. The biome map is a separate object. Plus Minecraft has several different "zones" of chunk generation, precisely so that it can place blocks into adjacent chunks without causing cascading worldgen. – Draco18s no longer trusts SE Jan 11 '20 at 22:48
  • (https://www.spigotmc.org/threads/blockpopulator-giving-stackoverflowerror-when-setting-blocks.411745/#post-3655439) It's really not happening that way with spigot though. And doesn't that still cause recursive chunk generation? Eventually it'd force some unloaded chunk to generate to get the height – Hex_27 Jan 12 '20 at 02:42
  • [Offset by +8,+8](https://www.reddit.com/r/feedthebeast/comments/5x0twz/investigating_extreme_worldgen_lag/). Minecraft always decorates and populates one chunk less distant than it does initial generation, so adding 8 to X and Z means that the chunk *is always already created* and never cascades. – Draco18s no longer trusts SE Jan 12 '20 at 05:51

1 Answers1

1

Try combining noise maps with different frequencies by adding up or even multiplying. You should be able to get some larger terrain blocks by having a low frequency map.

Adder
  • 5,708
  • 1
  • 28
  • 56