Let's go
I roamed around in the source for quite a while now and I think I understand world/biomegen to a decent level now.
Short summarisation of the two main classes (in my eyes):
org.terasology.logic.world.WorldBiomeProviderImpl
Basically generates two noises for temperature and humidity and calculates the biome based on these.
org.terasology.logic.world.generator.core.PerlinTerrainGenerator
Where the magic happens.
The main thing is generateChunk which decides what block is what based on a density map.
Most important is the creation of the density map in calcDensity. This one I don't totally understand, but I can see that humidity and temperature (so basically the biomes) are used to create a distanceToMountainBiome which is used to compute a mIntens etc, finally resulting in a long formula to generate the density.
So basically we have:
Terrain affected by temperature, humidity
Biomes affected by temperature, humidity
Multiple people requested a wider variety of landscapes.
My approach would be:
First: set biomes by a huge 2d noise. Other Biomes could be added quite good, changing biomesize is a matter of changing a multiplicator of the noise.
(Biome inspiration can be found -here-)
If the noise is not too wild, we should even get a nice alignment - like if very low noise values mean desert and very high mean glacier it would be very uncommon, yet not impossible that those two are directly next to each other.
Second: set terrain accordingly to the biomes, so a Forest will get less mountains than a high mountain region.
optional third: If humidity and temperature is needed for anything other:
every Biome gets a default humidity and temperature + a suddle noise overlay. By this the biome specific range would fit plus we have a bit of variation.
So, what are your thoughts? Is this a feasable/good methode?
so long,
Nym
I roamed around in the source for quite a while now and I think I understand world/biomegen to a decent level now.
Short summarisation of the two main classes (in my eyes):
org.terasology.logic.world.WorldBiomeProviderImpl
Basically generates two noises for temperature and humidity and calculates the biome based on these.
org.terasology.logic.world.generator.core.PerlinTerrainGenerator
Where the magic happens.
The main thing is generateChunk which decides what block is what based on a density map.
Most important is the creation of the density map in calcDensity. This one I don't totally understand, but I can see that humidity and temperature (so basically the biomes) are used to create a distanceToMountainBiome which is used to compute a mIntens etc, finally resulting in a long formula to generate the density.
So basically we have:
Terrain affected by temperature, humidity
Biomes affected by temperature, humidity
Multiple people requested a wider variety of landscapes.
My approach would be:
First: set biomes by a huge 2d noise. Other Biomes could be added quite good, changing biomesize is a matter of changing a multiplicator of the noise.
(Biome inspiration can be found -here-)
If the noise is not too wild, we should even get a nice alignment - like if very low noise values mean desert and very high mean glacier it would be very uncommon, yet not impossible that those two are directly next to each other.
Second: set terrain accordingly to the biomes, so a Forest will get less mountains than a high mountain region.
optional third: If humidity and temperature is needed for anything other:
every Biome gets a default humidity and temperature + a suddle noise overlay. By this the biome specific range would fit plus we have a bit of variation.
So, what are your thoughts? Is this a feasable/good methode?
so long,
Nym