dyne / frei0r

A large collection of free and portable video plugins
https://frei0r.dyne.org/
GNU General Public License v2.0
419 stars 90 forks source link

'cartoon' acceptable parameter values #105

Closed jamshark70 closed 3 years ago

jamshark70 commented 3 years ago

I'm playing with 'cartoon' in Pure Data / GEM.

I can't see any effect with the 'triplevel' input -- all values give the same result.

If diffspace 256 < 1.0, I get a valid image but not a very strong effect. If diffpace 256 > 1.0, it goes black and white and the result is not useful at all.

I must be misunderstanding something but I don't know what.

All other frei0r plugins I've tried in Pd do as advertised -- 'cartoon' is the odd one out. So I can't rule out that maybe cartoon is just buggy.

jamshark70 commented 3 years ago

Eventually I found:

I'll go ahead and close the issue as there isn't a code bug -- but I'll also note that things that may be self-evident to the developers are not necessarily so for incoming users.

ddennedy commented 3 years ago

frei0r plugin parameters support default values, the values you landed upon are very close to the defaults: https://mltframework.org/plugins/FilterFrei0r-cartoon/

I do not know if your Pd UI/integration supports frei0r default parameter values or resets them to something different. Over the past few years we have encouraged new plugin submissions to have a sensible mapping to the entire [0, 1] range of values, but older plugins such as this are not changed. Also, changing parameter behaviors can be problematic to the video editors that store these values in projects (as opposed to realtime tools) with respect to loading old projects in new versions of software. There is a version number on each plugin, but not many tools can or will have the code to adapt. So, changing the range mapping of existing parameters is frowned upon unless it is a critical fix. Adding new parameters with a different, overriding behavior is possible. But that can obviously be confusing to the user interface if it is a generically generated one, especially if it does not expose the parameter "description," which may contain information about this. Does Pd?

jamshark70 commented 3 years ago

I do not know if your Pd UI/integration supports frei0r default parameter values or resets them to something different.

It doesn't provide any information about defaults stored -- it prints the doc strings for the parameters but the default 0 to 1 values are not available programmatically using the pix_frei0r object.

So I see in the console window something like:

Cartoon: Cartoonify video, do a form of edge detect
triplevel: level of trip: mapped to [0,1] asymptotical
diffspace: difference space: a value from 0 to 256 (mapped to [0,1])

That's all.

I don't think there's any need to change the behavior of the parameters. I'm just pointing out that if one doesn't already know sensible ranges, it isn't obvious -- and documentation can address that. Specifically for Cartoon, it seems that triplevel may go further below 1 for higher values of diffspace. Intuitively this makes some sense, but it would be nice to have more detail on that (so that e.g. I could adjust the Pure Data slider ranges based on user values).