Jump to content

Improving landforms


Erik

Recommended Posts

This is a rather technical suggestion, so I don't expect anybody to understand it.

I really like the landforms system. It allows anyone to easily modify or completely overhaul the terrain generation, which works really well.

That being said, there is one problem with the system: Landform transitions.

They can be slightly "buggy" at times with some very noticeable chunk borders. If I understand the system correctly, landforms are assigned per chunk-column different landforms have a two chunk wide gap between them where the landforms transition by bringing the amplitudes of the octaves closer. However each chunk only has one such transition, which will still very often lead to somewhat visible chunk borders.

Transitions between landforms are always very rapid and never gradual, which leads to a lot of plateaus on the map. I have nothing against plateaus, but they are too frequent, I would more often prefer gradual (and per landform configurable) height increases.

To make the landform changes more gradual, they need to happen gradually over one chunk, each block having its own amplitudes. This will cost extra performance, but I don't know how big that would be. Obviously, because of the way how landforms are distributed, the transitions would still happen over transition chunks, maybe making the "landform size" not locked to a whole chunk but a 16x16 quarterchunk could be helpful (but that would probably require other major changes). 

To make landform transition configurable per landform, I would suggest adding a new "transitions"-member to landform "variants"-objects, which gets an array with "transition"-objects. The "transition"-objects contain a "width"-value, determining the width of the transition of the landform in chunks, and a "weight"-value, representing the share of the transition used in this landform, which becomes relevant when multiple transitions are assigned to a landform, a landform allowing form multiple different transition on multiple different sides. There could also be another value for "transition"-objects, determining the ascend of the transition amplitude (linear/positiv-exponential/negative-exponential).

On another note, adding a "type"-value would be useful for macro-generation, as it would allow to specify landforms as ocean, mountains, plains, hills, etc. This could be used to create realistic continents and, in combination with wind simulation, to create realistic climates and on the map. 

Link to comment
Share on other sites

It's not really per chunk. But I also really wonder where the chunk gen issues come from. A weight value might be possible though.

Very simply said: Worldgen creates a bitmap of particular size, where each color represents a particular landform and then applies a blur on it. 

Perhaps that certain color could be weighted stronger to be more present in the resulting blurred landform map. The code is available on github if you wanna fiddle with it. It's one pretty complex though. Not because its badly written, but because interpolating discrete values that affects 3d noise, which is also affected by interpolated temperature  resulting in interpolated 3d block data is a minor nightmare to grasp :D

In fact I see the data structure LerpedWeightedIndex2DMap as a minor victory of mine. It took a few iterations until I finally came to the conclusion that this data structure will enable me to reduce the complexity down to a manageable level.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.