Skip to content

Commit 4e2473e

Browse files
authoredApr 17, 2020
Document which noise APIs add world seed to noiseparams seed (#9693)
1 parent e88719b commit 4e2473e

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed
 

Diff for: ‎doc/lua_api.txt

+18-8
Original file line numberDiff line numberDiff line change
@@ -3250,9 +3250,9 @@ For this parameter you can randomly choose any whole number. Usually it is
32503250
preferable for this to be different from other seeds, but sometimes it is useful
32513251
to be able to create identical noise patterns.
32523252

3253-
When used in mapgen this is actually a 'seed offset', it is added to the
3254-
'world seed' to create the seed used by the noise, to ensure the noise has a
3255-
different pattern in different worlds.
3253+
In some noise APIs the world seed is added to the seed specified in noise
3254+
parameters. This is done to make the resulting noise pattern vary in different
3255+
worlds, and be 'world-specific'.
32563256

32573257
### `octaves`
32583258

@@ -4649,8 +4649,11 @@ Environment access
46494649
* Return value: Table with all node positions with a node air above
46504650
* Area volume is limited to 4,096,000 nodes
46514651
* `minetest.get_perlin(noiseparams)`
4652+
* Return world-specific perlin noise.
4653+
* The actual seed used is the noiseparams seed plus the world seed.
46524654
* `minetest.get_perlin(seeddiff, octaves, persistence, spread)`
4653-
* Return world-specific perlin noise (`int(worldseed)+seeddiff`)
4655+
* Deprecated: use `minetest.get_perlin(noiseparams)` instead.
4656+
* Return world-specific perlin noise.
46544657
* `minetest.get_voxel_manip([pos1, pos2])`
46554658
* Return voxel manipulator object.
46564659
* Loads the manipulator from the map if positions are passed.
@@ -6207,10 +6210,15 @@ It can be created via `PcgRandom(seed)` or `PcgRandom(seed, sequence)`.
62076210
-------------
62086211

62096212
A perlin noise generator.
6210-
It can be created via `PerlinNoise(seed, octaves, persistence, spread)`
6211-
or `PerlinNoise(noiseparams)`.
6212-
Alternatively with `minetest.get_perlin(seeddiff, octaves, persistence, spread)`
6213-
or `minetest.get_perlin(noiseparams)`.
6213+
It can be created via `PerlinNoise()` or `minetest.get_perlin()`.
6214+
For `minetest.get_perlin()`, the actual seed used is the noiseparams seed
6215+
plus the world seed, to create world-specific noise.
6216+
6217+
`PerlinNoise(noiseparams)`
6218+
`PerlinNoise(seed, octaves, persistence, spread)` (Deprecated).
6219+
6220+
`minetest.get_perlin(noiseparams)`
6221+
`minetest.get_perlin(seeddiff, octaves, persistence, spread)` (Deprecated).
62146222

62156223
### Methods
62166224

@@ -6224,6 +6232,8 @@ A fast, bulk perlin noise generator.
62246232

62256233
It can be created via `PerlinNoiseMap(noiseparams, size)` or
62266234
`minetest.get_perlin_map(noiseparams, size)`.
6235+
For `minetest.get_perlin_map()`, the actual seed used is the noiseparams seed
6236+
plus the world seed, to create world-specific noise.
62276237

62286238
Format of `size` is `{x=dimx, y=dimy, z=dimz}`. The `z` component is omitted
62296239
for 2D noise, and it must be must be larger than 1 for 3D noise (otherwise

0 commit comments

Comments
 (0)
Please sign in to comment.