gpt4 book ai didi

terrain - 3d perlin 噪声函数如何用于生成地形?

转载 作者:行者123 更新时间:2023-12-03 21:00:54 27 4
gpt4 key购买 nike

我可以使用 2D Perlin 噪声函数来生成高度值,但我不明白为什么要使用 3D Perlin 噪声函数。在 Notch's blog ,他提到在 Minecraft 上使用 3D Perlin 噪声函数生成地形。有谁知道这将如何完成以及为什么它会有用?如果您路过 x , y , 和 z值不意味着你已经有高度了吗?

最佳答案

文章确切地说明了他使用 3D 噪声的原因:

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.

关于terrain - 3d perlin 噪声函数如何用于生成地形?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6091468/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com