4D is fun too when you want to see 3-dimensional terrain bubble around like plasma At first i thought the extra dimension would be most feasible to use as seed, IE. for 2D world i'd use 3-dimensional noise where Z = seed. But i realized that i could alter the permutation table instead.
So that's what i did now, adding seed: int64 parameter to constructor. Then masking the permutation bytes with xor and seed. Basically what it does is:
Imagine seed was 4 bits (it's 64 bits really), for example seed=0110.
Then i have original permutation byte-array, going for example
100011011100... then make the seed wrap to same length:
011001100110... and finally XOR them for final permutation:
111010111010
And final touch, because seeds 0 through 1000 still showed hardly any change, i multiply seed at beginning with some constant 85123154182917 number, to force more bit-changes. Looks fine for now.
why put that multipler in there at all. maybe sometimes you want only subtle changes or you want to choose a different multiplier. anyway thanks for the post, I'll be sure to check it out when I have some time.
Maybe a bit late to ask, but, how Perlin Noise is different than a Plasma Cloud? Is there some advantage to use Perlin Noise?
The main diferences between Perlin Noise and Pasma Cloud are:
1. In Plasma Cloud you put subsequent pixels between the other two pixels while in Perlin Noise you actually place subsequent pixels moved a bit based on pseudorandom gradiant vector.
2. In Perlin Noise you usually pregenerate premutation table and use thet for making random textures for each octave and thus removes the need to be constantly generating random numbers. This in the end gives you better perfornamce since random number generation is quite slow.
3. In perlin noise you can define custom size and presistance for each octave with which you get fine controll on final texture.
Bookmarks