It is currently Fri Apr 19, 2024 8:05 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Trying to generate a Paint By Numbers pattern (Solved)
PostPosted: Sat Feb 07, 2015 8:39 pm  (#1) 
Offline
GimpChat Member

Joined: Feb 07, 2015
Posts: 66
GIMP Version: 2.8.10
Operating System: Windows
OS Version: 8
GIMP Experience: Beginner Level

List any relevant plug-ins or scripts:
Cartoonizer



I have been trying to get GIMP to generate a PBN pattern for some time now, and I am actually really dang close to pulling it off.
By utilizing the plugin "Cartoonizer" I am able to generate the main structure of it, and with an edge detection, I can generate the outlines from that.
Utilizing the program "Vector Magic" helps as well if the pattern proves too small to properly draw the outlines.

I am however, having trouble placing the numbers.
Is there a simple way to place the numbers, without having to go through and paste it all manually? (I.E. do it by selection? or by instance of color?)

Thanks!

Edit:
Solved!
Please see viewtopic.php?f=23&t=11991


Last edited by Nite Shadow on Thu Feb 12, 2015 12:53 am, edited 1 time in total.

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: Trying to generate a Paint By Numbers pattern
PostPosted: Sat Feb 07, 2015 10:33 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Apr 08, 2010
Posts: 5420
Location: Northwest Ohio
This might make a very interesting tutorial!


Top
 Post subject: Re: Trying to generate a Paint By Numbers pattern
PostPosted: Sat Feb 07, 2015 10:53 pm  (#3) 
Offline
GimpChat Member

Joined: Feb 07, 2015
Posts: 66
I'm actually considering sharing this information once I get the final touch on it.
Considering that I can't find another like it anywhere, and the only program I know of that does this exclusively does a horrible job of it.

I've so far turned up far better results using GIMP.


Top
 Post subject: Re: Trying to generate a Paint By Numbers pattern
PostPosted: Sun Feb 08, 2015 1:55 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12516
Maybe Saul's Script-fu might be able to work for you. :)

http://registry.gimp.org/node/26185

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Trying to generate a Paint By Numbers pattern
PostPosted: Sun Feb 08, 2015 6:42 am  (#5) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4736
Nite Shadow wrote:
GIMP Version: 2.8.10
Operating System: Windows
OS Version: 8
GIMP Experience: Beginner Level

List any relevant plug-ins or scripts:
Cartoonizer



I have been trying to get GIMP to generate a PBN pattern for some time now, and I am actually really dang close to pulling it off.
By utilizing the plugin "Cartoonizer" I am able to generate the main structure of it, and with an edge detection, I can generate the outlines from that.
Utilizing the program "Vector Magic" helps as well if the pattern proves too small to properly draw the outlines.

I am however, having trouble placing the numbers.
Is there a simple way to place the numbers, without having to go through and paste it all manually? (I.E. do it by selection? or by instance of color?)

Thanks!


Possible algorithm if you have the colored image in a a layer and the list of colors.
  • For each color:
    • call Select by Color for the color
    • obtain a path from that
    • for each stroke in the path
      • compute the barycenter of the anchors
      • position the number there

This won't work for some odd shapes (thin curved areas) but can be fixed by hand afterwards, the script would be right for most colors.

_________________
Image


Top
 Post subject: Re: Trying to generate a Paint By Numbers pattern
PostPosted: Sun Feb 08, 2015 11:53 am  (#6) 
Offline
GimpChat Member

Joined: Feb 07, 2015
Posts: 66
ofnuts wrote:
Nite Shadow wrote:
GIMP Version: 2.8.10
Operating System: Windows
OS Version: 8
GIMP Experience: Beginner Level

List any relevant plug-ins or scripts:
Cartoonizer



I have been trying to get GIMP to generate a PBN pattern for some time now, and I am actually really dang close to pulling it off.
By utilizing the plugin "Cartoonizer" I am able to generate the main structure of it, and with an edge detection, I can generate the outlines from that.
Utilizing the program "Vector Magic" helps as well if the pattern proves too small to properly draw the outlines.

I am however, having trouble placing the numbers.
Is there a simple way to place the numbers, without having to go through and paste it all manually? (I.E. do it by selection? or by instance of color?)

Thanks!


Possible algorithm if you have the colored image in a a layer and the list of colors.
  • For each color:
    • call Select by Color for the color
    • obtain a path from that
    • for each stroke in the path
      • compute the barycenter of the anchors
      • position the number there

This won't work for some odd shapes (thin curved areas) but can be fixed by hand afterwards, the script would be right for most colors.

This option seems likely to work actually.
How might I compile this script?


Top
 Post subject: Re: Trying to generate a Paint By Numbers pattern
PostPosted: Sun Feb 08, 2015 3:30 pm  (#7) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4736
Nite Shadow wrote:
ofnuts wrote:
Nite Shadow wrote:
GIMP Version: 2.8.10
Operating System: Windows
OS Version: 8
GIMP Experience: Beginner Level

List any relevant plug-ins or scripts:
Cartoonizer



I have been trying to get GIMP to generate a PBN pattern for some time now, and I am actually really dang close to pulling it off.
By utilizing the plugin "Cartoonizer" I am able to generate the main structure of it, and with an edge detection, I can generate the outlines from that.
Utilizing the program "Vector Magic" helps as well if the pattern proves too small to properly draw the outlines.

I am however, having trouble placing the numbers.
Is there a simple way to place the numbers, without having to go through and paste it all manually? (I.E. do it by selection? or by instance of color?)

Thanks!


Possible algorithm if you have the colored image in a a layer and the list of colors.
  • For each color:
    • call Select by Color for the color
    • obtain a path from that
    • for each stroke in the path
      • compute the barycenter of the anchors
      • position the number there

This won't work for some odd shapes (thin curved areas) but can be fixed by hand afterwards, the script would be right for most colors.

This option seems likely to work actually.
How might I compile this script?

This is an idea for a script, which has still to be written by someone in the know (not me, I'm way too busy this weekend).

_________________
Image


Top
 Post subject: Re: Trying to generate a Paint By Numbers pattern
PostPosted: Sun Feb 08, 2015 3:56 pm  (#8) 
Offline
GimpChat Member

Joined: Feb 07, 2015
Posts: 66
Fair enough.


Top
 Post subject: Re: Trying to generate a Paint By Numbers pattern
PostPosted: Wed Feb 11, 2015 1:01 pm  (#9) 
Offline
GimpChat Member

Joined: Feb 07, 2015
Posts: 66
http://registry.gimp.org/node/24746 So, I think that I have found a viable alternative to Vector Magic.
It's a tad slow, but it seems to get the job done well enough.

I may have enough to create a tutorial at this point, provided that I simplify the example since placing numbers is still a manual process.


Top
 Post subject: Re: Trying to generate a Paint By Numbers pattern
PostPosted: Wed Feb 11, 2015 3:08 pm  (#10) 
Offline
Script Coder
User avatar

Joined: Dec 27, 2014
Posts: 508
A rather simpler approach is to use seamless patterns of numbers to bucket-fill the coloured areas.

eg. create a set of patterns (one for each number you want to use) like this:

Image

then, when you've finished processing your image down to an outline and a small palette of colours, simply select each colour in turn and, on a separate layer, bucket fill the selection with the corresponding number pattern. When done, you can turn the opacity of the numbers layer(s) right down to about 20-30% to get something like this:
Image

Any little "funnies" may still have to be corrected manually.
eg. in the above image we have an unfortunate line-up between the digits in the bottom centre:
Image
This might be mitigated by shifting the seamless pattern before bucket-filling or by manually deleting the partial digits in question in the numbers layer.


Top
 Post subject: Re: Trying to generate a Paint By Numbers pattern
PostPosted: Wed Feb 11, 2015 4:28 pm  (#11) 
Offline
Script Coder
User avatar

Joined: Dec 27, 2014
Posts: 508
Nite Shadow wrote:
http://registry.gimp.org/node/24746 So, I think that I have found a viable alternative to Vector Magic.
It's a tad slow, but it seems to get the job done well enough.

That plugin uses the same algorithm (scale2x) as GMIC Repair>Upscale [scale2x]
You should find that the GMIC implementation runs much faster and produces the same (or better) results.

See this for more info and better algorithms:
http://scale2x.sourceforge.net/


Top
 Post subject: Re: Trying to generate a Paint By Numbers pattern
PostPosted: Wed Feb 11, 2015 5:55 pm  (#12) 
Offline
GimpChat Member

Joined: Feb 07, 2015
Posts: 66
jontait2 wrote:
A rather simpler approach is to use seamless patterns of numbers to bucket-fill the coloured areas.

eg. create a set of patterns (one for each number you want to use) like this:

[ Image ]

then, when you've finished processing your image down to an outline and a small palette of colours, simply select each colour in turn and, on a separate layer, bucket fill the selection with the corresponding number pattern. When done, you can turn the opacity of the numbers layer(s) right down to about 20-30% to get something like this:
[ Image ]

Any little "funnies" may still have to be corrected manually.
eg. in the above image we have an unfortunate line-up between the digits in the bottom centre:
[ Image ]
This might be mitigated by shifting the seamless pattern before bucket-filling or by manually deleting the partial digits in question in the numbers layer.


YES! :D
That actually looks like it will work out well!
Thank you!

jontait2 wrote:
Nite Shadow wrote:
http://registry.gimp.org/node/24746 So, I think that I have found a viable alternative to Vector Magic.
It's a tad slow, but it seems to get the job done well enough.

That plugin uses the same algorithm (scale2x) as GMIC Repair>Upscale [scale2x]
You should find that the GMIC implementation runs much faster and produces the same (or better) results.

See this for more info and better algorithms:
http://scale2x.sourceforge.net/

Good idea, I may do a quick compare of them, and see which turns out with the better results and go with that.
A Vector Magic version may be made later on as well, since that has still turned up the best results.


Top
 Post subject: Re: Trying to generate a Paint By Numbers pattern
PostPosted: Wed Feb 11, 2015 7:11 pm  (#13) 
Offline
Script Coder
User avatar

Joined: Dec 27, 2014
Posts: 508
@Nite Shadow:
Here are the seamless number patterns I used for the above image if you want them:
Attachment:
PBN_pats_16px.zip [3.42 KiB]
Downloaded 106 times

Just unzip the file and copy the 10 files therein to your patterns folder, ie:
on Windows: C:\Windows\Users\user\.gimp-2.8\patterns
on Linux: /home/user/.gimp-2.8/patterns
then fire-up Gimp or refresh your patterns in the Patterns Dialog.

You may find, however, that a slightly larger or smaller font size works better for any given image.


Top
 Post subject: Re: Trying to generate a Paint By Numbers pattern
PostPosted: Wed Feb 11, 2015 10:34 pm  (#14) 
Offline
GimpChat Member
User avatar

Joined: Sep 22, 2012
Posts: 2089
Location: US
I have no answer to your question,
just want to thank you for the idea that led me to creating these images (not in gimp though)

Image

Image


Top
 Post subject: Re: Trying to generate a Paint By Numbers pattern
PostPosted: Wed Feb 11, 2015 10:48 pm  (#15) 
Offline
GimpChat Member

Joined: Feb 07, 2015
Posts: 66
@K1TesseraEna:
Those are kinda trippy actually. Not bad!

@Everyone else:
I think that we have ourselves the makings for that tutorial! :D
Image
This was converted from a photo, the only thing left to do with it at this point, is test it for accuracy by printing, and filling it in!
Printing this myself as well.

Thank you to jontait2 for actually coming up with the idea to use the bucket fill, with number textures, as well as supplying the number textures.
And to everyone else who stepped in and made this possible! :jumpclap :clap :hi5 :tyspin


Top
 Post subject: Re: Trying to generate a Paint By Numbers pattern
PostPosted: Wed Feb 11, 2015 11:55 pm  (#16) 
Offline
GimpChat Member

Joined: Feb 07, 2015
Posts: 66
Image
Which brings me to something to note at the end of it all.

It is very important to take your time in painting.
Something I clearly didn't do. ^_^'


Top
 Post subject: Re: Trying to generate a Paint By Numbers pattern (Solved)
PostPosted: Thu Feb 12, 2015 5:40 pm  (#17) 
Offline
GimpChat Member
User avatar

Joined: Apr 08, 2010
Posts: 5420
Location: Northwest Ohio
getting a good outline would be my main problem.


Top
 Post subject: Re: Trying to generate a Paint By Numbers pattern (Solved)
PostPosted: Thu Feb 12, 2015 5:46 pm  (#18) 
Offline
GimpChat Member

Joined: Feb 07, 2015
Posts: 66
This is why I made note of a way to resize the image, this gives a better outline for those smaller details and helps prevent the outlines from forming a blob.


Top
 Post subject: Re: Trying to generate a Paint By Numbers pattern (Solved)
PostPosted: Sat Feb 14, 2015 2:34 pm  (#19) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
a step by step tutorial would be GREAT!
I searched on the internet for converting from picture to PBN but all i found was a charged service where they send you the paint kit after you send them your image and they charge around $50.

_________________
TinT


Top
 Post subject: Re: Trying to generate a Paint By Numbers pattern (Solved)
PostPosted: Sat Feb 14, 2015 2:57 pm  (#20) 
Offline
Global Moderator
User avatar

Joined: Nov 16, 2011
Posts: 5128
Location: Metro Vancouver, BC
Night Shadow did this one, Subject: Generating a paint by numbers pattern.

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Generate Spheres and eggs with GEGL

4

No new posts Attachment(s) Need to generate an array of vertical lines (rulings) across a page.

5

No new posts Attachment(s) Colorful Pattern from Text (Text Pattern) Plug-in

32

No new posts MS Paint

8

No new posts Paint brush lag

3



* Login  



Powered by phpBB3 © phpBB Group