Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Worldgen diverges entirely with same preset #123

Open
ghost opened this issue Mar 25, 2023 · 1 comment
Open

Worldgen diverges entirely with same preset #123

ghost opened this issue Mar 25, 2023 · 1 comment

Comments

@ghost
Copy link

ghost commented Mar 25, 2023

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
Copy link
Member

Barteks2x commented Mar 25, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant