# Generating natural-looking terrain from a few known peaks

**URL:** <https://discourse.processing.org/t/generating-natural-looking-terrain-from-a-few-known-peaks/18233>\
**Category:** Coding Questions\
**Created:** [February 29, 2020, 12:25am UTC](https://discourse.processing.org/t/generating-natural-looking-terrain-from-a-few-known-peaks/18233 "2020-02-29T00:25:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dandotdot](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@dandotdot](https://discourse.processing.org/u/dandotdot)\
**Post date:** [February 29, 2020, 12:25am UTC](https://discourse.processing.org/t/generating-natural-looking-terrain-from-a-few-known-peaks/18233/1 "2020-02-29T00:25:21Z")

</div>

Hi clever people,

I’m trying to find the best way to generate terrain that looks natural-ish (Which I suppose mainly means peaks descending as valleys and ridges, rather than a single plane).

I know the heights of a bunch of peaks which are scattered pretty randomly across the area, and I can generate a perlin noise terrain that can be pushed up at the peaks, but it looks bad, especially where the descents from the peaks overlap.

Can anyone recommend an approach for doing this in Processing?

Many thanks,  
Dan

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [February 29, 2020, 1:39am UTC](https://discourse.processing.org/t/generating-natural-looking-terrain-from-a-few-known-peaks/18233/2 "2020-02-29T01:39:50Z")

</div>

Applying Perlin noise to intersecting cones isn’t going to get you the features you want. Try hydraulic erosion @jb4x @solub :

> [@Generating terrain with hydraulic erosion](https://discourse.processing.org/t/genereting-terrain-with-hydraulic-erosion/10948):
>
> Hi, After watching that video: [Coding Adventure: Hydraulic Erosion - YouTube](https://www.youtube.com/watch?v=eaXk97ujbPQ) And reading that paper: [https://www.firespark.de/resources/downloads/implementation%20of%20a%20methode%20for%20hydraulic%20erosion.pdf](https://www.firespark.de/resources/downloads/implementation%20of%20a%20methode%20for%20hydraulic%20erosion.pdf) I decided to take a go at generated terrain using hydraulic erosion. The code below definitively gives some results although they are not completely as expected. Here some before/after pictures: To play with the code, just hit play, zoom a bit with the middle mouse button…
