Hello,
I know this topic was discussed before here, but I would like to understand, how Perlin Noise in 2D is implemented in Processing, so that I can use it consciously.
In other topics it was mentioned before, that Perlin Noise is repeating after certain numbers:
On this side it was mentioned Perlin noise repeats every 256 units in each coordinate direction:
stackoverflow.x/questions/9577259/perlin-noise-function-returning-same-results-for-different-inputs/9577407#9577407
x= com
However, that seems to be for Java.
When I map the 2D Perlin noise(i,j) in Processing (picture 1 below) I see repetition every 16 points in x direction but there is an offset by one y in y direction. For y there is repetition every 256 points.
That makes me believe that in Processing only 16x256 tiles are created for 2D noise. Is that correct?
Often it is mentioned that using smaller values “fixes” the issue of repetition. But that is not really the case. Zooming into a part of the Perlin function (by using smaller numbers) just reduces the part of the Perlin noise I can see on the screen. So when I have 4 repetitions when using i,j to create noise, then, when using i/2, j/2 instead, I get 2 repetitions (picture 2). At the same time the landscape gets flatter, because now 4 points have the same value that had one point before. However, when I adjust my point size (picture 3) I get the features back but the repetitions as well, so it is really irrelevant, what numbers I am using to create the noise.
Large numbers should not help as well, because if I multiply by any number I still have only 16/256 numbers available.
It is also often mentioned that changing the octave weight and frequency would change anything.
However, based on this website:
blog.hirnschall.x/perlin-noise/
x=net
Perlin noise is a fractal function, so the same function is summed up with different frequencies, so weighing smaller octaves stronger will just create the same function with a different frequency, so it does not necessarily solve the problem, when I zoom in with smaller values and increase higher frequency octaves to get more features I will end up with the same problem again.
Is my assumption correct, that Processing uses 16x256 grids for 2D Perlin noise?
Is there a reason for the offset by 1 point in y direction?
If that is true wouldn’t be the only solution to get non-repeating pattern to randomize the input i and j, so that every step i+1 andj+1 is different in size from the previous one?
Picture 1:
Picture 2:
I can only put one picture in.
Picture 3:
I can only put one picture in.