Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Noise: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Sync: updated from Minecraft
SyncBot (talk | contribs)
Sync: updated from Minecraft
Line 16: Line 16:
<div class="treeview">
<div class="treeview">
* {{nbt|compound}}: Root object.
* {{nbt|compound}}: Root object.
** {{Nbt|int|firstOctave}}{{until|JE 26.3}} / {{nbt|int|base_octave}}{{upcoming|JE 26.3}}: First octave. If {{nbt|bool|legacy_random_source}} in the noise settings is true, it must be an integer less than or equal to 1, otherwise the value range is not unlimited.
** {{nbt|int|base_octave}}: First octave. If {{nbt|bool|legacy_random_source}} in the noise settings is true, it must be an integer less than or equal to 1, otherwise the value range is not unlimited.
** {{Nbt|list|amplitudes}}{{until|JE 26.3}} / {{nbt|list|amplitude_modifiers}} (optional){{upcoming|JE 26.3}}: A scaling factor to apply to each octave. The number of elements in the list must match {{cd|octave_count}}. If not specified, it defaults to 1.0.{{upcoming|JE 26.3}} Amplitudes of sub-noise. The frequency of a sub-noise at <code>index</code> (from 0) in the list is <code>2^(- firstOctave + index)</code>, and the amplitude (the value of the sub-noise ranges from <code>-amplitude</code> to <code>+amplitude</code>) of this sub-noise is about <code>1.04 * doubleValueAtIndex * 2^(sizeOfThisList - index - 1) / (2^sizeOfThisList - 1)</code> (assuming the range of 3D Improved Perlin Noise is ±1.04). For each sub-noise, two 3D improved perlin noises are created and their average is taken. The final range of this noise value is <code>± 10 * sumOfSubNoises / ( 3 * ( 1 + 1 / m ) )</code>, where m is the number of elements in the list after removing the leading and trailing zero elements. If {{nbt|bool|legacy_random_source}} in the noise settings is true, the length must be less than or equal to <code>1-firstOctave</code>. If false, the length is unlimited.{{until|JE 26.3}}
** {{nbt|list|amplitude_modifiers}} (optional): A scaling factor to apply to each octave. The number of elements in the list must match {{cd|octave_count}}. If not specified, it defaults to 1.0. Amplitudes of sub-noise. The frequency of a sub-noise at <code>index</code> (from 0) in the list is <code>2^(- firstOctave + index)</code>, and the amplitude (the value of the sub-noise ranges from <code>-amplitude</code> to <code>+amplitude</code>) of this sub-noise is about <code>1.04 * doubleValueAtIndex * 2^(sizeOfThisList - index - 1) / (2^sizeOfThisList - 1)</code> (assuming the range of 3D Improved Perlin Noise is ±1.04). For each sub-noise, two 3D improved perlin noises are created and their average is taken. The final range of this noise value is <code>± 10 * sumOfSubNoises / ( 3 * ( 1 + 1 / m ) )</code>, where m is the number of elements in the list after removing the leading and trailing zero elements. If {{nbt|bool|legacy_random_source}} in the noise settings is true, the length must be less than or equal to <code>1-firstOctave</code>. If false, the length is unlimited.{{until|JE 26.3}}
*** {{Nbt|double}}: A double value for a sub-noise.
*** {{Nbt|double}}: A double value for a sub-noise.
** {{nbt|float|base_amplitude}}{{upcoming|JE 26.3}}: A scale factor to apply to the noise output. It must not be negative.
** {{nbt|float|base_amplitude}}: A scale factor to apply to the noise output. It must not be negative.
** {{nbt|int|octave_count}}{{upcoming|JE 26.3}}: The number of octaves to sample. Value between 1 and 32 (inclusive).
** {{nbt|int|octave_count}}: The number of octaves to sample. Value between 1 and 32 (inclusive).
** {{nbt|boolean|normalize}}{{upcoming|JE 26.3}}: Controls how the output amplitude should be normalized. If {{cd|true}}, {{cd|base_amplitude}} is the expected amplitude of the output (i.e., 99.7% of all samples in {{cd|[-base.amplitude; base.amplitude]}}). If {{cd|false}}, the base amplitude is instead the amplitude of the first octave. If {{cd|"legacy"}}, it inherits the same normalization behavior as expressed by the previous format. If not specified, it defaults to {{cd|true}}.
** {{nbt|boolean|normalize}}: Controls how the output amplitude should be normalized. If {{cd|true}}, {{cd|base_amplitude}} is the expected amplitude of the output (i.e., 99.7% of all samples in {{cd|[-base.amplitude; base.amplitude]}}). If {{cd|false}}, the base amplitude is instead the amplitude of the first octave. If {{cd|"legacy"}}, it inherits the same normalization behavior as expressed by the previous format. If not specified, it defaults to {{cd|true}}.
</div>
</div>


Line 27: Line 27:
{{info needed section|when it was added.}}
{{info needed section|when it was added.}}
{{HistoryTable
{{HistoryTable
|{{HistoryLine|java upcoming}}
|{{HistoryLine|java}}
|{{HistoryLine||26.3|dev=snap6|Noises now define a fractal Brownian motion (fBm) configuration, producing approximate output vales fitting a normal distribution.
|{{HistoryLine||26.3|dev=snap6|Noises now define a fractal Brownian motion (fBm) configuration, producing approximate output vales fitting a normal distribution.
|Renamed the following fields:
|Renamed the following fields:

Revision as of 11:29, 16 September 2026

Template:For Template:Exclusive

File:Continentalness noise map.png
An example sample of the minecraft:continentalness noise

A noise is a technical Minecraft:JSON file that can be referenced by a Minecraft:density function and Minecraft:surface rule. They are stored within a Minecraft:data pack in the folder Template:Cd.

In addition to being called by density functions and surface rules, there are also some noises with hard-coded usage:

JSON format

  • Template:Nbt: Root object.
    • Template:Nbt: First octave. If Template:Nbt in the noise settings is true, it must be an integer less than or equal to 1, otherwise the value range is not unlimited.
    • Template:Nbt (optional): A scaling factor to apply to each octave. The number of elements in the list must match Template:Cd. If not specified, it defaults to 1.0. Amplitudes of sub-noise. The frequency of a sub-noise at index (from 0) in the list is 2^(- firstOctave + index), and the amplitude (the value of the sub-noise ranges from -amplitude to +amplitude) of this sub-noise is about 1.04 * doubleValueAtIndex * 2^(sizeOfThisList - index - 1) / (2^sizeOfThisList - 1) (assuming the range of 3D Improved Perlin Noise is ±1.04). For each sub-noise, two 3D improved perlin noises are created and their average is taken. The final range of this noise value is ± 10 * sumOfSubNoises / ( 3 * ( 1 + 1 / m ) ), where m is the number of elements in the list after removing the leading and trailing zero elements. If Template:Nbt in the noise settings is true, the length must be less than or equal to 1-firstOctave. If false, the length is unlimited.Template:Until
    • Template:Nbt: A scale factor to apply to the noise output. It must not be negative.
    • Template:Nbt: The number of octaves to sample. Value between 1 and 32 (inclusive).
    • Template:Nbt: Controls how the output amplitude should be normalized. If Template:Cd, Template:Cd is the expected amplitude of the output (i.e., 99.7% of all samples in Template:Cd). If Template:Cd, the base amplitude is instead the amplitude of the first octave. If Template:Cd, it inherits the same normalization behavior as expressed by the previous format. If not specified, it defaults to Template:Cd.

History

Template:Info needed section Template:HistoryTable

External links

Navigation

Template:Navbox Java Edition technical

Minecraft:de:Rauschdefinition Minecraft:fr:Bruit Minecraft:pt:Ruído Minecraft:zh:噪声