Omissions and inaccuracies in Noise Expressions aux docs

Place to report issues and suggest improvements to the API documentation.
Hanodest
Burner Inserter
Burner Inserter
Posts: 13
Joined: Sun Aug 11, 2024 10:55 pm
Contact:

Omissions and inaccuracies in Noise Expressions aux docs

Post by Hanodest »

In Built-in constants, control:temperature:bias and control:temperature:frequency are missing. They are used in temperature, which is used for tree placement. Weirdly, they also don't have associated controls in the UI either.

In Built-in functions, expression_in_range function is missing, which is used e.g. here

In voronoi_spot_noise, minkowski3 distance should use abs(x) and abs(y). Same for other voronoi functions.
Hanodest
Burner Inserter
Burner Inserter
Posts: 13
Joined: Sun Aug 11, 2024 10:55 pm
Contact:

Re: Omissions and inaccuracies in Noise Expressions aux docs

Post by Hanodest »

variable_persistence_multioctave_noise incorrectly suggests that it's same as multioctave_noise. In practice, they have different parameters. E.g. the following two expressions have the same result:

Code: Select all

variable_persistence_multioctave_noise{x = x, y = y, persistence = persistence, seed0 = map_seed, seed1 = 0, input_scale = input_scale, output_scale = output_scale}
multioctave_noise{x = x, y = y, persistence = persistence, seed0 = map_seed, seed1 = 0, input_scale = input_scale / 2, output_scale = output_scale * 2} 
Notice the difference in input_scale and output_scale. With higher number of octaves the difference is even more complicated.
Bilka
Factorio Staff
Factorio Staff
Posts: 3676
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Omissions and inaccuracies in Noise Expressions aux docs

Post by Bilka »

Hanodest wrote: Thu Nov 20, 2025 6:32 pm In Built-in constants, control:temperature:bias and control:temperature:frequency are missing. They are used in temperature, which is used for tree placement. Weirdly, they also don't have associated controls in the UI either.

In Built-in functions, expression_in_range function is missing, which is used e.g. here

In voronoi_spot_noise, minkowski3 distance should use abs(x) and abs(y). Same for other voronoi functions.
All fixed for the next version.

For variable_persistence_multioctave_noise, I'm a bit confused what you mean. It makes sense to me that if you halve the input scale but double the output scale you'd get the same result. So what's the issue there?
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Hanodest
Burner Inserter
Burner Inserter
Posts: 13
Joined: Sun Aug 11, 2024 10:55 pm
Contact:

Re: Omissions and inaccuracies in Noise Expressions aux docs

Post by Hanodest »

input_scale affects frequency of the noise. output_scale controls the amplitude. So, with the same exact parameters 1-octave variable_persistence_multioctave_noise has half the freqency and double the amplitude of regular multioctave_noise:

Code: Select all

      if(
        x < 0,
        variable_persistence_multioctave_noise{
          x = x, y = y, persistence = 1, 
          seed0 = map_seed, seed1 = 0,
          input_scale = 1/64, output_scale = 1/2,
          octaves = 1
        },
        multioctave_noise{
          x = x, y = y, persistence = 1,
          seed0 = map_seed, seed1 = 0,
          input_scale = 1/64, output_scale = 1/2,
          octaves = 1
        } 
      )
noise.png
noise.png (211.71 KiB) Viewed 153 times
At higher number of octaves, if persistence is 1, then the amplitude of multioctave_noise scales as sqrt(octaves), of variable_persistence_multioctave_noise - as octaves * 2^octaves
Post Reply

Return to “Documentation Improvement Requests”