1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Ore: Add Vein ore type

This commit is contained in:
kwolekr 2014-12-28 21:17:12 -05:00
parent 900fa26965
commit 61dfa912f5
4 changed files with 106 additions and 19 deletions

View file

@ -563,9 +563,27 @@ All default ores are of the uniformly-distributed scatter type.
clust_scarcity and clust_num_ores are ignored.
This is essentially an improved version of the so-called "stratus" ore seen in some unofficial mods.
- blob
Creates a roundish blob of ore according to 3d perlin noise described by noise_params. The maximum
size of the blob is clust_size, and clust_scarcity has the same meaning as with scatter type.
Creates a deformed sphere blobs of ore according to 3d perlin noise described by noise_params. The
maximum size of the blob is clust_size, and clust_scarcity has the same meaning as with scatter type.
- vein
Creates veins of ore varying in density by according to the intersection of two instances 3d perlin
noise with diffferent seeds both described by noise_params. random_factor varies the influence random
chance has on placement of an ore inside the vein, which is 1 by default. Note that modifying this
parameter may require adjusting noise_threshhold. The parameters clust_scarcity, clust_num_ores, and
clust_size are ignored by this ore type. This ore type is difficult to control since it is sensitive
to small changes. The following is a decent set of parameters to work from:
noise_params = {
offset = 0,
scale = 3,
spread = {x=200, y=200, z=200},
seed = 5390,
octaves = 4,
persist = 0.5,
flags = "eased",
},
noise_threshhold = 1.6
WARNING: Use this ore type *very* sparingly since it is ~200x more computationally expensive than
any other ore.
Ore attributes
-------------------
@ -2717,6 +2735,10 @@ Ore definition (register_ore)
noise_params = {offset=0, scale=1, spread={x=100, y=100, z=100}, seed=23, octaves=3, persist=0.70}
^ NoiseParams structure describing the perlin noise used for ore distribution.
^ Needed for sheet ore_type. Omit from scatter ore_type for a uniform ore distribution
random_factor = 1.0,
^ Multiplier of the randomness contribution to the noise value at any given point to
^ decide if ore should be placed. Set to 0 for solid veins. This parameter is only valid
^ for ore_type == "vein".
}
Decoration definition (register_decoration)