Started by René, August 05, 2019, 03:59:42 am

#### René

##### August 05, 2019, 03:59:42 am
I'm pretty sure this has been dealt with before, but is there an (easy) way to limit slope distribution to the top only? In other words, I don't want any stones that stick to the underside of an overhang. Normally this is not such a problem because I always limit the maximum slope to 25 or 30, but now I use 70 and, well,...

#### Dune

##### August 05, 2019, 05:38:55 am #1 Last Edit: August 05, 2019, 05:51:03 am by Dune
When I add snow to branches of tree objects, I use Y, but I don't know if that works in normal displacement.

Maybe there's a way with get normal in texture, then +Y would be green (I don't know about -Y, though) and if so then clamp the -Y out?

#### René

##### August 05, 2019, 06:32:58 am #2
Thanks. I'll give it a try. It comes down to telling the distributor which part of the terrain is facing up and which part is facing down, I guess.

#### Hetzen

##### August 05, 2019, 07:07:49 am #3
If you use Get Normal in Texture, plug that in to a Y to Scaler, then Clamp 0 1, that will give you a greyscale range for surfaces facing up. You can then use an Adjust Colour to pull that range into the angle you're looking for, without getting into maths trying to figure out how to convert that greyscale into degrees of angles.

#### Dune

##### August 05, 2019, 07:51:51 am #4
So my hunch was right    Good to know about the color adjust.

#### Hetzen

##### August 05, 2019, 08:32:06 am #5
Sorry Ulco, yes you are right.

#### Dune

##### August 05, 2019, 08:36:18 am #6
Just tried it, works like a dream. And X to scalar + a rotate vector gives you the sides at choice.

#### j meyer

##### August 05, 2019, 11:57:39 am #7
Good one, thanks Jon and Ulco.

#### bobbystahr

##### August 05, 2019, 12:06:46 pm #8
Well now this was a worthy read, Thanks Jon & Ulco....
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

#### WAS

##### August 05, 2019, 12:30:04 pm #9
Not sure if it works as well as imagined. Take this simple smooth shape for example:

It doesn't seem to understand the terrains overhang, even with texture coordinates.

#### Hetzen

##### August 05, 2019, 03:27:43 pm #10
Couple of things. Is there a Compute Terrain re-calculating your shape? If there is, is the patch size small enough to accommodate the over hang?

Also. The clamp isn't necessary as I forgot the Colour Adjust has the clamp function built in.

If you want to mask faces looking down, then stick a Negate Scaler before the Colour Adjust...

#### WAS

##### August 05, 2019, 05:53:36 pm #11
Quote from: Hetzen on August 05, 2019, 03:27:43 pmCouple of things. Is there a Compute Terrain re-calculating your shape? If there is, is the patch size small enough to accommodate the over hang?

Also. The clamp isn't necessary as I forgot the Colour Adjust has the clamp function built in.

If you want to mask faces looking down, then stick a Negate Scaler before the Colour Adjust...

The patch size is most definitely likely not correct, being default 20 on a 10m shape. At least I'd think. That may be the reason, though I did use a texture coordinates after the lateral.

#### Matt

##### August 05, 2019, 08:56:43 pm #12
Quote from: René on August 05, 2019, 03:59:42 amI'm pretty sure this has been dealt with before, but is there an (easy) way to limit slope distribution to the top only? In other words, I don't want any stones that stick to the underside of an overhang. Normally this is not such a problem because I always limit the maximum slope to 25 or 30, but now I use 70 and, well,...

If you set the max to 90 that should limit it to upward-facing surfaces. What is the problem, exactly? Are you not getting enough coverage on the top?
Just because milk is white doesn't mean that clouds are made of milk.

#### Dune

##### August 06, 2019, 01:49:28 am #13
QuoteIf you want to mask faces looking down, then stick a Negate Scaler before the Colour Adjust...

Or just inverse the color adjust.

#### Hetzen

##### August 06, 2019, 04:33:37 pm #14
Quote from: Dune on August 06, 2019, 01:49:28 am
Quote from: undefinedIf you want to mask faces looking down, then stick a Negate Scaler before the Colour Adjust...

Or just inverse the color adjust.

That would just colour all the non-up facing faces, ie everything except the top. The important bit is the negative values in Y which has been clamped out, so inverting the negative values put them into 0-1 range.