Perlin noise average values

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Perlin noise average values

by Hybrid Dog » Sat Sep 17, 2016 21:12

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

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Perlin noise average values

by paramat » Sun Sep 18, 2016 05:05

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.
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

by Hybrid Dog » Sun Sep 18, 2016 13:07

l made a mod to collect the values and show their distribution in a picture: https://github.com/HybridDog/pnoiseana
Image
Attachments
tmp.png
{
offset = 0,
scale = 1,
spread = {x=25, y=25, z=25},
seed = 9130,
octaves = 3,
persist = 0.5
}
tmp.png (1.01 KiB) Viewed 1034 times
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Perlin noise average values

by paramat » Mon Sep 19, 2016 02:00

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


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 4 guests

cron