diff --git a/doc/en/world-generator.md b/doc/en/world-generator.md index 3c0a774f3..6432cb421 100644 --- a/doc/en/world-generator.md +++ b/doc/en/world-generator.md @@ -284,6 +284,14 @@ A method that generates simplex noise, adding it to the existing values. The noise seed can be specified in the `map.noiseSeed` field. +By default, noise octaves are mixed using addition: + +$noise_{out} = noise_{source} + noise_{applied} * 2^{-{octave}}$ + +To obtain more normalized multi-octave noise, you can enable the `map.normalNoise = true` flag, which changes the scheme: + +$noise_{out} = noise_{source} * (1 - 2^{-{octave}}) + noise_{applied} * 2^{-{octave}}$ + ```lua map:noise( -- coordinate offset @@ -313,6 +321,10 @@ The noise seed can be specified in the `map.noiseSeed` field. ![image](../images/cell-noise.gif) +> [!NOTE] cell noise looks better with `map.normalNoise = true` + +![image](../images/normal-cell-noise.png) + ### heightmap:resize(...) ```lua diff --git a/doc/images/normal-cell-noise.png b/doc/images/normal-cell-noise.png new file mode 100644 index 000000000..c1c103185 Binary files /dev/null and b/doc/images/normal-cell-noise.png differ diff --git a/doc/ru/world-generator.md b/doc/ru/world-generator.md index 3415a81d6..34738d4b3 100644 --- a/doc/ru/world-generator.md +++ b/doc/ru/world-generator.md @@ -287,6 +287,14 @@ map:dump('export:test.png') Зерно шума может быть указано в поле `map.noiseSeed`. +По-умолчанию октавы шума совмещаются через сложение: + +$шум_{результат} = шум_{исходный} + шум_{применяемый} * 2^{-{октава}}$ + +Для более получения нормализованного многооктавного шума можно включить флаг `map.normalNoise = true`, меняющий схему на: + +$шум_{результат} = шум_{исходный} * (1 - 2^{-{октава}}) + шум_{применяемый} * 2^{-{октава}}$ + ```lua map:noise( -- смещение координат @@ -316,6 +324,10 @@ map:noise( ![image](../images/cell-noise.gif) +> [!NOTE] клеточный шум выглядит лучше с `map.normalNoise = true` + +![image](../images/normal-cell-noise.png) + ### heightmap:resize(...) ```lua