Scale Underwater heights

Hello ! :smiley:

I am kind of new at WM. I am building an island map for an indie video game.
I reach the perfect shape of heightmap. However, close to the beach areas the water is at the same level than terrain. Terrain is just a little bit above and it create complex situations when implementing the map in my game engine.

Does someone know a way to scale the areas located under sea level ? Suppose that the sea level is a 500m and the top of the map at 1200m: do you know a way of scaling the sea level to 700m and keeping the same proportion for the heights above sea, meaning a top of the map at 1400m (=1200+(700-500)) ?

Many thanks for your help !! :stuck_out_tongue:

I’m pretty new to WM myself, so these might not be the best ways but they do work, they’re just not super accurate:

  1. Attach a “Chooser” node to the final height node (first slot) and then place a “constant” in the 2nd slot. Use a “select height” node (connected to the “control”) to choose the desired height with plenty of falloff (you’ll have to play it by eye to get the right values). This way the “select height” is a mask for the “constant” (constant being whatever height you want the sea to be at it’s lowest point).

  2. Simply run your heightfield through a “Curves” node and find (again by eye) the water level on, while making sure that the point corresponding to the water level (about halfway up?) and the final point (bottom left) are in the same place put a gentle downward curve in the line.

Note: with both of these techniques you may need to adjust the overall height beforehand and there may be limitations as to how much you can change it without changing your global height value and warping the land areas. Anyhow, I hope this helps :slight_smile: