Perlin noise average values

Post Reply
User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Perlin noise average values

by Hybrid Dog » Post

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)?

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Perlin noise average values

by paramat » Post

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.

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

by Hybrid Dog » Post

l made a mod to collect the values and show their distribution in a picture: https://github.com/HybridDog/pnoiseana
Image
Attachments
{<br />	offset = 0,<br />	scale = 1,<br />	spread = {x=25, y=25, z=25},<br />	seed = 9130,<br />	octaves = 3,<br />	persist = 0.5<br />}
{
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

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Perlin noise average values

by paramat » Post

Yeah i researched this on the net and analysing large numbers of calculated results seems the easiest way.

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: Perlin noise average values

by Hybrid Dog » Post

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.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests