It is currently Fri Oct 30, 2026 6:33 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 17 posts ] 
Author Message
 Post subject: Color Sketch macro
PostPosted: Sun Oct 20, 2013 11:31 am  (#1) 
Offline
GimpChat Member

Joined: Oct 20, 2013
Posts: 7
I found that GMIC Online includes nice color sketch filters but I did not found their macro in gmic_def.gmic or commands in Gimp plugin. Where can I download color sketch macro?


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: Color Sketch macro
PostPosted: Sun Oct 20, 2013 11:40 am  (#2) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
Do you remember the exact name of the filter you are searching ?

I believe it is a "additional filter" (i too wrote a "color sketch" filter but i am not sure if is the one you are searching ) ,
if is a additional filter should be stored in the same directory of your gmic_def file, named with Author name

EDIT
Oppss no ,sorry should not be a additional filter since are not included in the online version.

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: Color Sketch macro
PostPosted: Sun Oct 20, 2013 11:47 am  (#3) 
Offline
GimpChat Member

Joined: Oct 20, 2013
Posts: 7
Thank you for answer. Filters are
Sketch / Hard Sketch
Sketch / Sketch
Author: David Tschumperlé. Latest update: 2012/10/11.
I did not found them in the folder Author name...


Top
 Post subject: Re: Color Sketch macro
PostPosted: Sun Oct 20, 2013 11:52 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12854
Both located under Black & White. :)


Attachments:
bwsktcg.png
bwsktcg.png [ 232.51 KiB | Viewed 4390 times ]

_________________
Lyle

Psalm 109:8

Image
Top
 Post subject: Re: Color Sketch macro
PostPosted: Sun Oct 20, 2013 11:59 am  (#5) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
Because are not additional filter are in the main gmic_def file

What text editor are you using to open the file ?
Almost all (i use notepad++) have a "search" option that should easily locate "Hard Sketch" , showing you the right line

@Lylejk

ohh i understood that he was searching the code not the filters

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: Color Sketch macro
PostPosted: Sun Oct 20, 2013 12:04 pm  (#6) 
Offline
GimpChat Member

Joined: Oct 20, 2013
Posts: 7
Thanks, but they are Black and White and that is the problem :)
Online version has an ability to create Color sketches.
Image
I am looking for Color variant.


Last edited by eugene on Sun Oct 20, 2013 12:18 pm, edited 1 time in total.

Top
 Post subject: Re: Color Sketch macro
PostPosted: Sun Oct 20, 2013 12:07 pm  (#7) 
Offline
GimpChat Member

Joined: Oct 20, 2013
Posts: 7
Yes, gmic_def files inlcudes only Blach and White (bw) Sketch filter, here is the code
#@gimp Hard sketch : gimp_hardsketchbw, gimp_hardsketchbw_preview(0)
but I did not found color variant.


Top
 Post subject: Re: Color Sketch macro
PostPosted: Sun Oct 20, 2013 12:23 pm  (#8) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
Humm, you should ask to David why the plugin version is only BW

Anyway long ago i did wrote a "colored version" is in Artistic> colored sketch

Basically recovers the color from the original,
note effect vary a lot according to the "merging option" used

and here the code
It is old code , so contains some old commands (for merging "layers") still supported but sort of deprecated that i should replace
anyway does work even if may be not exactly what you wish

PS
i must correct myself, now all "additional Filters" are NO MORE on separate files but close the end of the gmic_def files

#####################################################################################################
#@gimp Color Sketch : gimp_colorsketchbw, gimp_colorsketchbw_preview(0)
#@gimp : Amplitude = float(300,0,4000)
#@gimp : Density = float(50,0,100)
#@gimp : Smoothness = float(1,0,10)
#@gimp : Opacity = float(0.1,0,1)
#@gimp : Edge = float(20,0,100)
#@gimp : Fast approximation = bool(1)
#@gimp : Negative = bool(0)
#@gimp : Quantize Colors = int (20,2,255)
#@gimp : Color Smoothness = float(2,0.50,30)
#@gimp : Mixer mode = choice( "Color Doping","Darken","Hard Light","Grain Merge","Lightness","Multiply","Value")
#@gimp : Color Intensity =float (1,0,1)
#@gimp : sep = separator(), Preview type = choice("Full","Forward horizontal","Forward vertical","Backward horizontal","Backward vertical")
#@gimp : sep = separator(), note = note("<small>Author: <i>PhotoComiX</i>. Latest update : <i>2010/12/29</i>.</small>")
gimp_colorsketchbw :
--blur $3 -hardsketchbw[-1] $1,$2,$4,$5,$6
-if $7 -negative[-1] -endif
-quantize[-2] $8 -to_rgb -blur_xy[-2] $9,$9
-if {$10==0} -gimp_compose_colordoping $11,0
-elif {$10==1} -gimp_compose_darken $11,0
-elif {$10==2} -gimp_compose_hardlight $11,1
-elif {$10==3} -gimp_compose_grainmerge $11,1
-elif {$10==4} -gimp_compose_lightness $11,1
-elif {$10==5} -gimp_compose_multiply $11,0
-elif {$10==6} -gimp_compose_value $11,1 -endif

gimp_colorsketchbw_preview :
-gimp_split_preview "-gimp_colorsketchbw ${1--2}",$-1

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: Color Sketch macro
PostPosted: Sun Oct 20, 2013 12:26 pm  (#9) 
Offline
GimpChat Member

Joined: Oct 20, 2013
Posts: 7
thank you very much, will try it


Top
 Post subject: Re: Color Sketch macro
PostPosted: Sun Oct 20, 2013 12:32 pm  (#10) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
you already have in Artistic
So you don't need to do anything with the code ..but if you want to hack it you are welcome !
As example now are more layer merging modes available (and i even added some"combined modes" that may be used )

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: Color Sketch macro
PostPosted: Sun Oct 20, 2013 12:42 pm  (#11) 
Offline
GimpChat Member

Joined: Oct 20, 2013
Posts: 7
I do not like results of Articstic / Sketch. It produces much less natural sketch then Hard Sketch from Online version.


Top
 Post subject: Re: Color Sketch macro
PostPosted: Sun Oct 20, 2013 12:53 pm  (#12) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
if you are talking of my colored version, it is based on Sketch (not Hard Sketch)

But what you say is interesting if the online version of Sketch and Hard Sketch support colours then should be trivial to adapt to the plugin version

..but is also weird , very weird because the filters code should be identical in the Online version

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: Color Sketch macro
PostPosted: Sun Oct 20, 2013 1:09 pm  (#13) 
Offline
GimpChat Member

Joined: Oct 20, 2013
Posts: 7
Thanks, you code result looks fine, I spoke about results of standart Articstic / Color Sketch, it's results are pure.
Yes, it is surprising that Online versions has extended commands that are not included into Gimp plugin.


Top
 Post subject: Re: Color Sketch macro
PostPosted: Sun Oct 20, 2013 4:44 pm  (#14) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
We should ask to the gmic developer , Ronounours

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: Color Sketch macro
PostPosted: Sun Oct 20, 2013 5:14 pm  (#15) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12854
That is strange; wonder why the online version supports color while not the internal version? Maybe David will explain this. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Color Sketch macro
PostPosted: Mon Oct 21, 2013 2:59 am  (#16) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
Hello there :p

Yes, there is a subtle difference for the 'Hard sketch' filters between the online and the plug-in interfaces of G'MIC.
The only difference is, the online version calls the B&W hardsketch filter, but puts then the result in a new top layer, that is blended afterwards with the original image, using the 'Hard light' blending mode (so that's why there are colors at the end).
In GIMP, this is really easy to reproduce : select 'Output layers' -> 'New layer', apply your B&W Hardsketch filter, then open the layer menu, and choose the 'Hard light' mode as the blending mode for the top layer.
That's it :)

As you see, this is very simple to do, so I've decided it was not really essential to add the color version to the plug-in. On the other side, there are no ways we can manage new layers in G'MIC online, so that's why I've added options to make it in colors there.

I hope the mystery is solved.


Top
 Post subject: Re: Color Sketch macro
PostPosted: Mon Oct 21, 2013 5:59 am  (#17) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
Ahh
That is exactly what is doing "Colored Sketch" the only other difference is that a few other modes may be used in alternative to hard light, and the original Sketch commands are a bit simplified (a few variables are hardcoded )

Now i wonder if that simplification was a good idea but Sketch had already so many controls and i needed to add more to allow to chose how to recover the original color (, hard light give good results but also value , lightness, etc are usable to regain colours , all in a different way so is hard say which does best) and so i sacrificed a few

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
Post new topic Reply to topic  [ 17 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group