Terrain Generation

I've started using Perlin noise instead of a height map to generate the terrain to have infinite generation and be able to generate caves and caverns as well as the surface of the terrain. The results have been encouraging but there's still a lot to be done to ensure that it creates a realistic surface with mountains and plains and other natural elements such as rivers and lakes.

First thing I generated was some rolling hills with a 2d Perlin noise function, looks good but too boring for gameplay.

Then I generated some 3d noise which made this alien landscape.

I modified the 3d noise function to create a slightly more realistic terrain, here by changing the thresholds for what makes a solid block dependent on elevation so that the lower levels are almost solid with more caves on the way up to the surface, then the surface gives way to mountains and floating islands. It's not realistic enough but if I hadn't used a linear change it might have worked better. 


Lastly: Layers upon layers of 2d Perlin noise generated terrain on top of each other, this is how I plan to make realistic terrain. Starting with a mountain layer I got tall mountains and large valleys, then I placed a layer of stone starting from the bottom replacing all air blocks in the way up to around 30 meters, then a layer of dirt replacing air up to 34 meters and lastly adding a layer of dirt on top of everything with a between 0 and 4 blocks deep to put dirt on the mountains and add some more noise to the surface.


14 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Interesting, I'd never considered adding layers upon layers of 2D Perlin noise - awesome! :)

    ReplyDelete
  3. Interesting, I'd never considered adding layers upon layers of 2D Perlin noise - awesome! :)

    ReplyDelete
  4. Interesting, I'd never considered adding layers upon layers of 2D Perlin noise - awesome! :)

    ReplyDelete
  5. Interesting, I'd never considered adding layers upon layers of 2D Perlin noise - awesome! :)

    ReplyDelete
  6. Interesting, I'd never considered adding layers upon layers of 2D Perlin noise - awesome! :)

    ReplyDelete
  7. Interesting, I'd never considered adding layers upon layers of 2D Perlin noise - awesome! :)

    ReplyDelete
  8. Interesting, I'd never considered adding layers upon layers of 2D Perlin noise - awesome! :)

    ReplyDelete
  9. Interesting, I'd never considered adding layers upon layers of 2D Perlin noise - awesome! :)

    ReplyDelete
  10. Interesting, I'd never considered adding layers upon layers of 2D Perlin noise - awesome! :)

    ReplyDelete
  11. Interesting, I'd never considered adding layers upon layers of 2D Perlin noise - awesome! :)

    ReplyDelete
  12. Interesting, I'd never considered adding layers upon layers of 2D Perlin noise - awesome! :)

    ReplyDelete
  13. Interesting, I'd never considered adding layers upon layers of 2D Perlin noise - awesome! :)

    ReplyDelete