Multiple seed values for noise

I have multiple layers of 1D perlin noise rendering with vertices via beginShape() and endShape(). I noticed however that because each layer uses the same noise seed, their shape is quite similar and the effect is a less interesting and more obviously procedural.

I’d like each mountain to have it’s own unique distribution of values. I have tried rendering on multiple canvases, but that doesn’t work because you can’t blend each canvas into one image (which is a terrible shame!)

How can I give each shape it’s own noiseSeed()??? Or what is an alternative to achieve the same effect?

My code:

For me, when reasoning about noise, it sometimes helps to visualize it. Here’s a simple example that visualizes noise in two dimensions:

const NOISE_SCALE = 0.04;

function setup() {
  createCanvas(400, 400);
  for (let y = 0; y < height; y++) {
    for (let x = 0; x < width; x++) {
      stroke(noise(x * NOISE_SCALE, y * NOISE_SCALE) * 255);
      point(x, y);

When there’s visual feedback, it’s easier (and more fun) to play around with different configurations and observe what happens. Contemplating this, can you see a way to let each mountain have its own unique distribution of values? Maybe using more than one dimension?

1 Like

Okay, well I’m not sure what you had in mind, but this led me to figure out something. If I want to adjust my x dimension to eliminate the self-similarity between layers, while also preserving the “mountains” look, I found that adjusting the step component of the for loop did the trick.

So instead of noiseX++ at the end of the loop I can do something like noiseX+=5. Such that every 5th increment a vertex is created, instead of every increment.

Did you have something else in mind?

Thats great, good job! As it often is, there are multiple solutions to the same problem. What I had in mind was to introduce a second dimension and assign each mountain a different part of the noise space.

let noiseValue1 = noise(noiseX, MOUNTAIN_1);
let noiseValue2 = noise(noiseX, MOUNTAIN_2);

This solution and the one you ended up with are mostly doing the same thing: moving around in the noise space taking greater leaps. And thus ending up with more varied noise and exciting mountains.