mirror of
https://github.com/minetest/minetest.git
synced 2024-11-09 01:03:46 +01:00
Document which noise APIs add world seed to noiseparams seed (#9693)
This commit is contained in:
parent
e88719bcdd
commit
4e2473ec49
@ -3250,9 +3250,9 @@ For this parameter you can randomly choose any whole number. Usually it is
|
|||||||
preferable for this to be different from other seeds, but sometimes it is useful
|
preferable for this to be different from other seeds, but sometimes it is useful
|
||||||
to be able to create identical noise patterns.
|
to be able to create identical noise patterns.
|
||||||
|
|
||||||
When used in mapgen this is actually a 'seed offset', it is added to the
|
In some noise APIs the world seed is added to the seed specified in noise
|
||||||
'world seed' to create the seed used by the noise, to ensure the noise has a
|
parameters. This is done to make the resulting noise pattern vary in different
|
||||||
different pattern in different worlds.
|
worlds, and be 'world-specific'.
|
||||||
|
|
||||||
### `octaves`
|
### `octaves`
|
||||||
|
|
||||||
@ -4649,8 +4649,11 @@ Environment access
|
|||||||
* Return value: Table with all node positions with a node air above
|
* Return value: Table with all node positions with a node air above
|
||||||
* Area volume is limited to 4,096,000 nodes
|
* Area volume is limited to 4,096,000 nodes
|
||||||
* `minetest.get_perlin(noiseparams)`
|
* `minetest.get_perlin(noiseparams)`
|
||||||
|
* Return world-specific perlin noise.
|
||||||
|
* The actual seed used is the noiseparams seed plus the world seed.
|
||||||
* `minetest.get_perlin(seeddiff, octaves, persistence, spread)`
|
* `minetest.get_perlin(seeddiff, octaves, persistence, spread)`
|
||||||
* Return world-specific perlin noise (`int(worldseed)+seeddiff`)
|
* Deprecated: use `minetest.get_perlin(noiseparams)` instead.
|
||||||
|
* Return world-specific perlin noise.
|
||||||
* `minetest.get_voxel_manip([pos1, pos2])`
|
* `minetest.get_voxel_manip([pos1, pos2])`
|
||||||
* Return voxel manipulator object.
|
* Return voxel manipulator object.
|
||||||
* Loads the manipulator from the map if positions are passed.
|
* 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)`.
|
|||||||
-------------
|
-------------
|
||||||
|
|
||||||
A perlin noise generator.
|
A perlin noise generator.
|
||||||
It can be created via `PerlinNoise(seed, octaves, persistence, spread)`
|
It can be created via `PerlinNoise()` or `minetest.get_perlin()`.
|
||||||
or `PerlinNoise(noiseparams)`.
|
For `minetest.get_perlin()`, the actual seed used is the noiseparams seed
|
||||||
Alternatively with `minetest.get_perlin(seeddiff, octaves, persistence, spread)`
|
plus the world seed, to create world-specific noise.
|
||||||
or `minetest.get_perlin(noiseparams)`.
|
|
||||||
|
`PerlinNoise(noiseparams)`
|
||||||
|
`PerlinNoise(seed, octaves, persistence, spread)` (Deprecated).
|
||||||
|
|
||||||
|
`minetest.get_perlin(noiseparams)`
|
||||||
|
`minetest.get_perlin(seeddiff, octaves, persistence, spread)` (Deprecated).
|
||||||
|
|
||||||
### Methods
|
### Methods
|
||||||
|
|
||||||
@ -6224,6 +6232,8 @@ A fast, bulk perlin noise generator.
|
|||||||
|
|
||||||
It can be created via `PerlinNoiseMap(noiseparams, size)` or
|
It can be created via `PerlinNoiseMap(noiseparams, size)` or
|
||||||
`minetest.get_perlin_map(noiseparams, size)`.
|
`minetest.get_perlin_map(noiseparams, size)`.
|
||||||
|
For `minetest.get_perlin_map()`, the actual seed used is the noiseparams seed
|
||||||
|
plus the world seed, to create world-specific noise.
|
||||||
|
|
||||||
Format of `size` is `{x=dimx, y=dimy, z=dimz}`. The `z` component is omitted
|
Format of `size` is `{x=dimx, y=dimy, z=dimz}`. The `z` component is omitted
|
||||||
for 2D noise, and it must be must be larger than 1 for 3D noise (otherwise
|
for 2D noise, and it must be must be larger than 1 for 3D noise (otherwise
|
||||||
|
Loading…
Reference in New Issue
Block a user