Snow on trees AND relative to altitude

Started by N-drju, December 19, 2018, 06:37:59 AM

Previous topic - Next topic

N-drju

Guys, I need your help!

I use a traditional, very simple setup for snow on trees, like the one below:

[attach=1]

However, I would like to have a population gradually becoming white, the higher the altitude.

In other words - below 500 meters = green. Above 500 meters = snowy.

I tried to make it through the surface shader that is already present and which gives the white coloring, but to no avail! Tried different options but with no success.

It's a Christmas render. The matter is urgent! :)
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

Dune

You need to set 'use Y', and final position. And transform shader at world postion. Or use a distribution shader, though I think that's the same thing.

N-drju

Yes, I worked it out just a few minutes before you wrote. :)

The only thing that I don't like is this "Y"... That means calculating the global height of the entire planet rather than an actual true altitude of terrain features. It is not really visible when you don't have too much of an open landscape. Quite visible though if you have a high-altitude shot... But then again, it doesn't seem this can be done any other way...
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

bobbystahr

Quote from: N-drju on December 19, 2018, 03:04:22 PM
Yes, I worked it out just a few minutes before you wrote. :)

The only thing that I don't like is this "Y"... That means calculating the global height of the entire planet rather than an actual true altitude of terrain features. It is not really visible when you don't have too much of an open landscape. Quite visible though if you have a high-altitude shot... But then again, it doesn't seem this can be done any other way...


If you select  "Position in terrain/texture" you will get better results than "Final position" in the Altitude key of the Distribution shader I think with Use Y.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Dune

It doesn't sometimes work with objects or pops without the final and Y, at least for slope. I actually don't know about altitudes.

N-drju

Yes, it doesn't work with "position in texture". That's why I asked for help in the first place. :)
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

bobbystahr

Quote from: N-drju on December 21, 2018, 03:32:23 AM
Yes, it doesn't work with "position in texture". That's why I asked for help in the first place. :)

O K, but will follow this to see if it gets resolved for my own benefit as well.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist