Turning a mask of 0m into water

I have a Select Height node that is selecting all land that’s at 0m. I want to turn this 0m-land mask into water as “existing water” with Create Water. Is there a way to do this?

That is not really possible, as the water also needs some thickness.

BUT

You can create a 1 m layer of water for that area. And even better, you need neither the Select Height or Create Water device, but instead just need the Coast Erosion device, with the following settings:
image

By setting the Beach Size and Inland Height Influence to 0 m, and the Underwater Smoothing to 0, the device will just create a layer of water of 1 thick, and nothing more.

It would look something like this:

And this is what the 0 m selection looks like:

As you can see, it is a bit more liberal than the output of the Select Height device, but you could always decrease the Sea level, e.g. to 0.1 m, which would look like this:

For a more in-depth explanation of the Coast Erosion device, see this video.

2 Likes

@HYLK’s post is almost certainly going to give you much better results than using a Select Height will, but if, for some reason, you absolutely must use the Select Height, it is definitely possible, just significantly more involved. Assuming you want a lake at a standstill, and not flowing water, you’ll need to add 2 Constant devices, both set to 50% of the maximum height (by default, the max height is 2.625km, so you’d want that set to 1.3125km).
constant

Pipe both of those into a Pack to Composite Type device where the Type is set to Core.Vectorfield.

pack1

Then add a second Pack to Composite Type where the type is set to Core.3025.Water
pack2

Pipe the terrain into the watersurface (Heightfield) input, the Select Height mask into the depth (Heightfield) input, and the vectorfield composite device into the flowdir (Vectorfield) input.

Optional step: To control the look of the water a bit more, you can throw a Levels device between the Select Height and Composite Type devices, and adjust the high range of the output levels until the water looks appropriate for your uses.

They won’t be pretty results, and unlike @HYLK’s method, it will separate the water from the terrain, so you’ll need an output device at the end to view it with the terrain, but if you absolutely need to define a body of water with a Select Height device, this would be how you did it.

EDIT: I’m going to leave the original mistake there, cause I think it’s funny what my brain does when I’m not fully awake/caffeinated yet, but just as a side note, there’s really no reason to make 2 Constant devices. You can just make one and pipe it into both inputs.

2 Likes

Adding this thought into a second reply just to go over some other details:
If this is a case where you’ve cut lakes into an existing terrain by bottoming the area out at 0m, and are trying to add water into only those locations, the process will be slightly different. You’ll want to have a Constant device combined into your terrain at the level you want the water to be at, and that terrain to act as the watersurface (Heightfield) input, otherwise your water will only exist at the very bottom of the carved out lake. Here’s a quick and dirty project illustrating that workflow.
manualLakes.tmd (67.0 KB)

That being said, if this is indeed your workflow, the Coastal Erosion device will absolutely work much better. The only case I would use this in is something like a high altitude lake.