![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | eod |
When I run get_noise_2d()
I don’t get values returned that are in the range of -1 to 1. It always in a range from about -0.57 to 0.57
var _osn:OpenSimplexNoise = OpenSimplexNoise.new()
_osn.lacunarity = 2.0
_osn.octaves = 3
_osn.period = 64.0
_osn.persistence = 0.5
randomize()
_osn.set_seed(randi())
for x in range(60):
for y in range(60):
print(_osn.get_noise_2d(float(x), float(y)))
I’ve played around with different values with the period, octaves, persistence etc…
Is there a way to make it so the noise always ranges the full spread of -1 to 1?
If not, What is a good practice for determining what high, medium and low noise values are?
e.g. I’m trying to determine “high” noise values for mountain tiles, “low” noise values for water tiles, etc… I was putting something like this, but no mountains or hills were ever printed, since the noise_value never really got higher than 0.57
var noise_sample:float = _osn.get_noise_2d(float(x), float(y))
if noise_sample < -0.4: print("Water")
elif noise_sample < 0.4: print("Grass")
elif noise_sample < 0.7: print("Hill")
else: print("Mountain")
eod | 2020-01-16 07:33