Tune cave noise scales to 6. Fix blobs spflag, now enabled. Update conf.example

This commit is contained in:
paramat 2014-11-09 12:11:24 +00:00 committed by kwolekr
parent 18c583ee0b
commit 10a47b7fee
3 changed files with 25 additions and 20 deletions

@ -425,15 +425,17 @@
# Perlin noise attributes for different map generation parameters # Perlin noise attributes for different map generation parameters
# Offset, scale, spread factor, seed offset, number of octaves, persistence # Offset, scale, spread factor, seed offset, number of octaves, persistence
#mgv5_spflags = blobs
#mgv5_np_filler_depth = 0, 1, (150, 150, 150), 261, 4, 0.7 #mgv5_np_filler_depth = 0, 1, (150, 150, 150), 261, 4, 0.7
#mgv5_np_factor = 0, 1, (250, 250, 250), 920381, 3, 0.45 #mgv5_np_factor = 0, 1, (250, 250, 250), 920381, 3, 0.45
#mgv5_np_height = 0, 10, (250, 250, 250), 84174, 4, 0.5 #mgv5_np_height = 0, 10, (250, 250, 250), 84174, 4, 0.5
#mgv5_np_cave1 = 0, 7.5, (50, 50, 50), 52534, 4, 0.5 #mgv5_np_cave1 = 0, 6, (50, 50, 50), 52534, 4, 0.5
#mgv5_np_cave2 = 0, 7.5, (50, 50, 50), 10325, 4, 0.5 #mgv5_np_cave2 = 0, 6, (50, 50, 50), 10325, 4, 0.5
#mgv5_np_ground = 0, 40, (80, 80, 80), 983240, 4, 0.55 #mgv5_np_ground = 0, 40, (80, 80, 80), 983240, 4, 0.55
#mgv5_np_crumble = 0, 1, (20, 20, 20), 34413, 3, 1.3 #mgv5_np_crumble = 0, 1, (20, 20, 20), 34413, 3, 1.3
#mgv5_np_wetness = 0, 1, (40, 40, 40), 32474, 4, 1.1 #mgv5_np_wetness = 0, 1, (40, 40, 40), 32474, 4, 1.1
#mgv6_spflags = biomeblend, jungles, mudflow
#mgv6_np_terrain_base = -4, 20, (250, 250, 250), 82341, 5, 0.6 #mgv6_np_terrain_base = -4, 20, (250, 250, 250), 82341, 5, 0.6
#mgv6_np_terrain_higher = 20, 16, (500, 500, 500), 85039, 5, 0.6 #mgv6_np_terrain_higher = 20, 16, (500, 500, 500), 85039, 5, 0.6
#mgv6_np_steepness = 0.85, 0.5, (125, 125, 125), -932, 5, 0.7 #mgv6_np_steepness = 0.85, 0.5, (125, 125, 125), -932, 5, 0.7

@ -42,7 +42,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
FlagDesc flagdesc_mapgen_v5[] = { FlagDesc flagdesc_mapgen_v5[] = {
//{"blobs", MGV5_BLOBS}, {"blobs", MGV5_BLOBS},
{NULL, 0} {NULL, 0}
}; };
@ -70,6 +70,8 @@ MapgenV5::MapgenV5(int mapgenid, MapgenParams *params, EmergeManager *emerge_) {
MapgenV5Params *sp = (MapgenV5Params *)params->sparams; MapgenV5Params *sp = (MapgenV5Params *)params->sparams;
this->spflags = sp->spflags;
// Terrain noise // Terrain noise
noise_filler_depth = new Noise(&sp->np_filler_depth, seed, csize.X, csize.Z); noise_filler_depth = new Noise(&sp->np_filler_depth, seed, csize.X, csize.Z);
noise_factor = new Noise(&sp->np_factor, seed, csize.X, csize.Z); noise_factor = new Noise(&sp->np_factor, seed, csize.X, csize.Z);
@ -134,31 +136,32 @@ MapgenV5::~MapgenV5() {
MapgenV5Params::MapgenV5Params() { MapgenV5Params::MapgenV5Params() {
//spflags = MGV5_BLOBS; spflags = MGV5_BLOBS;
spflags = 0;
np_filler_depth = NoiseParams(0, 1, v3f(150, 150, 150), 261, 4, 0.7); np_filler_depth = NoiseParams(0, 1, v3f(150, 150, 150), 261, 4, 0.7);
np_factor = NoiseParams(0, 1, v3f(250, 250, 250), 920381, 3, 0.45); np_factor = NoiseParams(0, 1, v3f(250, 250, 250), 920381, 3, 0.45);
np_height = NoiseParams(0, 10, v3f(250, 250, 250), 84174, 4, 0.5); np_height = NoiseParams(0, 10, v3f(250, 250, 250), 84174, 4, 0.5);
np_cave1 = NoiseParams(0, 7.5, v3f(50, 50, 50), 52534, 4, 0.5); np_cave1 = NoiseParams(0, 6, v3f(50, 50, 50), 52534, 4, 0.5);
np_cave2 = NoiseParams(0, 7.5, v3f(50, 50, 50), 10325, 4, 0.5); np_cave2 = NoiseParams(0, 6, v3f(50, 50, 50), 10325, 4, 0.5);
np_ground = NoiseParams(0, 40, v3f(80, 80, 80), 983240, 4, 0.55); np_ground = NoiseParams(0, 40, v3f(80, 80, 80), 983240, 4, 0.55);
np_crumble = NoiseParams(0, 1, v3f(20, 20, 20), 34413, 3, 1.3); np_crumble = NoiseParams(0, 1, v3f(20, 20, 20), 34413, 3, 1.3);
np_wetness = NoiseParams(0, 1, v3f(40, 40, 40), 32474, 4, 1.1); np_wetness = NoiseParams(0, 1, v3f(40, 40, 40), 32474, 4, 1.1);
} }
// Current caves noise scale default is 6 to compensate for new eased 3d noise amplitude
// Scaling the output of the noise function affects the overdrive of the // Scaling the output of the noise function affects the overdrive of the
// contour function, which affects the shape of the output considerably. // contour function, which affects the shape of the output considerably.
//#define CAVE_NOISE_SCALE 12.0 < original default //#define CAVE_NOISE_SCALE 12.0 < original default
//#define CAVE_NOISE_SCALE 10.0 //#define CAVE_NOISE_SCALE 10.0
//#define CAVE_NOISE_SCALE 7.5 < current default to compensate for new eased 3d noise //#define CAVE_NOISE_SCALE 7.5
//#define CAVE_NOISE_SCALE 5.0 //#define CAVE_NOISE_SCALE 5.0
//#define CAVE_NOISE_SCALE 1.0 //#define CAVE_NOISE_SCALE 1.0
//#define CAVE_NOISE_THRESHOLD (2.5/CAVE_NOISE_SCALE) //#define CAVE_NOISE_THRESHOLD (2.5/CAVE_NOISE_SCALE)
//#define CAVE_NOISE_THRESHOLD (1.5/CAVE_NOISE_SCALE) < original and current default //#define CAVE_NOISE_THRESHOLD (1.5/CAVE_NOISE_SCALE) < original and current code
void MapgenV5Params::readParams(Settings *settings) { void MapgenV5Params::readParams(Settings *settings) {
@ -222,9 +225,9 @@ void MapgenV5::makeChunk(BlockMakeData *data) {
updateHeightmap(node_min, node_max); updateHeightmap(node_min, node_max);
// Generate underground dirt, sand, gravel and lava blobs // Generate underground dirt, sand, gravel and lava blobs
//if (spflags & MGV5_BLOBS) { if (spflags & MGV5_BLOBS) {
generateBlobs(); generateBlobs();
//} }
// Calculate biomes // Calculate biomes
BiomeNoiseInput binput; BiomeNoiseInput binput;
@ -290,10 +293,10 @@ void MapgenV5::calculateNoise() {
noise_ground->perlinMap3D(x, y, z, true); noise_ground->perlinMap3D(x, y, z, true);
noise_ground->transformNoiseMap(); noise_ground->transformNoiseMap();
//if (spflags & MGV5_BLOBS) { if (spflags & MGV5_BLOBS) {
noise_crumble->perlinMap3D(x, y, z, true); noise_crumble->perlinMap3D(x, y, z, true);
noise_wetness->perlinMap3D(x, y, z, false); noise_wetness->perlinMap3D(x, y, z, false);
//} }
noise_heat->perlinMap2D(x, z); noise_heat->perlinMap2D(x, z);
noise_humidity->perlinMap2D(x, z); noise_humidity->perlinMap2D(x, z);

@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "mapgen.h" #include "mapgen.h"
/////////////////// Mapgen V5 flags /////////////////// Mapgen V5 flags
//#define MGV5_BLOBS 0x01 #define MGV5_BLOBS 0x01
extern FlagDesc flagdesc_mapgen_v5[]; extern FlagDesc flagdesc_mapgen_v5[];