Planetside Software Forums

Support => Terragen Support => Topic started by: bigben on January 29, 2007, 07:52:28 PM

Title: Restricting water to a single lake. (and population masking)
Post by: bigben on January 29, 2007, 07:52:28 PM
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
Title: Re: Restricting water to a single lake.
Post by: §ardine on January 29, 2007, 09:28:14 PM
you should be able to add multiple lakes and move them around to each of your locations if I'm not mistaken.
Title: Re: Restricting water to a single lake.
Post by: bigben on January 29, 2007, 10:18:32 PM
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.
Title: Re: Restricting water to a single lake.
Post by: Oshyan on January 29, 2007, 10:33:03 PM
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
Title: Re: Restricting water to a single lake.
Post by: bigben on January 30, 2007, 12:02:47 AM
Thanks Oshyan.

I'm rendering a test for combining .ter's. I'll try this out.
Title: Re: Restricting water to a single lake.
Post by: §ardine on January 30, 2007, 06:07:56 PM
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
Title: Re: Restricting water to a single lake.
Post by: bigben on January 30, 2007, 06:10:20 PM
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.
Title: Re: Restricting water to a single lake. (and population masking)
Post by: 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. 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
Title: Re: Restricting water to a single lake. (and population masking)
Post by: rcallicotte on February 03, 2007, 07:25:37 AM
Nice render.  Looks clean.
Title: Re: Restricting water to a single lake. (and population masking)
Post by: bigben on February 11, 2007, 10:51:01 PM
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.
Title: Re: Restricting water to a single lake. (and population masking)
Post by: bigben on February 20, 2007, 06:44:26 PM
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 (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.