mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
new worldgen wip
This commit is contained in:
@@ -250,6 +250,7 @@ interface TerragenParams {
|
||||
val caveShapeFreq: Double //adjust the "density" of the caves
|
||||
val caveAttenuateScale: Double // used with the caveAttenuateBias, controls the "concentration" of the cave gen
|
||||
val caveAttenuateBias: Double // 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))
|
||||
val caveAttenuateBias1: Double // 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))
|
||||
val caveSelectThre: Double // also adjust this if you've touched the bias value. Number can be greater than 1.0
|
||||
val caveBlockageFractalFreq: Double
|
||||
val caveBlockageSelectThre: Double // adjust cave closing-up strength. Lower = more closing
|
||||
@@ -268,6 +269,7 @@ data class TerragenParamsAlpha1(
|
||||
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 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 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 caveBlockageSelectThre: Double = 1.40, // adjust cave closing-up strength. Lower = more closing
|
||||
@@ -287,9 +289,10 @@ data class TerragenParamsAlpha2(
|
||||
override val mountainDisturbance: Double = 0.7, // greater = more distortion, overhangs
|
||||
|
||||
override val caveShapeFreq: Double = 4.0, //adjust the "density" of the caves
|
||||
override val caveAttenuateScale: Double = 0.95, // used with the caveAttenuateBias, controls the "concentration" of the cave gen
|
||||
override val caveAttenuateBias: Double = 0.93, // 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 caveAttenuateScale: Double = 0.94, // used with the caveAttenuateBias, controls the "concentration" of the cave gen
|
||||
override val caveAttenuateBias: Double = 0.95, // 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.915, // 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 caveBlockageSelectThre: Double = 1.40, // adjust cave closing-up strength. Lower = more closing
|
||||
|
||||
|
||||
@@ -606,17 +606,29 @@ internal object TerragenTest : NoiseMaker {
|
||||
it.setBias(params.caveAttenuateBias) // (0.5+) adjust the "concentration" of the cave gen. Lower = larger voids
|
||||
})}
|
||||
|
||||
val caveAttenuateBias = caveAttenuateBias0.let {
|
||||
val caveAttenuateBias1 = ModuleCache().also { it.setSource(ModuleBias().also {
|
||||
it.setSource(highlandLowlandSelectCache)
|
||||
it.setBias(params.caveAttenuateBias1) // (0.5+) adjust the "concentration" of the cave gen. Lower = larger voids
|
||||
})}
|
||||
|
||||
val caveAttenuateBiasForTerr = caveAttenuateBias0.let {
|
||||
ModuleScaleOffset().also {
|
||||
it.setSource(caveAttenuateBias0)
|
||||
it.setScale(params.caveAttenuateScale)
|
||||
}
|
||||
}
|
||||
|
||||
val caveAttenuateBiasForOres = caveAttenuateBias0.let {
|
||||
ModuleScaleOffset().also {
|
||||
it.setSource(caveAttenuateBias1)
|
||||
it.setScale(params.caveAttenuateScale)
|
||||
}
|
||||
}
|
||||
|
||||
val caveShapeAttenuate = ModuleCombiner().also {
|
||||
it.setType(ModuleCombiner.CombinerType.MULT)
|
||||
it.setSource(0, caveShape)
|
||||
it.setSource(1, caveAttenuateBias)
|
||||
it.setSource(1, caveAttenuateBiasForTerr)
|
||||
}
|
||||
|
||||
val cavePerturbFractal = ModuleFractal().also {
|
||||
@@ -660,7 +672,7 @@ internal object TerragenTest : NoiseMaker {
|
||||
val caveBlockageAttenuate = ModuleCombiner().also {
|
||||
it.setType(ModuleCombiner.CombinerType.MULT)
|
||||
it.setSource(0, caveBlockageFractal)
|
||||
it.setSource(1, caveAttenuateBias)
|
||||
it.setSource(1, caveAttenuateBiasForTerr)
|
||||
}
|
||||
|
||||
val caveBlockageSelect = ModuleSelect().also {
|
||||
@@ -711,7 +723,7 @@ internal object TerragenTest : NoiseMaker {
|
||||
it.setScaleX(1.0 / params.featureSize) // adjust this value to change features size
|
||||
it.setScaleY(1.0 / params.featureSize)
|
||||
it.setScaleZ(1.0 / params.featureSize)
|
||||
it.setSource(caveAttenuateBias)
|
||||
it.setSource(caveAttenuateBiasForOres)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user