Perlin 噪声细节级别。如何放大风景?

发布于 2024-09-09 23:23:37 字数 803 浏览 10 评论 0原文

我已经编写了自己的 Perlin Noise 实现,并且效果很好。我可以通过改变频率来“放大”和缩小,但当我放大时,噪音会变得越来越平滑。

假设我有一个显示大陆的风景。我想放大到城市大小的区域(或更接近),但仍然有细节。我认为我需要更详细地重新生成景观,但我不确定是否有任何实现可以帮助实现这一点?

缩小后,我看到了大陆和海洋,但我希望在小区域中代表大区域。

这是我遇到的问题的示例(大陆级别):

替代文字
(来源:blind-games.com

放大:

alt文本
(来源:blind-games.com

放大地图上的某个区域时我仍然可以获得丰富的细节吗?有涉及技术的例子吗?

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.

Assume I have a landscape that displays a continent. I want to zoom in down to a city-size area (or closer), but still have detail. I think I need to re-generate the landscape at the closer detail but I'm not sure if there are any implementations that can help with that?

Zoomed out, I see the continent and oceans, but I want to have large regions represented in small areas.

Here is an example of the problem I'm having (Continent level):

alt text
(source: blind-games.com)

Zoomed in:

alt text
(source: blind-games.com)

How can I still get rich detail when zooming in to an area on the map? Any examples of techniques involved?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

抹茶夏天i‖ 2024-09-16 23:23:37

您需要使用连续较高频率的噪声来生成以避免平滑。尝试 http://www.arendpeter.com/Perlin_Noise.html 获取更清晰的说明操纵噪声频率。八度自然地与细节级别 (LOD) 实现结合在一起,只要您支持动态生成,就意味着您只需在接近它时生成更多细节。请注意,动态生成地形存在缺点,例如河流和道路等要素的生成变得复杂,因此您最终可能会预先生成固定的最低详细程度的地形(例如 64 公里的网格) ),然后动态生成更详细的特征。

我还建议查看具有较低计算开销的 Simplex 噪声(请参阅 https://en.wikipedia。 org/wiki/Simplex_noise 了解更多详情)。

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).

心病无药医 2024-09-16 23:23:37

假设您静态生成地图文件而不是动态生成地图文件,我认为最简单的解决方案是以所需的最高分辨率生成整个地图。实际上,您随后会缩小并返回到该粒度级别。它的计算成本更高,并且会产生更大的地图文件。根据查看器的实现,您可以使用一个地图文件,也可以为更大的视图构建一些解分辨率的文件。

Assuming that you're generating the map files statically rather than on the fly I think your simplest solution is to generate the entire map at the highest resolution you require. In effect you're then zooming out and back in to that level of granularity. It's more computationally expensive and will yield larger map files. Depending upon your implementation for the viewer you can either use one single map file or build some de-resolutioned files for the bigger view.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文