Perlin Noise detail level. How to zoom in on a landscape?

前端 未结 2 1898
刺人心
刺人心 2021-02-05 16:13

I\'ve written my own Perlin Noise implementation and it works well. I can \'zoom\' in and out by changing the frequency, but as I zoom in the noise gets smoother and smoother.

2条回答
  •  渐次进展
    2021-02-05 17:12

    You need to generate using noise at successively higher frequencies to avoid the smoothness. Try http://www.arendpeter.com/Perlin_Noise.html for a clearer explanation of how to manipulate noise frequency. Octaves naturally fit together with a level of detail (LOD) implementation, which as long as you support on the fly generation, means you only have to generate more detail as you move close to it. Be aware that there are draw backs to on the fly generation of terrain, such as complicating generation of features like rivers and roads, so you may end up with pre-generation of terrain to a fixed minimum level of detail (e.g. 64 km grid squares), and then on the fly generation of more detailed features.

    I'd also recommend looking at Simplex noise which has lower computational overhead (see https://en.wikipedia.org/wiki/Simplex_noise for more details).

提交回复
热议问题