## Angle challenge

Started by Dune, November 01, 2018, 02:56:27 am

#### Dune

##### November 01, 2018, 02:56:27 am
So I needed dunes with eastsides being overgrown by grasses and herbs. Using one of the setups I had in stock yielded this area alright, but also made a distinction between the smaller 'subdunes' on the larger eastside. In reality a whole eastside would have been overgrown, despite the small westsides that appear there. Same on the westside of course; small eastsides being greened.
So I (and perhaps more users) need a way to get the normal of the larger hill for masking. And get normal wouldn't work, because that takes all small normals into account at the place of displacing.

I found 2 more ways to get this eastside (or any side), but both don't work as I want. One is illustrated here; get a vector out of the displacement, multiply the side you need (say X) by a small number (0.01 or so) and you get a workable mask. But despite smoothing the hill before displacing and getting the vector (by offset and displace in the surface layer above), the mask is not smooth.

Another very simple way is to divert a line through a tilt and shear shader, and get a mask out of that, but again, no luck (so far).

I will continue trying, but anyone smart enough to get this sorted?

#### WAS

##### November 01, 2018, 03:37:06 am #1
It almost seems like something a conditional would be used for by somehow defining the maximum height of the dunes, and anything within the east side zone that isn't that maximum be completely masked.

Additionally I'd think somehow breaking up your displacement into large/small dunes would allow you to just utilize the large dunes as a east side mask which wouldn't even have the small dunes, and thus once used for vegetation, covers the small dunes within the large dunes east sides.

#### cyphyr

##### November 01, 2018, 05:02:41 am #2 Last Edit: November 01, 2018, 09:24:39 am by cyphyr
I don't quite see where to put it in your setup but in essence would not an aditional compute terrain set to a high value (default 20, try 200 or 2000) simply ignore smaller features and therefore add the east side tone and grass cover to a much more general "east side" area.
www.richardfraser.co.uk
/|\

Ryzen 9 3900X @3.79Ghz, 64Gb (TG4 benchmark 6:20)
i7 5930K @3.5Ghz, 32Gb (TG4 benchmark 13.44)

#### Dune

##### November 01, 2018, 07:17:27 am #3
I was indeed trying the big softer displaced (and softer fractal warp as well)  dunes as basic mask, but as a sideline. It helps.

#### Hetzen

##### November 01, 2018, 09:34:25 am #4
I think you're going to have to separate out the two displacement scales. Get a side reading off the larger and use that as a mask for the reading of the smaller. If that makes sense.

#### Dune

##### November 01, 2018, 11:15:17 am #5 Last Edit: November 01, 2018, 12:54:39 pm by Dune
Yes, that's what I did, using a softer (increased smallest scale, and decreased displacement roughness) fractal to begin with as a sideline. But it's not working!

#### WAS

##### November 01, 2018, 01:49:55 pm #6
Is the layer also set to slopes? Final Normal won't help like Terrain Normal.

#### Tangled-Universe

##### November 01, 2018, 02:57:03 pm #7
Did you try the smoothing filter shader on your whole network, smoothing away everything below a scale of choice, so you can derive a mask from that?

#### WAS

##### November 01, 2018, 03:11:26 pm #8
Seems the real issue is with the East Faces mask, it's using a the Normal of the scene, which is the final normal (will always have the small scale dunes included). You need a way to create the East Masks based on the large dunes scalar since get normal is final.

Get normal in Texture seems to cover more, but doesn't align correctly with the dunes.

A "Convert Normal from Displacement" would be super handy here.

#### Dune

##### November 02, 2018, 02:02:46 am #9
There's no slope restriction involved, and yes, I also tried the smoothing filter. No luck, strangely.
The dunes are just a separate PF (color) to displace, so I used the smoothed color (and also tried a separate line with 20m smallest scale and 0.5 color roughness) to get a smooth displacement (by normal), then a displacement to vector, multiplied the vector by 0.01/1/1 (and/or rotated 90ยบ by Z) and got my eastside alright.... but not smooth. I just don't understand what I'm doing wrong.
Even tried things like visualize normal, and adding compute terrain, or compute normal, but got nowhere. So I'm not using the eastfaces mask you're referring to, WAS, or any older 'get normal' setup. That wouldn't work here.

I will try what happens if I displace the dunes smoothly to begin with and add smaller ridges after greening the eastsides....

I would say this is an important feature to be had, to get whole mountain sides to be masked for vegetation/snow, etc, and not all smaller hills excluded.

#### Dune

##### November 02, 2018, 11:46:15 am #10
Here's a file I've been experimenting with and some previews of another setup. A smooth (by patch size) get normal would be an awesome feature!

Anyone providing a solution would be my hero

#### WAS

##### November 02, 2018, 02:17:04 pm #11
The thing with the smooth filter is it does actually augment the shapes, even changing alignments somewhat. I've use this often for things like puddles vs boundaries and found alignments to be off by shape.

#### Tangled-Universe

##### November 02, 2018, 05:52:38 pm #12
Quote from: WASasquatch on November 02, 2018, 02:17:04 pm
The thing with the smooth filter is it does actually augment the shapes, even changing alignments somewhat. I've use this often for things like puddles vs boundaries and found alignments to be off by shape.

That makes sense since noise octaves are "additive" so to say. Smoothing away higher octaves would cause misalignments.

#### WAS

##### November 02, 2018, 06:19:42 pm #13
Quote from: Tangled-Universe on November 02, 2018, 05:52:38 pm
Quote from: WASasquatch on November 02, 2018, 02:17:04 pm
The thing with the smooth filter is it does actually augment the shapes, even changing alignments somewhat. I've use this often for things like puddles vs boundaries and found alignments to be off by shape.

That makes sense since noise octaves are "additive" so to say. Smoothing away higher octaves would cause misalignments.

I see, that makes sense. It does work for a loose approximation, so definitely useful for a lot of things.