Surface Layers behaviour on objects (trees)

Started by blackandecker, October 15, 2013, 05:36:47 PM

Previous topic - Next topic

blackandecker

Hey guys, i'm new here.
I've been looking for days for a solution of my problem, used the search function here (before you suggest me that ;) ) but noone of the solution read would work with me.

As many of you, i'm trying to put the snow on trees, in order to create realistic landscapes.
I figured out how to put snow on trees, in an absolute way,  but i'd really like to increase/decrease it depending how high/low is the altitude, exactly like i do with the snow shaders.

As read in this forum, all should i do is placing a surface layer shader between leaf shader and leaf object part (in the parts-shader internal network, between the red "leaf shader" or whatever they call it, and the grey "leaf", to be specific) and play with these "surface layer" settings, BUT...... here it's the problem.
Whatever number i put in the "Altitude Constraints" settings, the behaviour is completely misterious.

Assume i'm using a terrain with "normal" coordinates, where 0 is the sea level. Now i put the snow shader with minimum altitude at 400m and fuzzy zone of 200, and i'd like to do the same with trees.
Well, even if  the mountain is 2000m high, and the tree population is all over the mountain (from 100m to 1800m , i use a surface layer as density shader in order to limit the diffusion of population), i will have either snowy trees or normal trees. If i set "use Y for altitude" the snow will only appear when i set a negative number, and all in the same way, for all the trees. If i set, for example, 400m and fuzzy zone 0m, i should have an imaginary line at 400m where the trees start to be fully snowy. No. No tree would be snowy at all.
Things change when i deselect "use Y for altitude". Now the snow appears ALWAYS, but very soft, like if only few leafs have it on the surface. If i set 5000m as minimum altitude, or -4000m , i will always have a soft and fuzzy snow.

What i'm doing wrong?

Matt

#1
Try creating a Distribution Shader V4. It has a useful option that Surface Layer doesn't have. On the Altitude Constraints tab there is an option called "Altitude key". If you set this to "Final position", as well as enable "Use Y for altitude", it should work.

We plan to add this option to the Surface Layer in future.

Distribution Shader is a simpler shader than Surface Layer. If you find that you need to the extra features of Surface Layer you can use the Distribution Shader as a mask for your Surface Layer.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

blackandecker

Matt, i kinda love you.

Now it works perfectly.

bobbystahr

Y gotta love a thread that resolves this fast...The Distribution shader is one of my most used shaders......
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist