Slope selecting

Started by pclavett, July 05, 2016, 08:31:29 AM

Previous topic - Next topic

pclavett

Hi all !
Slowly getting back into Terragen and have some question regarding slope selection.
When I try to select mountain slopes there are always parts of the the slopes that do not fit the criteria that are set because of a small localized flatter or steeper and therefore the selections are full of little "holes" that make any colour or displacement somewhat full of little spikes or little holes.
Is there a way to have the selection "expand" to a specified degree to encompass these smaller areas and make them follow the surrounding areas and therefore avoid these little spikes or holes.
I guess one way would be to establish a parameter of slope, assign it some colour, then create an overlapping painted shader covering the little area that are not encompassed and using that painted shader for the application of the displacement or colour.....but this is rather tedious. I figure that there must be a "mathematical" or "node" way of doing this and that some of you may be able to help.
This may be a stupid question and please bear with me !
Thanks for any response !
Paul

pclavett

As an example, here are 2 images with the first one having a slope minimum of 30 with fuzzy at 5 and the second one having a painted shader filling the small gaps in the lower part of the mountain (did not do the upper as this is just for example).
I hope that this will illustrate the request for info to see if there is a node way other than the painted shader to accomplish this effect.
The small defect in the selection do not produce to much problem with colour function but with displacement, the effects can be annoying with unwanted spikes or holes.
Thanks !
Paul

Dune

I see what you mean and can only agree to the fact that it is sometimes too fine. If you have an area of grass with max slope, e.g. and want some small displacements for roughness, the sides of those humps won't get the grass color.
Perhaps if you would derive the slope map before the smaller displacements are there, you get a smoother mask, then do more fine displacement and use the mask after it. But I'd also have to experiment to make that work.

Matt

#3
In the slope constraints tab you can choose "Terrain normal" instead of "Final normal". "Terrain normal" uses the normal calculated by the Compute Terrain (or Compute Normal) node, and that node has a patch size which you can adjust as well.

However, when doing displacement, it always used "Terrain normal" regardless of this setting. If you have spikes, perhaps increasing the patch size will help.

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

fuzzyEuclid

This has vexed me terribly, if I understand the issue.

As far as I have tried, and mind you I am by no means an expert  :P , there's no way to take a computed distribution and apply it as a mask to a displacement "further down the node chain". The distribution shader reacts to said displacement and the effort is lost.

So far the only way I have been able to get past this is with a painted shader, which works well as long as I don't have to apply the desired surface across a large and diverse area.

It would be nice, but who knows if it's possible with the way things are calculated under the hood, to be able to specify in the Distribution Shader that is should "freeze" itself against anything further down the node chain. Or maybe a One Way Distribution Shader that takes it's input exclusively from the upstream nodes.

The Terrain Normal vs Final Normal never clicked with me, but after Matt's comments - well, I need to play with that before I put my foot in my mouth (breaking habits is hard).

Dune

Of course, thanks Matt.
I have to think about what you wrote, fuzzy. I recall having done some masks like that (derived from earlier states), but have to check how well they worked.

fuzzyEuclid

Thanks Dune. I find this a rare occasion where I hope I'm wrong :)  My small attempts continue to fail, but they are all rather direct and of course my limited knowledge of TG is not helping me here!

Dune

It doesn't, afaicv. But it would be a very handy feature if the illustrated setup would work, but it doesn't. If you can compute the basis for a mask and use it later in line, it would increase possibilities.
The 'this works' setup, won't of course need the connection between the compute and the mask, it also works without, logically, as the compute works through into the surface layer with the purple test color.

pclavett

Wondered from a reply earlier if there is a way to derive a picture map that you can tweak in Photoshop (or other) and come back with the revised map and use it as a mask ???
Now this is possibly a very newbie question but have not found a note that derives a bitmap file to export....again possibly a very stupid question !!!
Thanks !
Paul

Dune

Should be possible if you render out a topview from a grey ground, including the masking, but you won't cover any crevices and overhangs. And it's more work.