Perlin杂讯详细程度.如何放大风景? [英] Perlin Noise detail level. How to zoom in on a landscape?

查看:139
本文介绍了Perlin杂讯详细程度.如何放大风景?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

放大后,我看到了大陆和海洋,但我想在小区域中代表大区域.

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


(来源: blind-games.com )

放大:


(来源: blind-games.com )

当放大地图上的某个区域时,如何仍能获得丰富的细节?有涉及技术的例子吗?

解决方案

您需要使用连续更高频率的噪声来生成信号,以避免平滑.尝试 http://freespace.virgin.net/hugo.elias/models/m_perlin .htm ,以更清楚地说明如何控制噪声频率.八度自然可以与细节级别(LOD)实施完美地结合在一起,只要您支持实时生成,就意味着您只需靠近它就可以生成更多细节.请注意,地形的动态生成存在一些缺点,例如使诸如河流和道路之类的要素的生成复杂化,因此您可能最终会预先生成地形以固定的最小细节级别(例如64 km的网格正方形) ),然后即时生成更详细的功能.

我还建议您查看具有较低计算开销的Simplex噪声(请参阅 https://en有关更多详细信息,请访问.w​​ikipedia.org/wiki/Simplex_noise .

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


(source: blind-games.com)

Zoomed in:


(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?

解决方案

You need to generate using noise at successively higher frequencies to avoid the smoothness. Try http://freespace.virgin.net/hugo.elias/models/m_perlin.htm 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).

这篇关于Perlin杂讯详细程度.如何放大风景?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆