Planetside Software Forums

General => Terragen Discussion => Topic started by: gpstevens61 on January 19, 2013, 08:48:05 AM

Title: North facing snow
Post by: gpstevens61 on January 19, 2013, 08:48:05 AM
Hi

I'm trying to create a shader that will make the North facing sides of hill have a higher density of snow than the Southern facing sides.  My best idea is to have constant vector which is North and then try and get the vector of the Normal and subtract this from the constant.  My thought is that if I then take the Cosine of the diff when the Normal faces North it will be a small diff with a Cosine of 1 which I can then use in a distribution shader.  But I can't get the functions to behave this way.  Does anyone know how this could be done or do they have a simpler solution.

Many thanks  Greg
Title: Re: North facing snow
Post by: Tangled-Universe on January 19, 2013, 09:10:42 AM
This has been done in the past by BigBen and others, see here:

http://www.planetside.co.uk/forums/index.php?topic=1520.0
Title: Re: North facing snow
Post by: Dune on January 19, 2013, 12:59:45 PM
Interesting, never found that post. Way before my time. I have found a way using the get normal function a while back, and rotating that (X or Z), feeding it into a distribution shader setting slope restraints, which also works.
Title: Re: North facing snow
Post by: gpstevens61 on January 20, 2013, 12:08:18 AM
Thanks for the advice, I've cracked it.