It is currently Thu Apr 18, 2024 7:24 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Helper for seamless tiles drawing/painting
PostPosted: Fri Jul 05, 2013 9:09 am  (#1) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4736
A quick seamless-helper to make it easy to draw seamless textures. After installation it adds three entries in "Layer/Swap" so that the layer you work on has its four quadrants, or right/left sides, or top/bottom swapped so that you can work on the "seams" easily...

For instance:
  • Draw on the center (1)
  • Then use the script to swap center and corners (2)
  • Draw again on the center (3)
  • Swap again (4)
  • Swap left/right to work on the vertical seam (5,6)
  • Swap left/right again, and swap top/down to do the horizontal seam (7,8)
  • Swap top down again: finished (9)

Attachment:
Combined.png
Combined.png [ 11.96 KiB | Viewed 9582 times ]


Test:

Attachment:
Sample10.png
Sample10.png [ 7.26 KiB | Viewed 9582 times ]


Caveat and gotchas:
  • The way it's written, it should work on 2.6 (with Python), and may no work in a layer group on 2.8.
  • If you don't come back to the original positions before changing the swap direction, you will be given an occasion to play a low-cost equivalent to Rubik's cube with you own images.

Enjoy.

_________________
Image


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: Helper for seamless tiles drawing/painting
PostPosted: Fri Jul 05, 2013 9:32 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Thank you Ofnuts. :) This is really cool.
Image

Pattern attached

Attachment:
CLOCKS_RD2.pat [156.28 KiB]
Downloaded 198 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: Helper for seamless tiles drawing/painting
PostPosted: Fri Jul 05, 2013 9:44 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Jan 06, 2011
Posts: 26
Awesome! It works perfectly on 2.6.12, and it's much simpler to use than I expected. Thank you so much, this'll be a real timesaver. :)


Top
 Post subject: Re: Helper for seamless tiles drawing/painting
PostPosted: Fri Jul 05, 2013 10:01 am  (#4) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4736
Rod wrote:
Thank you Ofnuts. :) This is really cool.
[ Image ]

Pattern attached

Attachment:
The attachment CLOCKS_RD2.pat is no longer available

Actually even more efficient/useful on random/irregular patterns:

Attachment:
Irregular.png
Irregular.png [ 9.41 KiB | Viewed 9522 times ]


Attachment:
IrregularFill.png
IrregularFill.png [ 28.41 KiB | Viewed 9522 times ]

_________________
Image


Top
 Post subject: Re: Helper for seamless tiles drawing/painting
PostPosted: Fri Jul 05, 2013 11:38 am  (#5) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Whoa! Really cool, ofnuts! I like it! :bigthup

Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Helper for seamless tiles drawing/painting
PostPosted: Fri Jul 05, 2013 3:22 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jul 17, 2012
Posts: 2770
its a bit like magic :hehe

thank you ofnuts, another very useful script !


Top
 Post subject: Re: Helper for seamless tiles drawing/painting
PostPosted: Fri Jul 05, 2013 9:22 pm  (#7) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
I used plasma and the smudge tool to clean up the edges on this one. Worked pretty nicely.
Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Helper for seamless tiles drawing/painting
PostPosted: Sat Jul 06, 2013 6:12 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: Aug 16, 2012
Posts: 4271
Location: Göteborg, Sweden
ofnuts: oooh, thank you!!! :jumpclap i've been wanting something like this for a long time, so good!

_________________


Top
 Post subject: Re: Helper for seamless tiles drawing/painting
PostPosted: Sat Jul 06, 2013 12:32 pm  (#9) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4736
Thanks all for the appreciation... actually on of my life's big mysteries is why nobody did come up with such a script before... unless I overlooked one somewhere...

_________________
Image


Top
 Post subject: Re: Helper for seamless tiles drawing/painting
PostPosted: Sat Jul 06, 2013 12:43 pm  (#10) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2419
ahhh.....

I am sure that (for part) the marked similarity to
layer -> transform -> offset -> offset by x/2 y/2
has been noted ;)

nice plugin though.

_________________
Image


Top
 Post subject: Re: Helper for seamless tiles drawing/painting
PostPosted: Sat Jul 06, 2013 1:58 pm  (#11) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4736
rich2005 wrote:
ahhh.....

I am sure that (for part) the marked similarity to
layer -> transform -> offset -> offset by x/2 y/2
has been noted ;)

nice plugin though.


Augggh :) In any case that also shows me how I can optimize my code... suddenly becomes much simpler :)

_________________
Image


Top
 Post subject: Re: Helper for seamless tiles drawing/painting
PostPosted: Sat Jul 06, 2013 2:00 pm  (#12) 
Offline
GimpChat Member
User avatar

Joined: Jul 17, 2012
Posts: 2770
ofnuts wrote:
rich2005 wrote:
ahhh.....

I am sure that (for part) the marked similarity to
layer -> transform -> offset -> offset by x/2 y/2
has been noted ;)

nice plugin though.


Augggh :) In any case that also shows me how I can optimize my code... suddenly becomes much simpler :)

i like your script a lot better, dabbled will the offset option, but couldnt make much out of it


Top
 Post subject: Re: Helper for seamless tiles drawing/painting
PostPosted: Sat Jul 06, 2013 6:56 pm  (#13) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4736
Uploaded a new version (1.0) on SourceForge:
- now uses the offset() instead of the over-clever cut/merge method, so it works for any layer anywhere
- to work correctly with layers with an odd dimension, will use negative offsets the second time around
- as a consequence there is also a built-in protection against the RUbikc's cube effect, you have to go back to the original to change the swap method
- if the layer is linked, the script will apply to all linked layers with the same dimension and position (ie, all those that exactly overlap the active layer)

_________________
Image


Top
 Post subject: Re: Helper for seamless tiles drawing/painting
PostPosted: Sat Jul 06, 2013 7:17 pm  (#14) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
'Pattern from Image' is similar but different in that it creates a pattern from a single image and saves it in your patterns folder


_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: Helper for seamless tiles drawing/painting
PostPosted: Sun Jul 07, 2013 3:48 am  (#15) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4736
Graechan wrote:
'Pattern from Image' is similar but different in that it creates a pattern from a single image and saves it in your patterns folder



That's a very different animal... it creates a pattern, like "Make seamless" while my script just helps making it...

_________________
Image


Top
 Post subject: Re: Helper for seamless tiles drawing/painting
PostPosted: Mon Oct 17, 2016 5:48 pm  (#16) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
This script is freakn genious.
I was thinking of some hack like extending over the borders and then copying borders over top but its flawed in that you don't know which goes over top of what.
This swapping solved that.... so clever. :yes

Did you also add code to prevent user from scrambling it up? Because i notice i can't swap in a different direction until i do the reverse swap of previous. If so that's even better. At least that's what i think is preventing me from doing stupid swaps.

_________________
TinT


Top
 Post subject: Re: Helper for seamless tiles drawing/painting
PostPosted: Tue Oct 18, 2016 3:31 am  (#17) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4736
Yes, there is some scrambling prevention in the code. The script uses "parasites" to remember what state the layer is in.

_________________
Image


Top
 Post subject: Re: Helper for seamless tiles drawing/painting
PostPosted: Tue Oct 18, 2016 3:45 am  (#18) 
Offline
GimpChat Member

Joined: Sep 20, 2016
Posts: 293
I'd like to edit this plug-in so it appears under the name of 'Seamless Helper' instead of 'Swap', so i can more easily remember and find it.

I found an entry under Registration: menu='<Image>/Layer/Swap' and edited it.
Is that all it takes or is there more code i have to change ?


Top
 Post subject: Re: Helper for seamless tiles drawing/painting
PostPosted: Tue Oct 18, 2016 5:32 am  (#19) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Konstantin wrote:
I'd like to edit this plug-in so it appears under the name of 'Seamless Helper' instead of 'Swap', so i can more easily remember and find it.

I found an entry under Registration: menu='<Image>/Layer/Swap' and edited it.
Is that all it takes or is there more code i have to change ?

Actually for plug-ins such as python or executables you should edit the pluginrc instead.
Its in the userName/.gimp-2.8 folder. Open it in Notepad ++ or some other similar notepad program and search for the word "Swap" and it should show you in the pluginrc file where it is listed as their may be many listings.
Then just change it to whatever you want (as you have in the above post). Save the pluginrc file and reload GIMP. This way you're not messing with the python file at all. Just a suggestion.

_________________
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: Helper for seamless tiles drawing/painting
PostPosted: Tue Oct 18, 2016 12:23 pm  (#20) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
just a splash to remind us of this amazing filter featuring mario bg theme.
Image

_________________
TinT


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

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Seamless brick texture patterns (not helper)

4

No new posts Attachment(s) Helper for creating patterns brick

15

No new posts Attachment(s) Small Tiles - Big Preview for Gimp-2.10.20

0

No new posts Attachment(s) Patterns - Glassy Islamic Tiles

6

No new posts Attachment(s) Bend Text-Logo as helper Ofn-bend-path

75



* Login  



Powered by phpBB3 © phpBB Group