It is currently Wed Jun 19, 2024 2:35 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: cli345's cartoon filter as a native GEGL Filter.
PostPosted: Sun Sep 11, 2022 7:05 pm  (#1) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
Cli345 made most the graph I just ported as a native GEGL filter.

https://github.com/LinuxBeaver/GEGL-Photo-to-Cartoon-

Remember this goes in /gegl-0.4/plug-ins. Not Gimp's normal plugin folder. (tons of people are making this mistake). This filter has internal blend modes. HardLight, Multiply and an option for Color Removal.

Image
Image
Image

Cli345's other filter I ported is also here. (GEGL Pencil Sketch)
viewtopic.php?f=9&t=19928&hilit=pencil


Link to Cli345's original graph that this filter is mostly based on.
viewtopic.php?f=10&t=19463&start=20#p266181

Modified Graph I used.

#cli345's photo to cartoon filter
id=myStart

noise-reduction domain-transform n-iterations=5

difference-of-gaussians radius1=1.6  radius2=0.53
gimp:desaturate mode=value
levels in-low=0.007 in-high=0.009
invert-gamma rgb-clip


hard-light aux=[ ref=myStart hue-chroma lightness=1 chroma=3 ]
domain-transform
domain-transform
domain-transform
domain-transform
mean-curvature-blur iterations=4


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: cli345's cartoon filter as a native GEGL Filter.
PostPosted: Mon Sep 12, 2022 12:38 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Thank you for this GEGL filter. I could not get the python filter to work in Gimp-2.10.32.It would load but error when i ran it. Not to mention the python dialog window is so tall i can't get to the execute button. I had to count tab hits. :hoh

Why we need scroll bars or tabs in these plugins when they have so many options. Or possibly add the ability to resize the dialog? :hehe

My play with your plugin. :bigthup :clap

Attachment:
Pencil-Sketch-GEGL_Cartoon_RD-2022-09-12_013344.jpg
Pencil-Sketch-GEGL_Cartoon_RD-2022-09-12_013344.jpg [ 277.61 KiB | Viewed 1804 times ]


Makes a nice pencil sketch filter all on it's own. Cartoon works great also.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: cli345's cartoon filter as a native GEGL Filter.
PostPosted: Mon Sep 12, 2022 1:09 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
So i took that result and did a color to alpha on white. Then i was able to stroke the selected edges and paint the selection with a leaf brush. :)

Attachment:
Leaf-Dress-AND-Hat_RD-Girl-Walking-2022-08-20_013518.jpg
Leaf-Dress-AND-Hat_RD-Girl-Walking-2022-08-20_013518.jpg [ 183.05 KiB | Viewed 1800 times ]

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: cli345's cartoon filter as a native GEGL Filter.
PostPosted: Mon Sep 12, 2022 3:06 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Just one more that started with the GEGL Photo To Cartoon filter. :bigthup

Gradient fill in the selection lines.

Attachment:
Girl-WalkingColor-Grasient_RD-2022-08-20_013518.jpg
Girl-WalkingColor-Grasient_RD-2022-08-20_013518.jpg [ 206.27 KiB | Viewed 1793 times ]

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: cli345's cartoon filter as a native GEGL Filter.
PostPosted: Mon Sep 12, 2022 2:00 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
The version on my computer does not have overlay. it says "remove color" This is because the version I uploaded to Github was when I tested the overlay blend mode and removed it because it was 95% like hardlight. I will be pushing a cosmetic update that replaces overlay with remove color mode. This will have no feature changes.

I may even make it where gegl:pencil and this are one filter. (But that would confuse novices) as I would have to add a gaussian blur and one other thing for pencil mode.


Top
 Post subject: Re: cli345's cartoon filter as a native GEGL Filter.
PostPosted: Mon Sep 12, 2022 3:19 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
The overlay blend mode now works and does an actual gegl:overlay but it has a extra setting called srgb=true to make it distinct as possible from gegl:hardlight. NOTE This filter may trigger an error and force you to navigate to
config/GIMP/2.10/filters/GimpGegl-gegl-photo2cartoon-config.settings
and delete GimpGegl-gegl-photo2cartoon-config.settings. This apparently is a consequence of updating a filter with an enum list.

grrrr.......


Top
 Post subject: Re: cli345's cartoon filter as a native GEGL Filter.
PostPosted: Mon Sep 12, 2022 3:26 pm  (#7) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
Rod wrote:
Thank you for this GEGL filter. I could not get the python filter to work in Gimp-2.10.32.It would load but error when i ran it. Not to mention the python dialog window is so tall i can't get to the execute button. I had to count tab hits. :hoh

Why we need scroll bars or tabs in these plugins when they have so many options. Or possibly add the ability to resize the dialog? :hehe

My play with your plugin. :bigthup :clap

Attachment:
Pencil-Sketch-GEGL_Cartoon_RD-2022-09-12_013344.jpg


Makes a nice pencil sketch filter all on it's own. Cartoon works great also.


I removed the pencil sketch ability as it is found in Gegl:pencil and gegl:pencil goes faster and has an additional blur option. I am thinking about giving pencil a white color overlay option but I am lazy. I could have made pencil and phototocartoon one filter but phototocartoon contains literally five domain smooths and that slows things down a lot.


Top
 Post subject: Re: cli345's cartoon filter as a native GEGL Filter.
PostPosted: Tue Sep 13, 2022 3:24 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
contrast_ wrote:
Rod wrote:
Thank you for this GEGL filter. I could not get the python filter to work in Gimp-2.10.32.It would load but error when i ran it. Not to mention the python dialog window is so tall i can't get to the execute button. I had to count tab hits. :hoh

Why we need scroll bars or tabs in these plugins when they have so many options. Or possibly add the ability to resize the dialog? :hehe

My play with your plugin. :bigthup :clap

Attachment:
Pencil-Sketch-GEGL_Cartoon_RD-2022-09-12_013344.jpg


Makes a nice pencil sketch filter all on it's own. Cartoon works great also.


I removed the pencil sketch ability as it is found in Gegl:pencil and gegl:pencil goes faster and has an additional blur option. I am thinking about giving pencil a white color overlay option but I am lazy. I could have made pencil and phototocartoon one filter but phototocartoon contains literally five domain smooths and that slows things down a lot.

I agree. Blur settings in any filter slows things down alot. ;)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: cli345's cartoon filter as a native GEGL Filter.
PostPosted: Fri Sep 16, 2022 10:54 am  (#9) 
Offline
GimpChat Member

Joined: Apr 19, 2021
Posts: 121
Location: France
Thanks, contrast_, good work! :)
Now, we have five versions of the "Comic Book" filter:
  • Filters -> Artistic -> Comic Book for 2.10
  • Filters -> Artistic -> Simple Cartoon
  • Filters -> G'MIC-Qt -> Artistic -> Comicbook
  • Filters -> Generic -> GEGL Graph... -> the preset into which you have copied the code of this
    (At first, in my mind, this version was just an approximation for illustrative purposes.)
  • Tools -> GEGL Operations -> Photo to Cartoon

Each one has advantages and drawbacks and gives a (slightly ?) different result. You have a choice :)

_________________
Photo to cartoon : https://github.com/cl4cnam/gimp_cartoon_plugin


Top
 Post subject: Re: cli345's cartoon filter as a native GEGL Filter.
PostPosted: Tue Sep 20, 2022 1:36 am  (#10) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4050
GMIC is the best version in my book. Just my opinion...

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: cli345's cartoon filter as a native GEGL Filter.
PostPosted: Fri Sep 23, 2022 11:53 pm  (#11) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1440
Custom Bevel, Color Lighting Fusion, Photo to Cartoon , Glow Stick and GEGL Effects have an emergency update.


If two filters have the same name of a blend mode enum list it will result in the blend mode switch option being hidden. Check these filters to make sure they have their blend mode switchers. Updating to the latest version solves the problem.


Top
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) GEGL Inner Glow (Filter of itself but now ships with GEGL Effects)

37

No new posts Attachment(s) GEGL Bevel (filter of its own but now ships with GEGL Effects)

32

No new posts THIRD PARTY GEGL FILTER GUIDE

14

No new posts Get use to using GEGL Graph syntax.I can't make a filter of everything

13

No new posts Attachment(s) GEGL STONE TEXT STYLING FILTER

21



* Login  



Powered by phpBB3 © phpBB Group