unwanted patterns in simplex noise

Computer Graphics Asked by Sam Apostel on November 13, 2021

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

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:

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:

One Answer

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 that i used as a guide to make my own version in c#. Also I would check to make sure your vars are ints.

Answered by DOSLuke on November 13, 2021

Add your own answers!

Related Questions

glutSolid* source code

1  Asked on November 22, 2021 by tado-mi


How to retrieve data from Compute Shader to CPU?

0  Asked on November 15, 2021 by ethan-ma


unwanted patterns in simplex noise

1  Asked on November 13, 2021 by sam-apostel


Procedural generation of biological models

1  Asked on November 13, 2021 by daniel-cooke


What method is used for baking grayscale curvature maps

1  Asked on November 10, 2021 by jummit


Why are texture coordinates often called UVs?

2  Asked on August 27, 2021 by samanthaj


Dynamic Ray-Triangle Intersection

1  Asked on August 27, 2021 by cemklkn


Draw Line on Arbitrary Surface

0  Asked on August 27, 2021 by valentin-molina


How to raytrace Bezier surfaces?

5  Asked on August 27, 2021 by luser-droog


Better Shadow Mapping Techniques

2  Asked on August 27, 2021 by arjan-singh


What does GPU assembly look like?

4  Asked on August 27, 2021 by sebastien-finor


Ask a Question

Get help from others!

© 2022 All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir