News for hackers. Stuff that matters.
Re:A Simple Hash for Perlin Noise by eerikkivistik on Tuesday May 10, 2022 @06:33PM (#31333544)
Maybe I am missing something, but wouldn't a regular random number generator with a defined seed work just as well? If the problem is determinism, then using a deterministic seed should give the same result.
Re:A Simple Hash for Perlin Noise by Sharlin on Tuesday May 10, 2022 @06:48PM (#31333675)
If all you want to do is to generate a texture by looping over all pixels in sequence, then yes, you can use a RNG. But in many use cases you need to evaluate a noise function at an arbitrary (x, y) position (or (x, y, z) or even higher dimension) which means you need to hash the coordinates to get the pseudorandomness you want.
Re:A Simple Hash for Perlin Noise by foota on Tuesday May 10, 2022 @06:44PM (#31333645)
A desirable property for this is to be able to generate only some part of the terrain, but if you're using a seeded PRNG then you have to generate the same bits at a time. You could solve this with chunking, but it's not trivial.
Re:A Simple Hash for Perlin Noise by thisismyswamp on Wednesday May 11, 2022 @10:09AM (#31340159)
Indeed like others mentioned, it's about being able to generate terrain chunks starting from anywhere in the world.

A random number generator using the same seed would still have to follow the same steps for all users, meaning generating the world from the origin.

Re:A Simple Hash for Perlin Noise by pcwalton on Tuesday May 10, 2022 @06:35PM (#31333567)
Correct, you can use an RNG. It's no coincidence that many RNGs and hashes (and, for that matter, ciphers) have similar constructions.