Feature Request – Random Parameter Generator

Please consider adding a button for “random parameters” (next to “copy command” and “reset parameters”) as seen in the Flaming Pear and other plug-ins (dice icon).

Indeed that could be nice for people who want to play, or be surprised, or just see what the filter can do.
But there could be a huge drawback on some slow filters if the random setting pushes all the sliders of a slow filter on a big image…
Many people will not understand why G’MIC will hang for 10 or 20 minutes or more and might hard shut down their computers, and come here to complain…

Just a thought

1 Like

I had a discussion of this, but the thing is that there are parameters that wouldn’t work, and there are filters that does dynamic GUI processing. Some of them have the option to enable randomization of parameters. At the end of the day, individual coders have to make a randomization button to change parameters for their filter.

For example: Channels Blur-Sharpen…

I literally made randomization buttons here, and I had to link variables to GUI elements for it to work. There’s over 50 variables here, but you don’t see them all if you use only one image.

2 Likes

Hi there.
We are currently implementing a “Randomize” button for the G’MIC-Qt plug-in, that randomizes the parameters of the filter.

The icon for the button must be 32x32, and right now, we hesitate between two choices:

  • Choice #1 :

Dark theme : image

Light theme : image

  • Choice #2 :

Dark theme : image

Light theme : image

What do you prefer ?
Or do you have another idea for a 32x32 icon (if you tell me “Dices”, please attach a 32x32 icon of dices that is clearly visible, we didn’t succeed in doing so :slight_smile: ).

Thanks!

2 Likes

Being a Junji Ito fan, I vote for Uzumaki for sure :face_with_spiral_eyes:

I wonder how you made the random params work though, especially for the filters that could take minutes to update with just 1 param pumped up.

1 Like

To allow randomization, a filter parameter will have to declare itself with an additional specifier (currently ~, like in Value = ~float(0,0,100) ).
Filters that do not specify explicitely such parameters won’t be randomizable.

1 Like

Awesome, this will save a lot of work for everyone i tihnk!

Will this interfere with the usage of _ prepend in GUI typedef?

What happens with $_persistent upon clicking?

Is there a new predefined parameter that tells me the randomize button had been clicked?

What happens with button() which should be 1 upon click?

Dynamic GUI things still work as expected?

I think those questions should cover the bases.

I’ll pick choice #1.

@afre can be tie-breaker.

uzumaki1 :1st_place_medal:
vs
tatsumaki

Craving for :sushi: :chopsticks: now


[1] Icon has more defined shape, sometimes implies transformation or symbolizes magic.

Thank you for your replies.
If I’m not mistaken, G’MIC uses the Farm Fresh icon theme for buttons.
https://commons.wikimedia.org/wiki/Farm-Fresh_web_icons#Sports_&_game
This set comes with a dice symbol (32×32 + 24×24 + 16×16).

BTW: In Harry’s Filters, the requested feature is called “Jump”.

PS: https://youtu.be/JDmrJjhbHL0?t=346

I wonder if somehow you could add a limiter to the randomization parameter, like this maybe:
Value = ~(50)float(0,0,100) or
Value = ~float(0,0,100,50) or
Value = ~float(0,0,100)(50) or anything
Where the randomizer would be limited to 50% ( n%) of the max value? Don’t know if this is possible though. But that would allow some more randomization without going into overheating territory… Maybe.

Not planned.
I’d say that if this situation happens, the filter is actually not a good candidate for parameter randomization.

Favor #2, but only slightly.
Took a couple of heartbeats before I read #1 as a funnel cloud. On the other hand, I’m not sure that I entirely adore the spiral. It’s a cleaner graphic, which I like, but spirals are very orderly and do not immediately convey ‘haphazardize settings’ to me either. Abstractly, I like dice (or maybe a single die), but the practicality of fitting it into a 32×32 pixel square seems (excuse me) ‘dicey.’

Kudos to Sébastien, Romain, et al.

1 Like

Where’s the answers to my 5 questions?

Ok, was just a random idea.

For the icon, there is also the “shuffle” crossed arrows like in any music player. But it might be too similar to the “reload” icon?

Maybe a simple question mark?
There will be a hint anyway.
Gmic new icon

If not, I vote for option #2.

“Shuffle” seems to be synonymous with “randomize” in programming.

1 Like

I actually don’t like the “Shuffle” option.
Shuffle is often used to randomly sort a list of something (e.g. tunes in a playlist), and in G’MIC-Qt this could be misinterpreted, as the plug-in actually has:

  • A list of filters.
  • For each filter, a list of parameters.

To me, a “Shuffle” button would mean something if we allow to randomly sort the list of parameters for a filter (yes of course, this is a bad idea :slight_smile: ).

I’ve found a good-looking 32x32 dice icon, maybe it’s finally a better solution.