OpenCubicChunks / CubicWorldGen

Customizable CubicChunks world generation
MIT License
55 stars 23 forks source link

Worldgen diverges entirely with same preset #123

Open ghost opened 1 year ago

ghost commented 1 year ago

CC Version: 1.12.2-0.0.1257.0-SNAPSHOT-all CWG Version: 1.12.2-0.0.169.0-SNAPSHOT-all

ISSUE

Using seeds 614340780786027659 and 610972947093644276 (hopefully seeds and not some other random value are relevant), use the preset included in this report. Teleport to Y400 (the cube area), and take notice that the landscape is one of two complete opposites - enclosed pockets of space or open with many tendrils. This persists through the entire world regardless of biome or horizontal coordinates. CubicHoleSeed.txt

EXPECTED

Terrain shape should generate consistently regardless of seed.

CONTEXT

I have good reason to believe this is in some way connected to worldgen previews not displaying correctly, as this is the same preset which can reliably reproduce said error. The actual product couldn't display half the time, as it was one of two; I could be mistaken, but it seems the horizontal pocket produced by selector noise is only acknowledging either low or high noise, while the preview explicitly displays the result with high noise.

Barteks2x commented 1 year ago

After taking a look at this preset there are some observations i made and i believe this is not a bug (will keep it open because it prompts me to add an ability to change preview seed)

"heightVariationFactor": 192.0,
"specialHeightVariationFactorBelowAverageY": 1.25,
"heightVariationOffset": 0.5,
"heightFactor": 2.5,
"heightOffset": 26.8799991607666,
"depthNoiseFactor": 0.0,
"depthNoiseOffset": 0.0,
"depthNoiseFrequencyX": 0.0625,
"depthNoiseFrequencyZ": 0.0625,
"depthNoiseOctaves": 16,
"selectorNoiseFactor": 112.0,
"selectorNoiseOffset": -20.0,
"selectorNoiseFrequencyX": 0.0,
"selectorNoiseFrequencyY": 9.300595847889781E-4,
"selectorNoiseFrequencyZ": 0.0,
"selectorNoiseOctaves": 8,
"lowNoiseFactor": 192.0,
"lowNoiseOffset": 30.0,
"lowNoiseFrequencyX": 0.018306635320186615,
"lowNoiseFrequencyY": 0.0625,
"lowNoiseFrequencyZ": 0.01785714365541935,
"lowNoiseOctaves": 16,
"highNoiseFactor": 1024.0,
"highNoiseOffset": -32.0,
"highNoiseFrequencyX": 0.02500000037252903,
"highNoiseFrequencyY": 0.03125,
"highNoiseFrequencyZ": 0.02500000037252903,
"highNoiseOctaves": 16,

With this preset this is the expected behavior and it can be easily explained.

You set selector X and Z frequency to zero, so in the horizontal direction it doesn't change at all. You also set a high period on the Y axis so it doesn't change much there either. Depending on the seed, it will have either a positive or negative value at your Y position of Y=400, and it won't change with horizontal movement because you set the period to infinity.

Selector noise chooses between low and high noise, depending on whether the end result is negative or greater than 1.

Your low and high noise produce wildly different terrain, so what you are observing is that on some seeds, selector noise happens to choose low noise and you are seeing low noise terrain, and on some seeds it chooses high noise at that y location so you are seeing high noise terrain.

This is completely expected and not a bug. But being able to see different seeds in preview would be useful.

If you decrease selector noise y period you will see bands of those "different seed" terrain. If you decrease its x and z period you will see those bands becoming horizontally stretched out bubbles.

In general, if you ask the generator to do something weird... You will get something weird. That's just how it works. CWG intentionally doesn't impose any restrictions on the input value as it allows to do interesting things. But it also allows to do weird, broke and unexpected things. Trying to ensure that the terrain generates in some "sane" way would require limiting what you can configure which goes against the idea of CWG.