Jump to content

Repeat effect N-times. Also redo/undo N-times.


Recommended Posts

Hi,

 

I have a filter plugin (G'MIC-QT) which takes 23 seconds to apply the effect (Dream Smoothing, already set at 10 iterations), i like to re-apply this effect on same image many times e.g. 10-15 times. But it takes time to apply it (btw to use ctrl+y/z to move forth and back also takes time, would be cool with redo/undo N-x function). Is there a way to set apply filter 10/N-x  so i can go make pasta and come back when it has finished applicating?

Edited by frer8833
Link to comment
Share on other sites

  • frer8833 changed the title to Repeat effect N-times. Also redo/undo N-times.
1 hour ago, frer8833 said:

Is there a way to set apply filter 10/N-x  so i can go make pasta and come back when it has finished applicating?

 

You should be able to use the G'MIC CLI for this. The Dream Smoothing CLI command can be retrieved from the G'MIC-Qt UI, there is a copy to clipboard button in the top right of the filter UI.

 

The command could possibly look something like:

 

gmic -input in.png -fx_dreamsmooth 10,1,1,0.8,0,0.8,0,24,0 -fx_dreamsmooth 10,1,1,0.8,0,0.8,0,24,0 <...> -output out.png

 

This is based on the examples from the G'MIC tutorial page, I have not tested it.

 

@Reptillian may have some additional ideas on how to achieve the effect you are looking for.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

21 hours ago, null54 said:

 

You should be able to use the G'MIC CLI for this. The Dream Smoothing CLI command can be retrieved from the G'MIC-Qt UI, there is a copy to clipboard button in the top right of the filter UI.

 

The command could possibly look something like:

 

gmic -input in.png -fx_dreamsmooth 10,1,1,0.8,0,0.8,0,24,0 -fx_dreamsmooth 10,1,1,0.8,0,0.8,0,24,0 <...> -output out.png

 

This is based on the examples from the G'MIC tutorial page, I have not tested it.

 

@Reptillian may have some additional ideas on how to achieve the effect you are looking for.

I don't know how to evoke the Command Line interface. This plugin UI has "X" at top right which will close the window. 

 

It would be easier if Paint.net provided this multi-repeat function, and also a multi redo/undo function.  

 

I also would like the Dream Smoothing filter to have more than 10 iterations, up to 20 would be cool (I guess). Right know 10 iterations seems enough for some images whilst for other images it is too little and makes the images look blurry, cloudy, weird etc.

 

Btw how can I remove pixelated edges or make more them more smoothe? Any filter for this?

 

Can I change the ctrl+ zoom filter of Paint.net so that it uses High-quality bicubic? I don't know what the default pixelating zoom mode is useful for.

Edited by frer8833
Link to comment
Share on other sites

Suggestion : Select the filter you want to apply multiple times, then click on the "Copy the G'MIC command button", located on the top-right of the filter parameter (just beside the "reset parameters" button). It will copy the G'MIC command in the clipboard.

eUW7Ysa.png

Then, select filter "Various / Custom Code [Local]", copy-paste the content of your clipboard in the "Code" section (replace everything that would be already set there).

And now, embed it with a "repeat { ... }" syntax, as shown in the image below.

LkUYK2K.png

Click "OK", and you're done.

Link to comment
Share on other sites

21 hours ago, G'MIC said:

Suggestion : Select the filter you want to apply multiple times, then click on the "Copy the G'MIC command button", located on the top-right of the filter parameter (just beside the "reset parameters" button). It will copy the G'MIC command in the clipboard.

eUW7Ysa.png

Then, select filter "Various / Custom Code [Local]", copy-paste the content of your clipboard in the "Code" section (replace everything that would be already set there).

And now, embed it with a "repeat { ... }" syntax, as shown in the image below.

LkUYK2K.png

Click "OK", and you're done.

 

Thank you, the auto-repetition code works (I had the old version of G'MIC which lacks the copy-code-button).

 

I had the problem repeated effects looking too blurry. For example if I apply "10-iterations" with "1 Opacity" then the image looks much clearer than if I repeat application "5 iterations" with "1 Opacity". The lower the "Iterations" under "General settings" the blurrier it becomes. The latter looks much blurrier which I do not want. Do you know the reason for this difference of image detail? That's why I said I would like 20 iterations (or maybe up to 50) in one go. I discovered I could make it 50 (up to 650 tested) iterations by replacing in the code 10 with 50.

 

When I apply the dream Smooth filter with Alpha merging option some images becomes too dark and color twisted which can't properly be remedied with regular and simple brightening, is there a way to make the Dream smooth filter apply less darkening effect and decrease color change, maybe a code change in Various-local?

 

Which filter applies a pure anisotropic filter without other effects (with high x, for example 124x)? If it's Dream Smooth I would like a merging options of Dream Smooth which is better than Alpha in order to avoid too much distortion of color, light etc.

 

10-iterations in one go, more detailed:

image.thumb.png.5adc85779f9230ef19ac390bac259368.png

 

Repeated 5-iterations (5x2), blurrier:

image.thumb.png.21783f7144539e610a50080d3552e231.png

 

Edited by frer8833
Link to comment
Share on other sites

2 hours ago, frer8833 said:

I had the problem repeated effects looking too blurry. For example if I apply "10-iterations" with "1 Opacity" then the image looks much clearer than if I repeat application "5 iterations" with "1 Opacity". The lower the "Iterations" under "General settings" the blurrier it becomes. The latter looks much blurrier which I do not want. Do you know the reason for this difference of image detail? That's why I said I would like 20 iterations (or maybe up to 50) in one go. I discovered I could make it 50 (up to 650 tested) iterations by replacing in the code 10 with 50.

 

Really I don't know.

I'm not the author of this particular filter ("Dream Smoothing" has been done by Arto Huotari), so I cannot say why it behaves like that. There might be some hidden parameters automatically set according to the specified number of iterations, in the filter implementation.

Arto could tell us, but I'm afraid he is not around (nor on the G'MIC forums). His filter got its latest update almost 10 years ago...

 

EDIT: I've checked and the code of the dream smoothing filter definitely computes some smoothing parameters according to the number of iterations (see https://github.com/GreycLab/gmic-community/blob/master/include/arto_huotari.gmic#L71). So that explains the difference.

 

Edited by G'MIC
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...