TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Mountains, Cliffs, and Caves: A Guide to Using Perlin Noise for Procedural Gen

176 点作者 chwolfe3 个月前

17 条评论

bcraven3 个月前
To my geologist&#x27;s eyes there is a fundamental flaw in this method: the assumption of randomness.<p>All mountain ranges are driven up by lateral forces, so simply look on a satellite image to notice how they are made of ranges[0]. I do wonder if this propensity can be introduced to the code.<p>[0] <a href="https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Zagros_Mountains#&#x2F;media&#x2F;File%3AZagros_Mountains%2C_Iran%2C_SRTM_Shaded_Relief_Anaglyph.jpg" rel="nofollow">https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Zagros_Mountains#&#x2F;media&#x2F;File...</a>
评论 #43300327 未加载
评论 #43297801 未加载
评论 #43305593 未加载
评论 #43296949 未加载
评论 #43301346 未加载
评论 #43299220 未加载
评论 #43297787 未加载
评论 #43298981 未加载
ianthehenry2 个月前
If this kinda thing piqued your interest and you want to play around with this idea, paste the following code into <a href="https:&#x2F;&#x2F;bauble.studio&#x2F;" rel="nofollow">https:&#x2F;&#x2F;bauble.studio&#x2F;</a>:<p><pre><code> (def octaves 4) (def lacunarity 2.00) (def persistence 0.50) (def period 100) (def height 40) (plane y (fbm octaves :f lacunarity :gain persistence perlin p.xz period * height) # try s&#x2F;color&#x2F;shade on the line below | color (ss p.y -20 0 blue (ss p.y 0 20 green white)) | slow (20 &#x2F; height) | intersect (sphere 200)) </code></pre> (Using the terms from the article.) You can right-click and drag those numbers to see how the parameters affect the result in realtime. Also an easy way to compare perlin and simplex noise. Procedural terrain is fun!<p>Also while this uses 2D perlin noise -- you&#x27;re just changing the height of a plane -- you can create some pretty detailed neat &quot;rocky&quot; terrain effects by using 3D perlin noise instead. Change &quot;p.xz&quot; to &quot;p.xyz&quot; to see what that looks like.
TheRealPomax2 个月前
Stop using Perlin noise and use Simplex noise, or something even better, instead. We&#x27;ve come up with much, much better random noise generators in the last forty years, there&#x27;s really no excuse to still use Perlin, especially in a setting where grid-aligned artifacts are going to end up in your geometry. It&#x27;s a &quot;learning about noise&quot; algorithm, not a &quot;using it for reals&quot; algorithm.
评论 #43300359 未加载
jampa2 个月前
ProcGen is a fun rabbit hole to play with and was a hobby for a whole year while I tried building my own game.<p>I think the best material out there was from Red Blob Games (developer of the original Realm of the Mad God), which has some old but very complete material on procedural generation, including adding rivers, biomes, using Perlin noise and Voronoi polygons<p><a href="http:&#x2F;&#x2F;www-cs-students.stanford.edu&#x2F;~amitp&#x2F;game-programming&#x2F;polygon-map-generation&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www-cs-students.stanford.edu&#x2F;~amitp&#x2F;game-programming&#x2F;...</a>
DannyPage3 个月前
I really wish the header image used ProcGen to create a landscape image, rather than Yet Another OpenAI Image that sours me on the article as a reader before I start to read it. It sells the wrong idea and makes me distrust the author.
评论 #43297405 未加载
tallytarik2 个月前
The article mentions Minecraft — if you’re interested, check out “Reinventing Minecraft world generation by Henrik Kniberg”, a great talk about procedural generation by one of the developers: <a href="https:&#x2F;&#x2F;youtu.be&#x2F;ob3VwY4JyzE" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;ob3VwY4JyzE</a>
mudkipdev3 个月前
The AI generated images littered everywhere on the website makes it look childish.
评论 #43300665 未加载
jonhohle2 个月前
This reminds me of terrains Bryce (with its wonderful Kai Krause interface) would generate. I had no idea Ken Musgrave, who created the algorithms, was a student of Mandelbrot. I had always assumed Bryce used Perlin noise, but it turns out I was wrong and it was using fractals.
评论 #43303690 未加载
xanderlewis2 个月前
It’s not a ‘topological’ map (though there is such a thing) — it’s a ‘topographical’ one. This is an error I see often.
antonkar2 个月前
Game developers can potentially save the world right now, we can build the Artificial Static Place Intelligence – instead of creating AI&#x2F;AGI agents that are like librarians who only give you quotes from books and don’t let you enter the library itself to read the whole books. Why not expose the whole library – the entire multimodal language model – to real people, for example, in a computer game?<p>To make this place easier to visit and explore, we could make a digital copy of our planet Earth and somehow expose the contents of the multimodal language model to everyone in a familiar, user-friendly UI of our planet.<p>We should not keep it hidden behind the strict librarian (AI&#x2F;AGI agent) that imposes rules on us to only read little quotes from books that it spits out while it itself has the whole output of humanity stolen.<p>We can explore The Library without any strict guardian in the comfort of our simulated planet Earth on our devices, in VR, and eventually through some wireless brain-computer interface (it would always remain a game that no one is forced to play, unlike the agentic AI-world that is being imposed on us more and more right now and potentially forever)
hermitcrab2 个月前
Nice writeup.<p>If you are interested in this sort of thing, you might be interested in: <a href="https:&#x2F;&#x2F;jangafx.com&#x2F;software&#x2F;geogen" rel="nofollow">https:&#x2F;&#x2F;jangafx.com&#x2F;software&#x2F;geogen</a><p>(Haven&#x27;t used it myself, but I understand their EmberGen tool is well thought of in visual fx)
tmtvl2 个月前
Related: Shamus Young&#x27;s article on adding rivers to a procgen world &lt;<a href="https:&#x2F;&#x2F;www.shamusyoung.com&#x2F;twentysidedtale&#x2F;?p=12076" rel="nofollow">https:&#x2F;&#x2F;www.shamusyoung.com&#x2F;twentysidedtale&#x2F;?p=12076</a>&gt;.
poeticLLama2 个月前
Looks pretty cool, p5js: <a href="https:&#x2F;&#x2F;p5js.org&#x2F;reference&#x2F;p5&#x2F;noise&#x2F;" rel="nofollow">https:&#x2F;&#x2F;p5js.org&#x2F;reference&#x2F;p5&#x2F;noise&#x2F;</a> supports Perlin noise out of the box.
nonrandomstring2 个月前
Self-similarity is a really nice property for lots of sound synthesis too, so textures like water, fire and wind can make use of Perlin control and basis signals.
dr_dshiv2 个月前
Here’s a Claude artifact that implements this article. <a href="https:&#x2F;&#x2F;bit.ly&#x2F;3FohhjG" rel="nofollow">https:&#x2F;&#x2F;bit.ly&#x2F;3FohhjG</a>
jokoon2 个月前
I managed to write a glsl shader that generates perlin noise with octaves, and pull that data as 32bit float.<p>Much simpler than using opencl or cuda.
wwilim2 个月前
Most of the images don&#x27;t seem to load for me