l use perlin noise to detect whether the position at x and z belong to the sumpf biome.
https://github.com/HybridDog/sumpf/blob ... n.lua#L127
To allow custom biome sizes and rarity, l need to find out how to predict the noise values occurrences. Simply using sinus doesn't work right.
p(v) is the chance the abs of a randomly picked value is smaller than v.
p(0) = 0 of course,
p(1) ≈ 1 (The values are not always inside [-1; 1].)
p(0.5) > 0.5 l assume
How can l calculate p(v)?
Perlin noise average values
- Hybrid Dog
- Member
- Posts: 2828
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Perlin noise average values
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Perlin noise average values
I'd like to know this too. For example what noise thresholds to use if i want to divide a world equally into 3 biomes.
It's easy to calculate the maximum noise value from octaves and persistence though.
It's easy to calculate the maximum noise value from octaves and persistence though.
- Hybrid Dog
- Member
- Posts: 2828
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
l made a mod to collect the values and show their distribution in a picture: https://github.com/HybridDog/pnoiseana
- Attachments
-
- {
offset = 0,
scale = 1,
spread = {x=25, y=25, z=25},
seed = 9130,
octaves = 3,
persist = 0.5
} - tmp.png (1.01 KiB) Viewed 229 times
- {
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Perlin noise average values
Yeah i researched this on the net and analysing large numbers of calculated results seems the easiest way.
- Hybrid Dog
- Member
- Posts: 2828
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Re: Perlin noise average values
https://stackoverflow.com/questions/114 ... percentage
Pelin noise values are more or less gaussian distributed, that can't be calculated easily.
Calculating the expected size of the biome chunks and an expectedly linear biome chunk border with consistent expected length can not be done accurately for rare biomes I think, and that's no longer simply gaussian distributed.
Pelin noise values are more or less gaussian distributed, that can't be calculated easily.
Calculating the expected size of the biome chunks and an expectedly linear biome chunk border with consistent expected length can not be done accurately for rare biomes I think, and that's no longer simply gaussian distributed.
Who is online
Users browsing this forum: No registered users and 6 guests