Difference between revisions of "PerlinNoise"
Jump to navigation
Jump to search
Hybrid Dog (talk | contribs) |
Hybrid Dog (talk | contribs) |
||
Line 1: | Line 1: | ||
A [http://en.wikipedia.org/wiki/Perlin_noise perlin noise] generator. Can be created either via <source enclose="none">PerlinNoise(seed, octaves, persistence, scale)</source> or <source enclose="none">minetest.get_perlin(seeddiff, octaves, persistence, scale)</source>. | A [http://en.wikipedia.org/wiki/Perlin_noise perlin noise] generator. Can be created either via <source enclose="none">PerlinNoise(seed, octaves, persistence, scale)</source> or <source enclose="none">minetest.get_perlin(seeddiff, octaves, persistence, scale)</source>. | ||
Note that [[PerlinNoiseMap]] works faster. | Note that [[PerlinNoiseMap]] works faster. | ||
− | + | <br/> | |
== Methods == | == Methods == | ||
* <source enclose="none">get2d(pos)</source> — 2d noise value at <source enclose="none">pos={x=,y=}</source> | * <source enclose="none">get2d(pos)</source> — 2d noise value at <source enclose="none">pos={x=,y=}</source> | ||
* <source enclose="none">get3d(pos)</source> — 3d noise value at <source enclose="none">pos={x=,y=,z=}</source> | * <source enclose="none">get3d(pos)</source> — 3d noise value at <source enclose="none">pos={x=,y=,z=}</source> | ||
− | + | <br/> | |
== Examples == | == Examples == | ||
See [[VoxelManip#Example|VoxelManip example]] | See [[VoxelManip#Example|VoxelManip example]] | ||
− | + | <br/> | |
== See also == | == See also == | ||
* [[PerlinNoiseMap]] | * [[PerlinNoiseMap]] | ||
* [[:Category:Mapgen]] | * [[:Category:Mapgen]] | ||
− | + | <br/> | |
== External Links == | == External Links == | ||
* [https://forum.minetest.net/viewtopic.php?f=6&t=8157 Minetest forum thread: "minetest.get_perlin() and minetest.get_perlin_map() Return nil"] | * [https://forum.minetest.net/viewtopic.php?f=6&t=8157 Minetest forum thread: "minetest.get_perlin() and minetest.get_perlin_map() Return nil"] | ||
* [http://freespace.virgin.net/hugo.elias/models/m_perlin.htm Explanation of perlin noise] | * [http://freespace.virgin.net/hugo.elias/models/m_perlin.htm Explanation of perlin noise] | ||
+ | * [http://webstaff.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf Explanation of perlin noise and simplex noise] | ||
* [https://forum.minetest.net/viewtopic.php?id=4032 Perlin noise values exceed [-1; 1]] | * [https://forum.minetest.net/viewtopic.php?id=4032 Perlin noise values exceed [-1; 1]] | ||
* [https://forum.minetest.net/viewtopic.php?f=7&t=5146 Faster mapgen noises] | * [https://forum.minetest.net/viewtopic.php?f=7&t=5146 Faster mapgen noises] | ||
− | + | <br/> | |
[[Category:Objects]] | [[Category:Objects]] |
Revision as of 06:26, 14 May 2016
A perlin noise generator. Can be created either via PerlinNoise(seed, octaves, persistence, scale)
or minetest.get_perlin(seeddiff, octaves, persistence, scale)
.
Note that PerlinNoiseMap works faster.
Methods
get2d(pos)
— 2d noise value atpos={x=,y=}
get3d(pos)
— 3d noise value atpos={x=,y=,z=}
Examples
See also
External Links
- Minetest forum thread: "minetest.get_perlin() and minetest.get_perlin_map() Return nil"
- Explanation of perlin noise
- Explanation of perlin noise and simplex noise
- Perlin noise values exceed [-1; 1]
- Faster mapgen noises