Why Perlin noise algorithms use random number lookup tables

I studied noise algorithms for the library that I would like to build, and started with Perlin noise (more precisely, simplex noise, I want to work with arbitrary sizes, or at least up to 6). Reading Simplex noise, demystified , helped, but looking through the implementations at the end, I saw a large lookup table called perm .

In the code example, it is apparently used to generate indexes into a set of gradients, but the method seems odd. I assume the table is there to provide 1) determinism and 2) speed acceleration.

My question is, does the perm lookup table have any auxiliary meaning or purpose, or is it there for the reasons above? Or in another way, is there a specific reason that the pseudo-random number generator is not used other than performance?

+4
source share
2 answers

This is an array of bytes. The range is from 0 to 255. You can randomize it if you want. You probably want to sow random ... etc.

+2
source

For optimization, a parameter table (and a gradient table) is used. They are lookup tables for precomputed values. You are right in both paragraphs 1) and 2).

Other than performance and portability, there is no reason why you could not use PRN.

0
source

Source: https://habr.com/ru/post/1401290/


All Articles