Home Game Development 2nd – Blend completely different biomes utilizing linear interpolation

2nd – Blend completely different biomes utilizing linear interpolation

0
2nd – Blend completely different biomes utilizing linear interpolation

[ad_1]

Globally uniform chunk boundaries

Resolving these chunk edge discrepancies will be executed with out interpolation. I might recommend utilizing a worldwide perform (e.g. 2D Perlin) to outline chunk edge heights, so that each one chunk edges (at the least) align. This is principally like having a collection of empty buckets with every neighbour pair of bucket sides having matching heights:

|             
|        ||   
|   ||   ||        |
|___||___||___||___| and so forth.

Then you possibly can generate every chunk’s internals (___) utilizing a unique perform per biome, if you want, simply so long as the boundary heights are revered (in order that they hyperlink up seamlessly). Or you need to use the identical perform e.g. Perlin for all internals, however alter them via scaling or clipping.

Generating alongside a clean slope

However, you continue to have the issue of discovering a perform that agrees with these preset edges. Here’s one answer.

Let say you begin with a straight slope (gray) between two edges (purple). You can perturb these floor cells (gray to black).

enter image description here

You can do repeated random perturbations like this, then apply one thing the algorithm right here to in the end get a easily undulating floor between factors.

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here