Closed JohanAR closed 2 years ago
I found contiguous zeros can appear when one of the noise2D
parameters is zero, but I could not confirm all the outputs are zero.
I think my implementation here leads poor entropy. https://github.com/Reputeless/PerlinNoise/blob/9de88a9a6f45938485b3301480f15b565e7d040b/PerlinNoise.hpp#L164-L167
You can improve the output quality by using noise3D
with an additional non-zero parameter.
perlin.noise3D(X, Y, 0.12345);
I will investigate further and make a change in the future release. Thank you for your feedback.
It's possible that I'm confusing two different problems I had. When I just got started I used the integer x and y image coordinates as parameters to the noise function, which gave me an empty image. To reduce the debug output I only printed the value when x == 0, so later on when I changed the code to use fraction coordinates I only saw the output from the first column.
I will try with you suggestion. Thanks for the reply!
resolved in v3.0.0.
Simplified version of the test program I wrote:
Most of the times I run the program I get values like I expect, but about 10% of the runs I only get 0, or the occasional -0, as output.
I haven't tried to track down why this is happening, but is this something that is expected from the perlin noise algorithm for certain seeds or something?
Ubuntu 19.10 Linux 5.3.0-51-generic #44-Ubuntu SMP Wed Apr 22 21:09:44 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux g++ (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008