Planetside Software Forums

General => Terragen Discussion => Topic started by: Dune on January 06, 2021, 07:48:58 AM

Title: fractal warp does not obey smoothing... bug?
Post by: Dune on January 06, 2021, 07:48:58 AM
Checking the 'obey smoothing' of a fractal warp shader doesn't work as expected when smoothing in a surface layer is used. Perhaps it only applies to the real smoothing filter?
Title: Re: fractal warp does not obey smoothing... bug?
Post by: WAS on January 06, 2021, 11:52:29 PM
Well that's strange, I swear it did before. I use it quite often to rough up shaders.
Title: Re: fractal warp does not obey smoothing... bug?
Post by: Matt on January 07, 2021, 04:19:56 PM
This is a different smoothing effect.

The "smoothing effect" in Surface Layer is similar to the "smooth surface" option in Compute Terrain. It averages the 3 samples that were taken by Compute Terrain, but it's not really very smooth.

Smoothing Filter Shader is different. It asks upstream shaders to smooth themselves using whatever method they can, for example reducing their octaves and changing the shapes of their noise functions. This allows shaders to provide better-looking smoothing effects but only a few shaders do this; Power Fractal is one of them. The "Obey downstream smoothing filters" checkbox tells the Power Fractal to limit and smooth its output according to whatever was requested by the Smoothing Filter Shader.

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

Maybe in future versions the Surface Layer could have Smoothing Filter options built in, but at the moment (Terragen v4.5) it does not.
Title: Re: fractal warp does not obey smoothing... bug?
Post by: WAS on January 07, 2021, 04:38:53 PM
Is it that the surface layer breaks the downstream request? You'd think it'd still effect shaders upstream despite using a totally different function. Imagine if the smoothing function isn't at 1, you would have some noise coming through.
Title: Re: fractal warp does not obey smoothing... bug?
Post by: Matt on January 07, 2021, 04:42:06 PM
Not that I'm aware of. The screenshots aren't showing anything broken because the checkbox is for a different effect not shown.

There is no relationship between Surface Layer's smoothing effect and the checkbox on the Power Fractal. They are for different things. If you expect Surface Layer to have the same effect as a Smoothing Filter Shader, it can't at the moment because it doesn't have enough parameters. It would need scale parameter at least.
Title: Re: fractal warp does not obey smoothing... bug?
Post by: WAS on January 07, 2021, 04:44:18 PM
No. I mean if the smoothing function in the surface layer isn't 1 you have some noise coming through, which would then not be smoothed? Or would it be?
Title: Re: fractal warp does not obey smoothing... bug?
Post by: Matt on January 07, 2021, 08:00:58 PM
Quote from: WAS on January 07, 2021, 04:44:18 PMNo. I mean if the smoothing function in the surface layer isn't 1 you have some noise coming through, which would then not be smoothed? Or would it be?

Yes, the smoothing effect on the Surface Layer is a blend between the immediate input (0) and the "smooth" terrain sampled by the Compute Terrain further up the chain (1). When the smoothing effect is somewhere between 0 and 1 you get some a bit of both.

Staying relevant to the OP question, though, the checkbox on Power Fractal and Fractal Warp is a different effect.
Title: Re: fractal warp does not obey smoothing... bug?
Post by: WAS on January 07, 2021, 09:16:14 PM
... Nevermind, I get what you mean. I misunderstand the relating issues.
Title: Re: fractal warp does not obey smoothing... bug?
Post by: Dune on January 08, 2021, 02:27:19 AM
Thank you, Matt. I figured it would be something like that. I'm experimenting with smooth ridges of snow bulging over crests of rock, in which I encountered this. I'll find another way.
Title: Re: fractal warp does not obey smoothing... bug?
Post by: WAS on January 08, 2021, 02:44:27 AM
Quote from: Dune on January 08, 2021, 02:27:19 AM. I'm experimenting with smooth ridges of snow bulging over crests of rock

Oooh, that should be fun, would love to see some of those.
Title: Re: fractal warp does not obey smoothing... bug?
Post by: Dune on January 08, 2021, 04:41:23 AM
I'll post something soon. It's not easy.