noise icon indicating copy to clipboard operation
noise copied to clipboard

Consistency across hardware

Open curtispuetz opened this issue 5 months ago • 0 comments

Can you get consistent noise generation across different hardware by specifying a seed?

I have one computer where I use import random; random.seed(1234) to set the seed and the perlin noise generated is always the same. But with the same seed on another computer, the perlin noise is like-wise always the same, but different from the first computer.

For instance

import random
from noise import pnoise2

random.seed(1234)
perlin_base = random.randint(0, 2000)

result = pnoise2(
    0.01,
    0.01,
    octaves=6,
    persistence=0.2,
    lacunarity=2.0,
    base=perlin_base,
)

print(result)  # Result is -0.013092000968754292 on computer 1, and -0.013136674650013447 on computer 2

curtispuetz avatar Sep 15 '24 14:09 curtispuetz