<p>I know im a bit late, but hopefully this can help other people. you can add detail by using Fractal Brownian Motion. There is a great article <a href="https://cmaher.github.io/posts/working-with-simplex-noise/" rel="nofollow noreferrer">here</a> that i used as a guide to make my own version in c#. Also I would check to make sure your vars are ints.</p>

CC BY-SA 4.0
2019-06-27T17:19:12.630Z
2019-06-27T17:19:12.630Z
DOSLuke
<p>I want to create a "river biome" where there are rivers cutting to a flat land mass, to start I wrote a little js to generate a random height map (with simplex noise) but that's where I'm stuck.</p>

<p>this is what it generates:
<a href="https://i.sstatic.net/FNwDW.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/FNwDW.png" alt="enter image description here"></a></p>

<p>as you can see there are clear diagonal lines in there.
I tried looking up how to fix this and on my search I found these:</p>

<ul>
<li><a href="https://computergraphics.stackexchange.com/questions/283/is-all-grid-based-noise-inevitably-anisotropic">Is all grid based noise inevitably anisotropic?</a></li>
<li><a href="https://computergraphics.stackexchange.com/questions/2447/why-does-my-perlin-noise-look-blocky">Why does my Perlin Noise look &quot;blocky&quot;?</a></li>
</ul>

<p>I don't know if this is my problem of if it's something else entirely.</p>

<p>here's the significant part of my code:</p>

<pre><code>for(var y = 0;y &lt; myRivers.height;y++){
    for(var x = 0;x &lt; myRivers.width;x++){
        lightness = simplexnoise(x/50,y/50); // number between -1 and 1
        myRivers.context.fillStyle = lightnessToRgb(lightness); //maps lightness to a color
        myRivers.context.fillRect(x * 4, y * 4, 4, 4); // fills a pixel with the color
    }
}
</code></pre>

<p>a codepen: <a href="https://codepen.io/anon/pen/gooyMj" rel="nofollow noreferrer">https://codepen.io/anon/pen/gooyMj</a></p>

CC BY-SA 3.0
2018-01-09T06:45:43.723Z
The second question you link to has a good analysis. What happens when you look at just 1 octave of the noise? Also, what interpolation function are you using? Linear interp will look more blocky than using a smooth step, for example.
user1118321
CC BY-SA 3.0
2018-01-09T08:21:14.793Z
I don’t really use interpolation I think
Sam Apostel
CC BY-SA 3.0
2018-01-09T08:22:13.710Z
@user1118321 so multiplying with another octave might work?
Sam Apostel
CC BY-SA 3.0
2018-01-09T13:44:31.723Z
A heightmap generated from Perlin noise won't give you a plausible-looking river system anyway. Rivers "cut" their own valleys through terrain.
Dan Hulme
CC BY-SA 3.0
2018-01-09T14:59:49.273Z
@DanHulme I’m talking about a flat land mass so it wouldn’t look like normal rivers anyway
Sam Apostel
CC BY-SA 3.0
2018-01-09T16:56:24.843Z
No, I'm not suggesting a solution. I'm suggesting a way of determining what the problem is. If you show just your lowest octave, what does it look like? Is it blocky? I don't enough about how the `simplexnoise()` function you're using works to tell you. Is that a function you wrote or something supplied by a library?
user1118321
CC BY-SA 4.0
2020-07-23T17:15:38.490Z
Shader toy has a simplex noise implementation that you can edit in real time [here](https://www.shadertoy.com/view/Msf3WH) This is a good place to compare your implementation and play with different values to see what results simplex noise will give. (and look at some other examples of simplex in action)
pmw1234
<noise>
unwanted patterns in simplex noise
Sam Apostel
# unwanted patterns in simplex noise

(Asked by: username_0 on 2018-01-08)

I want to create a "river biome" where there are rivers cutting to a flat land mass, to start I wrote a little js to generate a random height map (with simplex noise) but that's where I'm stuck.

this is what it generates:
[![enter image description here](https://i.sstatic.net/FNwDW.png)](https://i.sstatic.net/FNwDW.png)

as you can see there are clear diagonal lines in there.
I tried looking up how to fix this and on my search I found these:

* [Is all grid based noise inevitably anisotropic?](https://computergraphics.stackexchange.com/questions/283/is-all-grid-based-noise-inevitably-anisotropic)
* [Why does my Perlin Noise look "blocky"?](https://computergraphics.stackexchange.com/questions/2447/why-does-my-perlin-noise-look-blocky)

I don't know if this is my problem of if it's something else entirely.

here's the significant part of my code:

```
for(var y = 0;y < myRivers.height;y++){
    for(var x = 0;x < myRivers.width;x++){
        lightness = simplexnoise(x/50,y/50); // number between -1 and 1
        myRivers.context.fillStyle = lightnessToRgb(lightness); //maps lightness to a color
        myRivers.context.fillRect(x * 4, y * 4, 4, 4); // fills a pixel with the color
    }
}

```

a codepen: <https://codepen.io/anon/pen/gooyMj>

**Tags:** noise

> **Comments:**
> **username_1**: The second question you link to has a good analysis. What happens when you look at just 1 octave of the noise? Also, what interpolation function are you using? Linear interp will look more blocky than using a smooth step, for example.  
> **username_0**: I don’t really use interpolation I think  
> **username_0**: @username_1 so multiplying with another octave might work?  
> **username_2**: A heightmap generated from Perlin noise won't give you a plausible-looking river system anyway. Rivers "cut" their own valleys through terrain.  
> **username_0**: @username_2 I’m talking about a flat land mass so it wouldn’t look like normal rivers anyway  
> **username_1**: No, I'm not suggesting a solution. I'm suggesting a way of determining what the problem is. If you show just your lowest octave, what does it look like? Is it blocky? I don't enough about how the `simplexnoise()` function you're using works to tell you. Is that a function you wrote or something supplied by a library?  
> **username_3**: Shader toy has a simplex noise implementation that you can edit in real time [here](https://www.shadertoy.com/view/Msf3WH) This is a good place to compare your implementation and play with different values to see what results simplex noise will give. (and look at some other examples of simplex in action)  

---

## 1 answers

### Answer by username_4 on 2019-06-27. Score: 1

I know im a bit late, but hopefully this can help other people. you can add detail by using Fractal Brownian Motion. There is a great article [here](https://cmaher.github.io/posts/working-with-simplex-noise/) that i used as a guide to make my own version in c#. Also I would check to make sure your vars are ints.


---

