Smoothing Function suggestion

Started by WAS, January 21, 2020, 02:25:51 PM

Previous topic - Next topic

WAS

Would it be possible to rename this like the "Downstream Roughness Modulator" function (or something), and have it effect roughness and smoothness?

Maybe one direction is ramping down the roughness of shaders, and the other ramping up the roughness of shaders?

There's been a lot of instances lately where I've needed to not only smooth roughness of shaders, but also increase roughness.

Tangled-Universe

#1
That's not how it works with regards to increasing roughness.

Smoothing is based on the smoothed version of your terain provided by the compute node first upstream.
Whatever roughness present at that moment gets smoothed and then 2 factors determine how smooth your surface layer smoothing will be:
1) surface layer smoothness setting (which I think is a blend from unsmoothed = 0 to fully smoothed = 1 as per explanation above)
2) compute patch size

Because of this increasing roughness is not possible, because the function is only capable of removing roughness by some (weighted) average calculation or whatever, it's a reducing/removing type of calculation, that's for sure.

If you need to increase roughness then you need to get that before computing first time or adding it in after computing and compute again.
Be aware though that each compute node parses the network 3x and thus 2 compute nodes will parse the network 9x and 3 will do 27x, so use with care.

If you persist to try it in a different way -against the grain so to say- then you can consider side-chaining your terrain displacement, convert to scalar, feed that through a smoothing filter shader to select lower octaves and subtract that from the original displacement shader to scalar, which should result in high frequencies only. Then feeding that into a displacement shader should give you control over those amplituedes again.
Faster, easier and less computational is to get it right from the beginning, so some thought and planning in advance is required, but if you know how the smoothing works then it's actually relatively easy.

WAS

Wrong smoothness ...


Talking about the Smoothing Shader which works off if a shader has downstreams checked, if it doesn't it won't effect it.

 
No compute terrain is needed for this shader... It's clear it's also augmenting the noise roughness and displacement roughness. You can apply the shader to a PF outside any chain, even before a compute shader.

http://planetside.co.uk/wiki/index.php?title=Smoothing_Filter_Shader

Tangled-Universe

Ohhh you were talking about the "Smoothing Filter Shader"
That was not clear from the topic title and consequently also not from your starting post.

Yes I know this does not need a compute terrain shader, it's doing something completely different than the "smoothing function" you mentioned throughout.

WAS

Sorry you were confused. Regardless, it is a function. Lol "smoothing tab" is what we usually call surface layers smoothing. Id also mention surface layers.

That was long winded for "oops".