Planetside Software Forums

General => Terragen Discussion => Topic started by: Pixelpusher on July 24, 2012, 04:36:44 AM

Title: Forest that fades out on all 4 sides of a heightfield
Post by: Pixelpusher on July 24, 2012, 04:36:44 AM
Hi,
I want to create a scene on a rectangular heightfield. There will be a mountain and a river, and a forest will cover most of the heightfield except for the upper parts of the mountain and the lower parts od the river valley. That's not a problem, but I also want that the forest slowly fades out on all four sides of the heightfield. I have no idea how to do this, and help would be greatly appreciated. Thanks a lot.
Title: Re: Forest that fades out on all 4 sides of a heightfield
Post by: cyphyr on July 24, 2012, 04:49:25 AM
In your population node "use density shader" add first a distribution shader and set max and min slope and height, then add as a child of the distribution shader  either:

1/  an image map shader set to "plan Y" with a grey scale image the same size and location as your terrain. In the grey scale image lighter tones will have more trees than darker tones.

or

2/ you could use a distance shader with a camera (distance shaders use cameras to set their local centre) at the centre of the terrain. This will obviously produce a circular distribution.

I would use the first option as it will give you greater control.

Hope this helps

Richard
Title: Re: Forest that fades out on all 4 sides of a heightfield
Post by: Tangled-Universe on July 24, 2012, 05:32:50 AM
Instead of option #1 you can also use a simple shape shader. Give it the same size and position as your heightfield and enable smooth step for the edge. Then either enter a size for the soft border in meters or a percentage relative to the size of the rectangle.
Title: Re: Forest that fades out on all 4 sides of a heightfield
Post by: cyphyr on July 24, 2012, 06:41:52 AM
Quote from: Tangled-Universe on July 24, 2012, 05:32:50 AM
Instead of option #1 you can also use a simple shape shader. Give it the same size and position as your heightfield and enable smooth step for the edge. Then either enter a size for the soft border in meters or a percentage relative to the size of the rectangle.

Sorry I forgot that one, absolutely correct, I still forget about the SSS's wide range of uses even though I use it all the time.
duh  "slaps head!"
Richard
Title: Re: Forest that fades out on all 4 sides of a heightfield
Post by: Pixelpusher on July 24, 2012, 07:25:52 AM
Thanks a lot guys, this was really helpful.  :)