Reputation: 12133
I'm working on a procedural generation of a continuous world.
Recently I've been advised to use height map combinations to apply some constraints on my landscape.
The next step is connecting two procedurally generated pieces to each other so that the transition would be smooth.
More accurately, it's all about generating the next piece based on the previous.
I'm wondering what is the best way to do that (whether by combining height maps or in other way).
If I would have been using Diamond Square or Mid Displacement or any enclosing points based algorithm to generate the heights,
I would think about assigning the first piece edge values to the second piece edge and use them as "random" values for these points.
In this way the transition would be smooth because all the rest of points in the second piece already take in account the edge points that are taken from the first piece.
Unfortunately (or fortunately) I'm using a Simplex noise algorithm to generate the heights, and as you know is a gradient based algorithm.
So what would you recommend?
Upvotes: -1
Views: 386
Reputation: 2811
You can go similar way than in your previous question.
If you have your world divided by some grid and resulting in world chunks
, I'd make all chunks a bit bigger so they overlap their neighbors. Then you could modulate your heightmap by some rectangular gradient that goes to 0
at the edges. Lastly, when you sum modulated values from all overlapping chunks you should get smooth transition between one height-map and another.
You'd still need to experiment with chunk scale factor and gradient data, to get the best transition and performance. Luckily, many of those operations can be done on GPU by simple rendering.
Upvotes: 1