You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parameters slice_w and julia_x/y/z/w are taking on incorrect
values of 0.0 or 163148516993831175979008.0000 every time a world is (re)entered.
These are the last 5 non-noise parameters stored in MapgenFractalParams (see below for correct values), the first 8 seem okay, is there a limit of 8 non-noise parameters?
All parameters appear correctly in map_meta.txt, it seems there may be an error when reading the parameters from map_meta.txt when (re)entering a world.
The text was updated successfully, but these errors were encountered:
paramat
changed the title
Error when reading float mapgen parameters from map_meta.txt (fractal mapgen bug)
Fractal mapgen: Error when reading float mapgen parameters from map_meta.txt
Oct 8, 2015
See the long running mysterious bug in fractal mapgen #3088 (comment)
Below are my results from printing parameter values during mapgen:
///////////////////////////////////////////////////////////////////////////////
Test in mandelbrot mode.
All parameters are correct in map_meta.txt.
Fractal appears but is incorrect slice:
cx: -1.5469cy: 0.1875cz: 0.1250
cw: 0.0000 is incorrect should be 0.5
ox: 0.0000oy: 0.0000oz: 0.0000ow: 0.0000
nx: -1.5469ny: 0.1875nz: 0.1250nw: 0.0000
nx: 0.7952ny: -0.3926nz: -0.2617nw: 0.0469
nx: -1.1394ny: -0.4614nz: -0.3280nw: 0.2800
nx: -0.6475ny: 1.0551nz: 0.6141nw: -0.3355
nx: -2.7306ny: -1.5910nz: -1.3782nw: 1.7304
Fractal disappears due to huge value of cw (= slice_w):
cx: -1.6250cy: 0.1875cz: -0.0312
cw: 163171575423923312918528.0000 is incorrect should be 0.5
ox: 0.0000oy: 0.0000oz: 0.0000ow: 0.0000
nx: -1.6250ny: 0.1875nz: -0.0312nw: 163171575423923312918528.0000
Parameter slice_w (and therefore cw) is taking on strange
values of 0.0 and 163171575423923312918528.0000.
Test in julia mode, printing all parameters.
All parameters are correct in map_meta.txt.
Fractal appears but is incorrect slice:
iterations: 9 correct
scale_x: 1024.0000 correct
scale_y: 256.0000 correct
scale_z: 1024.0000 correct
offset_x: -1.7500 correct
offset_y: 0.0000 correct
offset_z: 0.0000 correct
slice_w: 0.0000 incorrect should be 0.5
julia_x: 0.0000 incorrect should be 0.33
julia_y: 0.0000 incorrect should be 0.33
julia_z: 0.0000 incorrect should be 0.33
julia_w: 0.0000 incorrect should be 0.33
cx: 0.0000
cy: 0.0000
cz: 0.0000
cw: 0.0000
ox: -0.4531
oy: 0.1875
oz: 0.0469
ow: 0.0000
nx: 0.1680 ny: -0.1699 nz: -0.0425 nw: 0.0176
nx: -0.0028 ny: -0.0586 nz: -0.0202 nw: 0.0204
nx: -0.0042 ny: -0.0005 nz: -0.0023 nw: 0.0023
nx: 0.0000 ny: -0.0000 nz: 0.0000 nw: -0.0000
nx: 0.0000 ny: 0.0000 nz: 0.0000 nw: 0.0000
nx: 0.0000 ny: 0.0000 nz: 0.0000 nw: 0.0000
nx: 0.0000 ny: 0.0000 nz: 0.0000 nw: 0.0000
nx: 0.0000 ny: 0.0000 nz: 0.0000 nw: 0.0000
nx: 0.0000 ny: 0.0000 nz: 0.0000 nw: 0.0000
Fractal disappears due to huge value of cy (= julia_y):
iterations: 9 correct
scale_x: 1024.0000 correct
scale_y: 256.0000 correct
scale_z: 1024.0000 correct
offset_x: -1.7500 correct
offset_y: 0.0000 correct
offset_z: 0.0000 correct
slice_w: 0.0000 incorrect should be 0.5
julia_x: 0.0000 incorrect should be 0.33
julia_y: 163148516993831175979008.0000 incorrect should be 0.33
julia_z: 0.0000 incorrect should be 0.33
julia_w: 0.0000 incorrect should be 0.33
cx: 0.0000
cy: 163148516993831175979008.0000
cz: 0.0000
cw: 0.0000
ox: -1.7500
oy: 0.0000
oz: 0.0000
ow: 0.0000
nx: 3.0625 ny: 163148516993831175979008.0000 nz: 0.0000 nw: -0.0000
Conclusion.
Parameters slice_w and julia_x/y/z/w are taking on incorrect
values of 0.0 or 163148516993831175979008.0000 every time a world is (re)entered.
These are the last 5 non-noise parameters stored in MapgenFractalParams (see below for correct values), the first 8 seem okay, is there a limit of 8 non-noise parameters?
All parameters appear correctly in map_meta.txt, it seems there may be an error when reading the parameters from map_meta.txt when (re)entering a world.
MapgenFractalParams::MapgenFractalParams()
{
spflags = 0;
iterations = 9;
scale_x = 1024.0f;
scale_y = 256.0f;
scale_z = 1024.0f;
offset_x = -1.75f;
offset_y = 0.0f;
offset_z = 0.0f;
slice_w = 0.5f;
julia_x = 0.33f;
julia_y = 0.33f;
julia_z = 0.33f;
julia_w = 0.33f;
np_seabed = NoiseParams(-14, 9, v3f(600, 600, 600), 41900, 5, 0.6, 2.0);
np_cave1 = NoiseParams(0, 12, v3f(128, 128, 128), 52534, 4, 0.5, 2.0);
np_cave2 = NoiseParams(0, 12, v3f(128, 128, 128), 10325, 4, 0.5, 2.0);
}
///////////////////////////////////////////////////////////////////////////////
To read these float parameters i copied the method used in mgv6:
settings->getFloatNoEx("mgv6_freq_desert", freq_desert);
settings->getFloatNoEx("mgv6_freq_beach", freq_beach);
The settings code in fractal mapgen is here:
https://github.com/minetest/minetest/blob/master/src/mapgen_fractal.cpp#L135
https://github.com/minetest/minetest/blob/master/src/mapgen_fractal.h#L36
The text was updated successfully, but these errors were encountered: