mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
new worldgen for the taller world
This commit is contained in:
@@ -269,7 +269,7 @@ data class TerragenParamsAlpha1(
|
|||||||
override val caveShapeFreq: Double = 4.0, //adjust the "density" of the caves
|
override val caveShapeFreq: Double = 4.0, //adjust the "density" of the caves
|
||||||
override val caveAttenuateScale: Double = 1.0, // used with the caveAttenuateBias, controls the "concentration" of the cave gen
|
override val caveAttenuateScale: Double = 1.0, // used with the caveAttenuateBias, controls the "concentration" of the cave gen
|
||||||
override val caveAttenuateBias: Double = 0.90, // 1.0: flattens the gradient (deep voids are less tend to be larger). Also controls the distribution of ores. Equation: x^(log(bias) / log(0.5))
|
override val caveAttenuateBias: Double = 0.90, // 1.0: flattens the gradient (deep voids are less tend to be larger). Also controls the distribution of ores. Equation: x^(log(bias) / log(0.5))
|
||||||
override val caveAttenuateBias1: Double = 0.5, // 1.0: flattens the gradient (deep voids are less tend to be larger). Also controls the distribution of ores. Equation: x^(log(bias) / log(0.5))
|
override val caveAttenuateBias1: Double = 0.90, // 1.0: flattens the gradient (deep voids are less tend to be larger). Also controls the distribution of ores. Equation: x^(log(bias) / log(0.5))
|
||||||
override val caveSelectThre: Double = 0.918, // also adjust this if you've touched the bias value. Number can be greater than 1.0
|
override val caveSelectThre: Double = 0.918, // also adjust this if you've touched the bias value. Number can be greater than 1.0
|
||||||
override val caveBlockageFractalFreq: Double = 8.88,
|
override val caveBlockageFractalFreq: Double = 8.88,
|
||||||
override val caveBlockageSelectThre: Double = 1.40, // adjust cave closing-up strength. Lower = more closing
|
override val caveBlockageSelectThre: Double = 1.40, // adjust cave closing-up strength. Lower = more closing
|
||||||
|
|||||||
@@ -426,23 +426,23 @@ object Worldgen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun getCaveAttenuateBiasScaled(highlandLowlandSelectCache: ModuleCache, params: TerragenParams): ModuleCache {
|
private fun getCaveAttenuateBiasScaled(highlandLowlandSelectCache: ModuleCache, params: TerragenParams): ModuleCache {
|
||||||
val caveAttenuateBias0 = ModuleBias().also {
|
val caveAttenuateBias1 = ModuleCache().also { it.setSource(ModuleBias().also {
|
||||||
it.setSource(highlandLowlandSelectCache)
|
it.setSource(highlandLowlandSelectCache)
|
||||||
it.setBias(params.caveAttenuateBias) // (0.5+) adjust the "concentration" of the cave gen. Lower = larger voids
|
it.setBias(params.caveAttenuateBias1) // (0.5+) adjust the "concentration" of the cave gen. Lower = larger voids
|
||||||
}
|
})}
|
||||||
|
|
||||||
val caveAttenuateBias = caveAttenuateBias0.let {
|
val caveAttenuateBiasForOres = caveAttenuateBias1.let {
|
||||||
ModuleScaleOffset().also {
|
ModuleScaleOffset().also {
|
||||||
it.setSource(caveAttenuateBias0)
|
it.setSource(caveAttenuateBias1)
|
||||||
it.setScale(params.caveAttenuateScale)
|
it.setScale(params.caveAttenuateScale)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val scale = ModuleScaleDomain().also {
|
val scale = ModuleScaleDomain().also {
|
||||||
it.setScaleX(1.0 / params.featureSize) // adjust this value to change features size
|
it.setScaleX(1.0 / params.featureSize) // adjust this value to change features size
|
||||||
it.setScaleY(1.0 / params.featureSize)
|
it.setScaleY(1.0 / params.featureSize)
|
||||||
it.setScaleZ(1.0 / params.featureSize)
|
it.setScaleZ(1.0 / params.featureSize)
|
||||||
it.setSource(caveAttenuateBias)
|
it.setSource(caveAttenuateBiasForOres)
|
||||||
}
|
}
|
||||||
|
|
||||||
return ModuleCache().also {
|
return ModuleCache().also {
|
||||||
|
|||||||
Reference in New Issue
Block a user