Hello,
I’m working on (trying to learn how to make) a procedural mesh generation project with multiple height maps.
For now I have :
- a simple perlin noise map
- a river map which I build with a simple square function (i’d like to update this to a gaussian function in the upcoming days)
Those 2 maps are combined to create a single height map which my MeshGeneration algorithm creates my mesh with.
Here is the result :
Here is the combination code :
float[,] newMap = new float[width, height];
for (int y = 0; y < height; y++)
{
for (int x = 0; x < width; x++)
{
float currentHeight = 0f;
currentHeight += noiseMap.GetMap()[x, y] * noiseMapOpacity;
currentHeight += riverMap.GetMap()[x, y] * riverMapOpacity;
newMap[x, y] = currentHeight;
}
}
I now have multiple issues i’d like to deal with :
- The river edges are sharp and I don’t know how to smooth them
- I can’t place a water plane at a certain height because 1. the edges are not horizontal enough and 2. there are vertices on the land (around the river) where the height is lower than the river edges
In other words, I think I want the edges of the river to have the lowest height of the land part but I dont have any clue on how to achieve that as long as keeping the whole mesh “smooth”.
Thank you for reading me, I hope this was understandable enough…