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

后端 未结 3 774
你的背包
你的背包 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:09

    The article says exactly why he used 3D noise:

    I used a 2D Perlin noise heightmap... ...but the disadvantage of being rather dull. Specifically, there’s no way for this method to generate any overhangs.

    So I switched the system over into a similar system based off 3D Perlin noise. Instead of sampling the “ground height”, I treated the noise value as the “density”, where anything lower than 0 would be air, and anything higher than or equal to 0 would be ground.

提交回复
热议问题