Generates random conical spots. The map is divided into square regions, and within each region, candidate points are chosen at random and target density, spot quantity, and radius are calculated for each point (or one of every skip_span
candidate points) by configured expressions. Each spot contributes a quantity to a regional target total (which is the average of sampled target densities times the area of the region) until the total has been reached or a maximum spot count is hit. The output value of the function is the maximum height of any spot at a given point.
The parameters that provide expressions to be evaluated for each point (all named something_expression) need to actually return expression objects.
The quantity of the spot is assumed to be the same as its volume. Since the volume of a cone is pi * radius^2 * height / 3
, the height ('peak value') of any given spot is calculated as 3 * quantity / (pi * radius^2)
The infinite series of candidate points (of which candidate_point_count
are actually considered) generated by spot-noise
expressions with the same seed0
, seed1
, region_size
, and suggested_minimum_candidate_point_spacing
will be identical. This allows multiple spot-noise expressions (e.g. for different ore patches) to avoid overlap by using different points from the same list, determined by skip_span
and skip_offset
.
type | :: "function-application" | |
function_name | :: "spot-noise" | |
arguments | :: SpotNoiseArguments |
arguments | :: SpotNoiseArguments | |
function_name | :: "spot-noise" | |
type | :: "function-application" |
Integer. First random seed, usually the map seed is used.
Integer. Second random seed, usually chosen to identify the noise layer.
Default: 512
Integer. The width and height of each region.
Default: 0
Integer. Offset of the first candidate point to use.
Default: 1
Integer. Number of candidate points to skip over after each one used as a spot, including the used one.
Default: 256
Integer. How many candidate points to generate.
Default: depends on skip_span
Integer. An alternative to candidate_point_count
: number of spots to generate: candidate_spot_count = X
is equivalent to candidate_point_count / skip_span = X
Default: depends on region_size
and candidate_point_count
The minimum spacing to try to achieve while randomly picking points. Spot noise may end up placing spots closer than this in crowded regions.
Default: true
Whether to place a hard limit on the total quantity in each region by reducing the size of any spot (which will be the last spot chosen) that would put it over the limit.
A numeric expression that will be evaluated for each candidate spot to calculate density at that point.
A numeric expression that will be evaluated for each candidate spot to calculate the spot's quantity.
A numeric expression that will be evaluated for each candidate spot to calculate the spot's radius. This, together with quantity, will determine the spots peak value.
A numeric expression that will be evaluated for each candidate spot to calculate the spot's favorability. Spots with higher favorability will be considered first when building the final list of spots for a region.