Silky smooth snow layer, over rough terrain

Started by nixx, March 30, 2011, 09:08:24 AM

Previous topic - Next topic

nixx

Hi all,

Yes, I know... snow again ::)

I 'm experimenting & practicing with snowy surfaces, and I 've bumped into a slight problem. I can't find a way to create a thick, smooth layer of snow over a rough, irregular terrain. Using the "Surface layer" approach gives convincing snow results, but the snow layer, no matter how thick, always inherits at least some of the underlying terrain's roughness - even with the smoothing effect on.

Think extremely rough, even spiky terrain, after a heavy snowfall. The roughness would be completely covered and the area would appear silky smooth.

Any pointers or advice appreciated. Thanks people :)

nick
I 'm child, and man, then child again; the boy never gets older

Henry Blewer

Open the Effects tab of the Surface layer. Check the Intersect Underlaying box, and change the type to Displacement intersection. You can use the measure tool on the preview window to see what values may work best. Just measure between two high points in the surface bumpiness.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

Tangled-Universe

Quote from: nixx on March 30, 2011, 09:08:24 AM

I 'm experimenting & practicing with snowy surfaces, and I 've bumped into a slight problem. I can't find a way to create a thick, smooth layer of snow over a rough, irregular terrain. Using the "Surface layer" approach gives convincing snow results, but the snow layer, no matter how thick, always inherits at least some of the underlying terrain's roughness - even with the smoothing effect on.

Think extremely rough, even spiky terrain, after a heavy snowfall. The roughness would be completely covered and the area would appear silky smooth.


The "smoothing"  function uses the smoothed computed terrain from the compute terrain prior to the surface layer.
So if you have more than one compute terrains, it uses the last one (lowest) in the network.
Also, even if you have "smoothed normals" unchecked in the compute terrain, the "smoothing" function in the surface layer uses the smoothed terrain as input.
As far as I can tell you're aware of these ideas, so that's good.

The reason why your snow isn't covering the terrain can have two main reasons:

1) the patch size of your last compute terrain is too small. Imagine smoothing out 1m spiky features will still look spiky compared to 10m features smoothed. Simply put.

2) you don't use the right parameters for the displacement intersection mode. Unfortunately I don't fully understand what the 3 parameters of the intersect underlying feature do. We, alpha-testers, have asked Matt several times so far, but no answer yet.

Normally small values for intersection zone work fine.
The shift values represent the thickness of the layer.
So depending on the scale of the scene and the scale of the spikes you're trying to cover, you'll need to adjust the shift parameters accordingly. I believe the parameter is in metres.

It takes quite some trial and error without knowing exactly what these parameters do.

Cheers,
Martin

nixx

Thank you guys, I appreciate the quick replies :)

Martin, thanks for the detailed explanation. So if I got this right, a "snow" Surface Layer with "Intersect Underlying > Displacement Intersection" essentially takes the form of the smoothed version of the underlying terrain (so naturally, it intersects with the non-smoothed version). I know there's probably more to it, but I 'm trying to get the basic idea.

That's already helped me a lot, I clarified a few things about this node in my head.

However, my original problem still exists; no matter what patch size I set my "Compute Terrain" to (as you suggested), my snow is never 100% smooth (I 'm talking about the areas where it completely covers the terrain). It does cover the terrain the way I want it to, it's just that its surface, like before, still inherits the underlying displacement.

I hope I 'm explaining it well enough. If needed I 'll make a simple tgd to illustrate what I mean.

Thanks again for your time and input, everyone :)

nick
I 'm child, and man, then child again; the boy never gets older

Tangled-Universe

Quote from: nixx on March 30, 2011, 11:11:03 AM
Thank you guys, I appreciate the quick replies :)

Martin, thanks for the detailed explanation. So if I got this right, a "snow" Surface Layer with "Intersect Underlying > Displacement Intersection" essentially takes the form of the smoothed version of the underlying terrain (so naturally, it intersects with the non-smoothed version). I know there's probably more to it, but I 'm trying to get the basic idea.

That's already helped me a lot, I clarified a few things about this node in my head.

It uses the smoothed version if smoothing is enabled.
I think displacement intersection takes the average/median for a certain patch (smoothed by preference, as the function mentions when you enable it) with maximum size = patch size of previous compute terrain.
The intersection zone gives more control over this and the shift values determine how much "volume/thickness" needs to be added/reduced.

Like I said, this could all be non-sense, but to a certain extend this idea works for me.

Quote
However, my original problem still exists; no matter what patch size I set my "Compute Terrain" to (as you suggested), my snow is never 100% smooth (I 'm talking about the areas where it completely covers the terrain). It does cover the terrain the way I want it to, it's just that its surface, like before, still inherits the underlying displacement.

I hope I 'm explaining it well enough. If needed I 'll make a simple tgd to illustrate what I mean.

Thanks again for your time and input, everyone :)

nick

If the patch size doesn't help then it is the settings of the intersect underlying feature.
It should work in most cases, unless you have extreme displacements going on.

Perhaps you should show us what you've got so far?


nixx

#5
Thanks again Martin.

I don't have anything specific so far, I 'm just practicing snow techniques, in order to use them on an actual project later.

I think what I 'm trying to achieve is best described with a few mockups, rather than a TG2 project :


Gray represents the underlying terrain, white the snow layer. The snow depth is of course exaggerated :)

Using a snow Surface Layer, I can (easily) get something like this :
[attach=1]

...or (with smoothing, etc) maybe like this :
[attach=2]

But what I 'm after is to get as close as possible to this :
[attach=3]

No matter what I do, I can't get there, the snow layer always follows the terrain's displacement by at least some (visible) amount.

I hope I 'm not tiring you too much :)

nick
I 'm child, and man, then child again; the boy never gets older

Oshyan

I still think it would be helpful to see an example image of where you're at already. In your illustrations I presume the last one shows a *part* of your scene where you want snow to be filling everything in, but in other areas you do want the terrain to show through. Otherwise you'd obviously just not bother with the underlying severe displacement in the first place. ;)

In extreme cases I think you could use a Merge Shader with 2 separate terrain networks, one that's smooth and prior to really rough displacement and the other terrain you have now.

- Oshyan

nixx

Hi Oshyan,

Quote from: Oshyan on March 30, 2011, 01:49:05 PM
I still think it would be helpful to see an example image of where you're at already. In your illustrations I presume the last one shows a *part* of your scene where you want snow to be filling everything in, but in other areas you do want the terrain to show through. Otherwise you'd obviously just not bother with the underlying severe displacement in the first place. ;)

;D Yes, of course ! After reading your reply, I couldn't help thinking of a long animation of an endless flat white plane - the comment would read "there is a really cool terrain under all that snow, I swear !" :P

QuoteIn extreme cases I think you could use a Merge Shader with 2 separate terrain networks, one that's smooth and prior to really rough displacement and the other terrain you have now.

I 'm currently rendering a preview (of a different project), so I can't make a sample snow scene to show what I 'm getting. But I will, as soon as the render is finished, and will post back. I 'll also look into your Merge Shader suggestion.

Thanks again for all your help everyone - I 'll get back to this thread with examples soon.

nick
I 'm child, and man, then child again; the boy never gets older

Dune

Perhaps you also could take the snowy terrain as the smooth basic, then add rough ground in patches (lowest or highest areas, or blended by another shader or even painted shader).

Matt

The smoothing effect isn't able to completely smooth the terrain unfortunately - it is an approximation. To create a completely smooth surface you may need to create a separate terrain that is as smooth as you want (e.g. with a heightfield with fractal detail turned off) and use the Merge Shader to merge it with your rougher terrain.
Just because milk is white doesn't mean that clouds are made of milk.

nixx

Quote from: Matt on March 31, 2011, 06:52:42 AM
The smoothing effect isn't able to completely smooth the terrain unfortunately - it is an approximation. To create a completely smooth surface you may need to create a separate terrain that is as smooth as you want (e.g. with a heightfield with fractal detail turned off) and use the Merge Shader to merge it with your rougher terrain.

Thanks for your input, Matt. I think that settles it then ! :)

It's good to know what the various tools are designed to do, so that one doesn't keep trying the wrong way.
So for an ultra-smooth snow layer, covering all the roughness, the best and most straightforward way to go is probably the Merge Shader. Cool !

Thank you again everyone for taking the time to deal with this, and for all your suggestions and advice :) Now back to practicing...

nick
I 'm child, and man, then child again; the boy never gets older