It is currently Wed Oct 22, 2014 7:54 pm


Latest GIMP Scripts & Plug-ins

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Seemless patterns with any shape
PostPosted: Wed Feb 08, 2012 9:38 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Aug 24, 2011
Posts: 1782
Location: Dallas, TX
I haven't seen many tutorials like this so I thought I would throw a simple one together for anyone who does not know how to do this.

In just a few simple steps you can make your own seemless patterns using just about any shape you choose. I will show you how to do this in 10 easy steps.

Step 1
With Gimp open, go to File>New and open a new image. Set the size to 50 x 50 and then click on Advanced Options to set the resolution to 600 ppi.

Image

Step 2.
This is a very small image so we are going to have to adjust our view so we can see what we are doing. Go to View>Zoom and select 1600%, then do this again and this time select Zoom Out. This will make your image 1100% and easier to manage.

Image

Now, that’s better. Let’s make some guides to help us make things more precise.

Step 3
To make guides, we need to go over to the left side of our image window and place the mouse cursor on the part with the ruler. Hold down the left mouse button and “drag” to the right as you watch the ruler at the top. You will see a vertical dotted line moving with your cursor, that’s your guide. Keep moving the guide until it is exactly at 25 on the top ruler. This will place a vertical guide in the exact center of your image. Do the same at the top ruler, dragging a second horizontal guide down until it is exactly at 25 on the left ruler. Your two guides should now intersect exactly in the center of your image. If you messed something up, don’t worry, you can always select the Move tool and in the tool dialog, tick the little circle where it says “Pick a layer or guide” and then use your mouse to select, drag and adjust the position of the guide.

Image

Step 3.
I’m, going to use a really simple shape to illustrate how this is done. Now that we have our guides to tell us where the center of our image is, select the Rectangle Select tool and in the tool dialog, check the two boxes that say “Expand from center” and “Fixed”. The Fixed drop down menu should already be at the default “Aspect ratio”. Change your view setting to 1600% to make the next part easier.

Image

Place you mouse cursor exactly in the center of your image where the two guides intersect. If you look at the image above in the bottom portion of the Rectangle Select tool dialog, you will see two boxes underneath the word Size. You need to watch these boxes closely as you hold down the left mouse button and drag about 45 degrees diagonally, in any direction, until the size in the two boxes say 10 pixels, then let go of the mouse button. You’ll see a bunch of “marching ants” moving along the outside edge of your selection and four smaller squares at the corners. If you don’t get it right on the first try, you can go back and manually type in the number to correct it, and make your selection exactly 10 pixels.

Image

Step 4.
Ok, we have a 10 x10 pixel selection active and we need to make our first shape. Go to Layer>New Layer and in the dialog that pops up, tick the little circle in front of Transparency and at the very top type in “pattern” then click OK.

Image

You will see a new layer appear in the layers dialog named “pattern”. Make sure your Foregound color is set to Black (000000), then select the Bucket Fill tool. In the tool dialog, tick the little circle in front of “FG color fill” if it is not already selected. Place your mouse cursor in the middle of your selection and click one time to fill it with your Foreground color. Now we have a black square for the first part of our pattern.

Step 5.
If you look closely you will see that your selection is still active because you can still see the “marching ants around your selection. We need to change our view setting back to 1100% again so we can see the corners of our image. We’re going to reposition the selection for the next part of our pattern. To move the selection, reselect the Rectangle Select tool, and click in the middle of the selection one time to select it. You should see the four little boxes appear again in the corners of the selection. Now we can move it. With the mouse cursor in about the middle of the selection, hold down the mouse button and drag the selection into position to where the little cross in the center of the selection (indicated the exact center of the selection) lines up exactly with the corner of our image.

Note: Patterns that are truly “seemless” means they repeat with no discernable lines, edges, or mirroring distortions making the fill area appear to be one pattern instead of several repeated patterns. To accomplish this we need to remember there will be this same pattern on all four sides of this one. since our middle square is 10 pixels square, the corners will have to be ¼ this size or 2.5 x 2.5 pixels for this particular image.

In addition, we cannot enter a size in decimal increments for pixels, so we will use the crosshair in the center of the selection as a guide to place it exactly where we need it to be.

Your selection should look something like this with one fourth of the selection covering our image. If it is not exactly right, your pattern will not be symetrical.

Image

The screenshot does not pick up the little crosshair in the center of the selection but you will be able to see it as you move the selection. Select the Bucket Fill tool again (the FG color should still be set to Black) and click on the little square in the corner where the selection overlaps the image to fill it with Black.

When we filled the selection, it filled all of the selection including the part that is not visible outside of our image. We need to resize the layer to get rid of the excess outside of our image. Even though you can’t see it, it is still there and might interfere with our final results, so go to Select>Select None, then Layer>Layer to Image Size.

Step 6
We don’t need the guides anymore so go to Image>Guides and select Remove all guides.
Let’s also change our view setting to 800% for the next few steps. To get the little square in all four corners we can save a lot of time by just duplicating and flipping the layer. Go to the bottom of your layers dialog and click on this button to duplicate the layer.

Image

Now go to Layer>Transform and select Flip Horizontally. You will see the “pattern copy” layer appear in the layers dialog and you will see the little black square appear in the opposite corner of your image.

Image

Go to Layer>Merge Down, to merge these two layers.

Step 7.
Now duplicate the layer again and this time go to Layer>Transform and select “Flip Vertically”. Go to Layer>Merge Down again and your pattern is complete! Just a couple of things left to do.

Step 8.
Right click on the white background layer and select Delete Layer. You should now have a single layer in the layers dialog. We are now ready to save our new pattern.

Image

Step 9.
This will be a Gimp pattern that you can use with your Bucket tool once we’re done, so
Go to File>Save As and when the Save dialog will pops up, enter the name of your pattern with .pat after it, for example “Shape_1.pat”. Go to the bottom of the Save dialog and in the drop down menu, select Gimp pattern (*.pat).

To be able to use this pattern it will need to be placed in your Gimp “user” patterns folder. I’m using Windows XP and Gimp 2.6.11 so the screenshot below shows what to do for my Operating System and my version of Gimp. This will vary depending on your OS and Gimp version. Navigate to your Gimp user folder and click OK to save your pattern.

Image

Step 10
Now that our new pattern is saved, the next time you open Gimp your pattern will appear in the patterns window that pops up when you click on the sample pattern in the Bucket Fill tool dialog. However, if you want to use it right now you will have to “refresh” your patterns.

Click on the Bucket Fill tool and tick the little circle that says “Pattern fill”. When you click on the small pattern sample another window will pop up with several patterns. Go all the way to the bottom and find the little bucket icon and click on it.

Image

When the patterns window pops up, go all the way to the bottom again and click on the two little arrows to refresh your patterns and make your new pattern available.

Image

Your new pattern is available to use right now without having to close and re-open Gimp. You can create similar patterns with the Ellipse Select tool to make circles or you can arrange them in a squared pattern instead of offset similar to the examples below.

Image

Image

You can also change the spacing between the shapes and decrease the overall size to make your pattern appear more “dense”.

I hope you found this tutorial helpful. Now go try out your new patterns.


Attachments:
Making Seemless Shape Patterns.pdf [371.81 KiB]
Downloaded 75 times

_________________
Image
Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Profile  
 
 Post subject: Re: Seemless patterns with any shape
PostPosted: Wed Feb 08, 2012 10:18 am  (#2) 
Online
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 12022
nice job Drac.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Seemless patterns with any shape
PostPosted: Wed Feb 08, 2012 10:59 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Aug 24, 2011
Posts: 1782
Location: Dallas, TX
Thanks Molly. I was pretty much writing it for beginners and that's why so much detail and screenshots.

I also had an ulterior motive in doing this one. I have a five part series planned for doing different stuff with metal and I will be using several of these types of patterns. I have a couple of tuts done and in the middle of the third. When I get to the fourth one I'll start posting them.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Seemless patterns with any shape
PostPosted: Wed Feb 08, 2012 11:03 am  (#4) 
Online
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 12022
Yes it is a good idea to keep new gimp users in mind when we make tutes cuz we can't take for granted that they know what we are talking about. Anyway, cool

_________________
Image


Top
 Profile  
 
 Post subject: Re: Seemless patterns with any shape
PostPosted: Wed Feb 08, 2012 1:31 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 6607
Another way is to center your object on your canvas, dup, and then do layers>transform>offset> and click the x/2,y/2 option; do this quite often. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Profile  
 
 Post subject: Re: Seemless patterns with any shape
PostPosted: Wed Feb 08, 2012 5:28 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: Aug 24, 2011
Posts: 1782
Location: Dallas, TX
You are quite correct, however I have found that method only works on some patterns like the simple ones I showed in my tut. More complex patterns require the knowledge of how to do them manually in order to make adjustments such as building a honeycomb or hex pattern. Those end up being asymetrical in order to get them to repeat seemlessly. In retrospect, perhaps I should have mentioned that in my tut.

When I first started out learning how to do things in Gimp, I always wondered how some of the scripts and filters worked. I wanted to know how to do them manually, step by step so I could learn how things worked rather than just hit a button.

I know you are a filter guy and I'm certainly not allergic to doing things an easier way either, in fact I like just hitting the button and it's all done for me. I just wanted to show the mechanics of how to do it the hard way. Don't get me wrong Lyle, I mean no disrespect and I'm certainly not offended by your valid comment. I simply wanted to point out my reasoning behind writing it the way I did.

I have learned so much from everyone here over the last year and a half, I felt like it was time I gave back a tad. (sorry, I got so long-winded)

_________________
Image


Top
 Profile  
 
 Post subject: Re: Seemless patterns with any shape
PostPosted: Wed Feb 08, 2012 8:08 pm  (#7) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 6607
None taken; just didn't see why you were doing it your way until you explained your reason more. Trust me that I understand you when you take into consideration certain types of textures no doubt. Circle stacking textures require a lot more thought too. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Profile  
 
 Post subject: Re: Seemless patterns with any shape
PostPosted: Wed Feb 08, 2012 9:05 pm  (#8) 
Offline
GimpChat Member

Joined: Jul 11, 2011
Posts: 111
I am new to Gimp and played around some with patterns at beginning from some posted youtube vid ( I think ). I am new to try to arrange pixels...I've dabbled but never really learned the mechanics and theory why things wor the way they do. This certainly goes into more detail, (especially the bit about quartering the corners) and I thank you for posting it!

Early on when I started with Gimp last year, I got so curious about patterns I made a grid of lines and printed it out so I could try and map out some ideas for patterns. I failed, couldn't quite get the results I was looking for but got closer at least. From this I know at least some of the reasoning behind it and that is awesome.

Nice trick to throw in those round shapes at the end btw, I am now completely baffled how to deal with pixelation with the round selector. When I fill my elliptical selection the edge go square on me but I do like mysteries so I am try to sort this out.

*nevermind the pixelation thing....sorta that out...is the morning here...thought I looked at the dot in 100% resolution before posting....but this heart thing...oh my *


Top
 Profile  
 
 Post subject: Re: Seemless patterns with any shape
PostPosted: Thu Feb 09, 2012 1:16 pm  (#9) 
Offline
GimpChat Member
User avatar

Joined: Aug 24, 2011
Posts: 1782
Location: Dallas, TX
Thank you for the kind words WW. You are exactly the level of experience this tut is written for and I'm flattered that you liked it so much. I feel vindicated with my reasoning. If you ever need any help with anything specific, please don't hesitate to post it here. There are folks here a lot more experienced than I am that are ready and willing to help.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Seemless patterns with any shape
PostPosted: Thu Jul 26, 2012 7:55 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: Jul 17, 2012
Posts: 2806
Great and very useful tutorial Draconian !

Two questions:

1. can you make a pattern in any size you want or is there a restriction ?
2. why did you set the dpi to 600 ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

* Login  

* Subscribe to Gimp Chat's RSS Feed    * Subscribe to Gimp Chat's Tutorial Feed    * Subscribe to Gimp Chat's G'MIC Feed


Powered by phpBB3 © phpBB Group