Forest that fades out on all 4 sides of a heightfield

Started by Pixelpusher, July 24, 2012, 04:36:44 AM

Previous topic - Next topic

Pixelpusher

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.

cyphyr

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
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

Tangled-Universe

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.

cyphyr

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
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

Pixelpusher