Planetside Software Forums

General => Terragen Discussion => Topic started by: tempaccount on September 07, 2009, 06:20:29 AM

Title: Density based on height
Post by: tempaccount on September 07, 2009, 06:20:29 AM
Anyone have ideas how to implement a color/density mask based on Y-height in the scene?

Preferably you could control the start/end height (where the shader reaches its maximum density) somehow.

This would be really useful to me in a specific scene, but I'm not too sure how to go around building the nodes for it. I have a smooth valley kind of scene, and would like to distribute more rocks on the sides of the scene and less rocks on the floor of the valley (which is lower).
Title: Re: Density based on height
Post by: cyphyr on September 07, 2009, 07:15:24 AM
Hi
A distribution shader or Surface layer with limits set via altitude should do your job.
Remember the fuzzy zone happens within the altitude limits you set, see image :)
Good luck
Richard
Title: Re: Density based on height
Post by: Henry Blewer on September 07, 2009, 08:08:32 AM
I use child surface layers. The main surface might be 'fractured cliffs'. I add a child layer and call it 'talis' and set the altitude and slope how I want.
Title: Re: Density based on height
Post by: tempaccount on September 07, 2009, 08:12:28 AM
Hmm.. sounds simple, that image clears up a lot of questions I had about the fuzzy zone!

I was also thinking that this type of technique could work in clouds as well, but I suppose a distribution shader as the blending shader should work in there as well.

Is it possible to control the blending the distribution shader does (say, with fractal breakup or something), or is it always a smooth transition?

In the pic above, is 0m to minimum altitude and 1000m the maximum altitude of the distribution shader?
Title: Re: Density based on height
Post by: Henry Blewer on September 07, 2009, 08:16:26 AM
Yes it is. The fractal breakup works. Power fractals can be added to the blending shader also. Someone did a cloud using the paint shader for sky writing.
Title: Re: Density based on height
Post by: tempaccount on September 07, 2009, 08:25:28 AM
Oh, excellent!

Thank you for the replies. I'll try this tonight.
Title: Re: Density based on height
Post by: cyphyr on September 07, 2009, 08:27:58 AM
Quote from: tempaccount on September 07, 2009, 08:12:28 AM
Hmm.. sounds simple, that image clears up a lot of questions I had about the fuzzy zone!

I was also thinking that this type of technique could work in clouds as well, but I suppose a distribution shader as the blending shader should work in there as well.
Not personally had much success using this for a cloud blend but others have.

Quote from: tempaccount on September 07, 2009, 08:12:28 AM
Is it possible to control the blending the distribution shader does (say, with fractal breakup or something), or is it always a smooth transition?
Yes absolutely, both the distribution shader and surface layer have a blend shader input. The blend from say 0m to 100m is at a constant rate, unfortunately there's no way to control the "fade" as yet, its linear. But you can add a power fractal

Quote from: tempaccount on September 07, 2009, 08:12:28 AM
In the pic above, is 0m to minimum altitude and 1000m the maximum altitude of the distribution shader?
Yes :) You can of course set it to what you want..

Richard