Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"radius: value too small" error invalidates UniformBlur handler #11

Open
sctanf opened this issue Apr 4, 2021 · 4 comments
Open

"radius: value too small" error invalidates UniformBlur handler #11

sctanf opened this issue Apr 4, 2021 · 4 comments

Comments

@sctanf
Copy link

sctanf commented Apr 4, 2021

I use a UniformBlur handler with a variable, so I want to be able to disable blur by setting the radius to 0. Instead of continuing with blur disabled, the handler stops working and I get no output.

In addition, UniformBlur was changed in version 2.0.0, what would be the equivalent values compared to the old UniformBlur?

@LI7XI
Copy link

LI7XI commented Apr 5, 2021

Hello @sctanf

Afaik setting Radius parameter to 1 will disable blur.
About changes, in v2.0 RadiusAdaptation parameter was removed.

@sctanf
Copy link
Author

sctanf commented Apr 5, 2021

Thanks @LI7XI

@d-uzlov
Copy link
Owner

d-uzlov commented Apr 5, 2021

In addition, UniformBlur was changed in version 2.0.0, what would be the equivalent values compared to the old UniformBlur?

Well, previously UniformBlur had a 0.25 coefficient applied to the specified radius. I don't really remember why, but I considered it a bug and removed it. So, if you had radius specified as 8, then now an equivalent radius should be 2. Unless I messed something up.

Afaik setting Radius parameter to 1 will disable blur.

It doesn't. Radius in the UniformBlur is not an integer value. Radius 1 and radius 1.1 will actually give you slightly different results because UniformBlur doesn't just average neighbour values.

Actually, right now UniformBlur actively prevents user from disabling blur completely. If some value would disable blur (like, 0.1 for sure would be equivalent to not having blur at all), then UniformBlur complains into log and plugin shuts off.

I want to be able to disable blur by setting the radius to 0

Well, it's not an ideal way to disable blur. A better solution would be to remove blur from the handlers suboption in unit- option.
I understand that this may be not so convenient. Next release will treat 0 as a special value to disable blur.

@sctanf
Copy link
Author

sctanf commented Apr 5, 2021

Ok, thanks. In the meantime I won't use blur. Also, I noticed that blur attenuates high frequencies, and the way I use the output values, this causes some issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants