Using TU's Snow Pack

Started by Erwin0265, February 07, 2016, 06:20:51 AM

Previous topic - Next topic


Hi Martin,
OK, I think I get your meaning; sorry if I over-reacted.
I'll get a simpler version of the scene organised and repost when that's done.
I do understand that the help I am seeking is complicated, but perhaps I do not yet understand just how complicated it is...........
OK, who farted?


Hi Martin,
OK, I've made up a simplified version and have also done a considerable amount of experimentation.
The image below shows 14 crop renders of a region with the issue I am having the most difficulty with; what looks like torn geometry due to displacement.


Each of the crop renders has some numbers in the top left-hand corner stating the Displacement offset first and then the Coverage second. eg. 1   |   3 means Displacement offset = 1, Coverage = 3.
Although each render shows the torn geometry (?), it appears that increasing Displacement offset has the most effect (ie. makes it worse).
What I am trying to achieve is the appearance of thicker snow and, although increasing either the Displacement offset or the Coverage results in thicker snow; they also result in worsening torn geometry (?).

So, my question is; how can I be rid of this issue and thicken the snow layer?

Thank you for your patience.
I hope that this question is one with a relatively simple answer, but I doubt it will be somehow..... ::)

OK, who farted?


Hi Erwin,

The near-discontinuity here is caused by the thick snow shader ("Thick Snow 1_1_1") being masked by other shaders, and those other shaders are generating a fairly sharp transition from black to white. At one point the mask is generating black (0), which masks the show displacement down to 0, and the next it is signficantly above 0. The main culprit is the high gamma in the Colour Adjust Shader. It helps when I change the gamma from 2 to 0.5.

As I'm speaking to a mathematician, gamma 2 raises to the power of 0.5, and gamma 0.5 raises to the power of 2. If that seems backwards, it's because I'm following the computer graphics convention for gamma correction of images in which higher numbers produce a brighter image, so we raise to the power of 1/n.

By changing the gamma from 2 to 0.5 I was able to push the snow's displacement offset up to 10 without seeing much of a problem, at least in the final image. With lower displacement, a gamma of 1 might be OK too.

However, I don't think this completely solves the problem. Watching it render the micropolygons, I don't think the surface is being displaced how we'd want it to, and the colouration of the surface doesn't seem to match the displacement properly. Generally I would say that masking one Intersect Underlying shader with another Intersect Underlying shader is going to be unpredictable. Intersect Underlying wasn't designed to be used as a mask, and to be honest I'm not sure what's happening when both the masked shader and the mask-generating shader use that feature. It's also unnecessary (and sometimes erroneous) to have the terrain input into the mask-generating shader.

If you can, try to get something you like without the extra snow shader "Thick Snow_1_1" as a mask. And in general, when masking displacements, use masks with shallow gradients. Perhaps that was your intention with the gamma of 2, but I don't know if that came from Martin's setup.

Unfortunately Intersect Underlying is one of the features I find the most difficult to explain how to use, and I also often struggle to get it to produce good results on demand. The shader is trying to be too clever and gets into trouble more often than I'd like!

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


Yes Matt, I noticed Erwin somehow used an "intersect underlying" layer as a mask as well.
This is a down-side of plug'n'play shaders; having a drivers license is one, driving a race car is something completely else.
Intersect underlying in general and this snow shader especially, is ideally for advanced users.

The problem is that the explanation of intersect underlying is required for understanding this shader.
With the help of your basic preliminary documentation I have developed some intuïtion for this shader, but saying I can explain it myself in layman's terms? No.

I reworked his file last night and it uses 1 surface layer with intersect underlying enabled, but without any masking.
I will upload this project file tonight.


Hi Matt,
The maths I understand; the rest...... well, let's say, I'm confused but I'll have another look, rereading all the time what you have written and see if I can understand further.
As I am using TU's Snow Pack, I'll have to look further into it to see what you mean (I am thinking you're referring to the node chain; Colour Adjust > Power Fractal > Thick Snow_1_1 that is connected to the mask input of the output Thick Snow_1_1_1? Sorry if I am using incorrect terminology; it's all part of the learning curve).

One of the problems with Intersect Underlying is that there is no entry concerning it in the wiki that I can find (The Surface Layer Effects tab is still a WIP) so I have very little to go on wrt understanding how it works or, tbh, what it does (I believe it "reads" information from the layer below and "reacts" accordingly)...
I am forever reading users complaining about the incompleteness of the wiki and I do realise that given the nature of how Terragen works, it can be quite difficult to explain certain concepts/workings of the program.
There is also the constant request for tutorials and, sadly, good artists don't necessarily make good tutorial writers.
Ironically, having been a teacher for 25 odd years, I am pretty good at writing tutorials and I would happily do so, for free; now all I have to do is learn Terragen first.......... ;)

EDIT:- I was just about to post this when you posted, Martin.
QuoteYes Matt, I noticed Erwin somehow used an "intersect underlying" layer as a mask as well.
OK, I am now even more confused, so I do hope you'll explain what I did wrong.
I freely admit to being quite ignorant of the inner workings of your snow shader so I copied how it was connected in your TUSnow2.tgd.
At least I thought I had......(?)
OK, who farted?


A few posts ago I already mentioned that having 2 surface layers with intersect underlying are difficult to use as it's difficult to predict how one affects the other.
Matt basically said the same with some additional remarks.

I admit I will avoid as long as possible to explain the intersect underlying feature. That's up to Planetside.

Take a look at the .tgd I will upload later and see if you like it.
It's thick powdry looking snow and I also got a bit carried away with it (the scene), so I also added some stones which help creating the sense of thick snow.


Hi Erwin,

Here's how it looks now.

About the .tgd attached:
Save it to the gathered project folder.
The note shaders contain explanations on a few things.
You can disable the stones and "rock and strata" groups to get the simplest terrain with snow only.

Your head may explode when reading about intersect underlying and the compute terrain node etc.
This is a must read for literally everyone who's touching this software:,1249.msg12539.html#msg12539

This should keep you going for quite a while I think :)


Hi Martin,
Thank you ever so much for all your time.
You are right; this will take me quite some time to go through.
Funny, it's already been downloaded 9 times before I got to it............. ;D
Hopefully, I'll learn something and not bother you so much............
I did also try what Matt suggested and changed the Gamma of the Colour Adjust shader from 2 to 0.5 and that made a considerable difference.
However, the snow in the area that was crop rendered in previous posts looks a bit blurry; I'm unsure why. So I have also attached another crop render sequence.
Other than showing the improvements gained by dropping the gamma setting, it also shows (in the last crop) that I have reduced the Terrain's Distribution shader's Coverage from 1 to 0.6 so as to obtain greater detail at the peak as well as a bit more terrain irregularity on the lower slopes (this added a bit more 'bumpiness' to the snow also which I liked)..
That being said, I will go through all that you have done and, in a week or so, I may have a few questions (he says with apprehension in his... er, voice).......
OK, who farted?