Restricting water to a single lake. (and population masking)

Started by bigben, January 29, 2007, 07:52:28 pm

Previous topic - Next topic

bigben

I have a terrain, with an image mask showing the position of all water bodies. What I want to do is displace the terrain downwards in all the lake beds (easy enough) and then fill each lake with water. The problem arises when there are areas outside of the lake bed that are also lower than the water level AND fall within the circle of the defined "lake" object. Ideally it would be good if we could restrict the lake object to only fill a single body of water originating from the lake objects position.. (although it's probably quite tricky)

Using this method it would be possible to fill man-made lakes by literally creating dam walls given that DEM data gives you the lake's surface

§ardine

you should be able to add multiple lakes and move them around to each of your locations if I'm not mistaken.

bigben

Adding multiple lakes is fine. The problem is that I want to restrict the water each lake to just its own lakebed and not any adjacent terrain lower than the lakebed. To give a quick example... here is a lake carved out on one side of a ridge. A short distonce beyond the lake, the altitude begins to drop again.
[attach=#2]

For the sake of illustrating what I don't want I've deliberately extended the size of the lake object so that the water also covers the low lying areas in the far right.
[attach=#1]

Where this really becomes a problem is where you have a man made lake with a long dam wall (most of the bigger lakes in my terrain).  It could also be a problem with hanging lakes close to a steep drop.

The only distribution controls currently available are a horizontal circular boundary and a vertical water level. If this could also be restricted by a shader we could use masks to restrict the distribution to a single lake bed.

Oshyan

You can already use a mask to restrict water coverage. I've done this for an in-progress realistic modeling of the St. Helens and surrounding area, including Spirit Lake. I am using a Default Shader to provide color and opacity and feeding that into my Water Shader on the lake object. Just feed your mask Image Map shader (use an Image Map shader for greater control) into the Opacity input of the Default Shader and viola, masking is available.

- Oshyan

bigben

Thanks Oshyan.

I'm rendering a test for combining .ter's. I'll try this out.

§ardine

I see what you're referring to bigben, esp. with reservoirs that would have a concave dam from which your circular lake object would protrude... This occurred to me after I posted last night, so I tried messing around with masking a little and decided it wouldn't work...  ;D

glad to find out there is a way  :D

bigben

January 30, 2007, 06:10:20 pm #6 Last Edit: January 30, 2007, 11:04:57 pm by bigben
Well, that worked. If anyone's going to combine these two methods, just one more thing to note.... don't use the same image mask for displacing the terrain to make the lakebeds and restricting the distribution of water. This will result in a narrow gap around the edge of the water.

Now I just have to break up my lake bed mask into individual lakes. Placing them is going to be a pain but the end result will be worth it.

Masked
[attach=#1]

Unmasked
[attach=#2]

Masked, but pesky trees on the water.
[attach=#3]
The distribution of trees is controlled via an image mask, and to be sure I also subtracted the water distribution mask from the tree mask. :(  I've noticed even without masking that objects will appear outside of the bounding rectangle.

cyphyr

As regards the pesky trees try limiting their population with a density shader and using the altitude constraints to stop the trees going over the water. Eg if your water level is at 100 you set your minimum altitude to 100 of maybe 102 with a Fuzzy zone of 0-2. You can of course set your maximum altitude to what ever you like.
Hope this helps
Richard
www.richardfraser.co.uk
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 3900X @3.79Ghz, 64Gb (TG4 benchmark 6:20)
i7 5930K @3.5Ghz, 32Gb (TG4 benchmark 13.44)

rcallicotte

So this is Disney World.  Can we live here?

bigben

Quote from: cyphyr on February 02, 2007, 10:56:55 am
As regards the pesky trees try limiting their population with a density shader and using the altitude constraints to stop the trees going over the water.


This is OK where the water is the lowest feature, but the problem here is that the terrain adjacent to the lake is lower than the water level and also requires trees. I have my suspicions as to the cause of this masking problem and will investigate this later.

bigben

Fixed the final issue of trees on the water ;D. Add an intermediate surface layer between the image map and the opacity function input.

http://forums.planetside.co.uk/index.php?topic=864.0

I'm hoping it's just because I did a low quality test render, but you'll also see some water artefacts from some of the other lakes in this TGD that are at a higher altitude. I've used a combination of lake size and a single image mask containing all 5 lakes to restrict the water to each lake. If this glitch persists I'll break up the mask into separate images for each lake and try again.