OpenCubicChunks / CubicWorldGen

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

Far Lands estimated distances #55

Open muzikbike opened 5 years ago

muzikbike commented 5 years ago

The Far Lands mod for 1.14 (https://github.com/polgaria/FarLands) includes estimated distances of where each noise generator overflows, based on the provided Coordinate Scale and Height Scale:

2019-08-26_00 20 47

It would be handy for CustomCubic to also calculate and display these values in some manner, for each axis and noise generator type where possible.

Barteks2x commented 5 years ago

For reference, these values are much more straightforward to calculate from CWG values.

2^(32 - octaves) * period

if I got my math right

Barteks2x commented 5 years ago

Some more explanation: What is generally called "far lands" is overflow of low and high noise coordinates at the same time. In cubic chunks those 2 can be separated, so if their periods and octaves don't match, you can have some interesting effects (like in this video).

"farther lands" is generally the overflow of "selector noise" coordinates, which with CWG can be set to overflow before low and high noise, leading to some generally unexplored effects (probably nothing spectacular or interesting).

I'm not sure what that mod considers to be fartherer and farthest lands.

There may also theoretically be secondary (and more) farlands of each noise, but it's effects are probably impossible to see, because by the time they happen, their values are far smaller than the normal farlands values (but if they could be seen, it would just be a change in the tunnel pattern). They happen when the next octave overflows, at double the coordinates.

There are a few other kinds of noise, that CWG actually allows to configure:

muzikbike commented 5 years ago

Fartherer Lands is when low/high noise reaches the 64-bit limit and overflows, and the Farthest Lands (which are quite hard to pick out) are likewise for selector noise.

Barteks2x commented 5 years ago

Nothing special happens when you reach that. There are no 64-bit numbers used in those calculations. At least not that I know of. At this point, all the octaves are going to be overflowing. But in order to see the effects you are going to need the frequency so high you would be unable to see the change anyway.

At some point, if you set frequency high enough, and set octaves to 30 (max allowed) you may get all terrain to stop when noise overflows to infinity.

muzikbike commented 5 years ago

I set my coordinate scale to 2939527156989.952 on a vanilla customized world and discovered a very sharp change in terrain generation at roughly the normal Far Lands distance:

2019-08-26_01 59 18

Granted it is somewhat dwarfed by the pre-existing sets of far lands, but it can be easily seen that this is something different. Also, do note that these do indeed generate in complete vanilla 1.12.2, even though setting coordinate scale to this value messes up normal terrain generation enough that it itself dwarfs the Fartherer Lands.

Barteks2x commented 5 years ago

Ok, so that is a difference between vanilla and CC. Vanilla uses long integer math to get around farlands, and you are seeing the result of it breaking. CWG by default uses a different way to get around farlands, and when they are enabled, that code is simply removed. So this effect doesn't exist.

muzikbike commented 5 years ago

Would this effect still exist for certain other noise generators like in #47?

Barteks2x commented 5 years ago

In vanilla - some of them. In CWG - once they are made configurable, no.

BlobTheKat commented 3 years ago

"farther lands" is generally the overflow of "selector noise" coordinates, which with CWG can be set to overflow before low and high noise, leading to some generally unexplored effects (probably nothing spectacular or interesting). @Barteks2x tried it, this is what happens (i couldn't find some pics of the same effect for tall terrain but they had holes the shape of farlands in them) Overflow X: image image Overflow X and Z: image