How is a 3d perlin noise function used to generate terrain?

后端 未结 3 776
你的背包
你的背包 2021-02-19 05:01

I can wrap my head around using a 2D Perlin noise function to generate the height value but I don\'t understand why a 3D Perlin noise function would be used. In Notch\'s blog, h

3条回答
  •  离开以前
    2021-02-19 05:17

    Well, Minecraft is about Mines. So, what Notch tried to solve was: "How do I get holes / overhangs in my world?"

    Since 2D perlin noise generates nice/smooth looking hills, 3d perlin noise will generate nice/smooth hills and nice holes in your 3D voxel grid.

    An implementation can be found here (while that is an N-dimensional solution).

    In other use-cases the Z component of a 3D perlin noise is set to the current time. This way you will get a smooth transition between different 2d perlin noises and that can be used as groundwork for fluid textures.

提交回复
热议问题