You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scatter/Blob ores currently determine the number of clusters to generate in a chunk by doing an integer division of the eligible volume (chunk volume limited by the ore y range) by clust_scarcity ignoring the remainder. This gives unexpected results if eligible volume and scarcity values are of similar magnitude.
This effect is easy to see using the Skyblock:zero game (I'm not affiliated with that project), because it has a convenient ore that is placed in air using clust_scarcity = 80*80*80:
start a new game, notice the blue thingies - the emitters - around you
stop the game, delete the map
change to clust_scarcity = 80*80*80+1 in mods/sbz_planets/biomes.lua
restart the game, notice that no emitters are generated at all
stop the game, delete the map
change to clust_scarcity = 80*80*40+1
restart the game, notice that emitters are exactly the same as with clust_scarcity = 80*80*80 (-> half the available clust_scarcity range gives the same distribution)
Other games (e.g. Mineclonia - which I'm affiliated with) are affected right now, because some ores are very rare and/or ore y range is very small (either because the game is trying to replicate a height dependent probability or because of an unfortunate intersection of the ore y range and the chunk borders, e.g. having an ore with y_max = -200). A one node high layer ore only has a usable clust_scarcity range of 1 to 6400.
Solutions
Don't ignore the remainder of the volume by scarcity division and randomly generate enough additional clusters to make up for these lost partial ore clusters.
Alternatives
The useful clust_scarcity range could be extended right now by games using an increased chunksize.
Supporting non uniform y dependent ore distributions in the engine could reduce the need for thin layer ore definitions.
EDIT: noise_params (in addition to clust_scarcity) can be used to tweak the ore distribution
The text was updated successfully, but these errors were encountered:
Problem
Scatter/Blob ores currently determine the number of clusters to generate in a chunk by doing an integer division of the eligible volume (chunk volume limited by the ore y range) by
clust_scarcity
ignoring the remainder. This gives unexpected results if eligible volume and scarcity values are of similar magnitude.This effect is easy to see using the Skyblock:zero game (I'm not affiliated with that project), because it has a convenient ore that is placed in air using
clust_scarcity = 80*80*80
:clust_scarcity = 80*80*80+1
inmods/sbz_planets/biomes.lua
clust_scarcity = 80*80*40+1
clust_scarcity = 80*80*80
(-> half the availableclust_scarcity
range gives the same distribution)Other games (e.g. Mineclonia - which I'm affiliated with) are affected right now, because some ores are very rare and/or ore y range is very small (either because the game is trying to replicate a height dependent probability or because of an unfortunate intersection of the ore y range and the chunk borders, e.g. having an ore with
y_max = -200
). A one node high layer ore only has a usableclust_scarcity
range of 1 to 6400.Solutions
Don't ignore the remainder of the volume by scarcity division and randomly generate enough additional clusters to make up for these lost partial ore clusters.
Alternatives
The useful
clust_scarcity
range could be extended right now by games using an increasedchunksize
.Supporting non uniform y dependent ore distributions in the engine could reduce the need for thin layer ore definitions.
EDIT:
noise_params
(in addition toclust_scarcity
) can be used to tweak the ore distributionThe text was updated successfully, but these errors were encountered: