Sunday, March 27, 2011

Making a seamless tile

Hi again!  I'm back!

I thought I'd show you how to make a seamless tile using GIMP.  It's not really terribly difficult but it will give you a chance to learn a few tricks in GIMP that should be fun.  We'll make a simple tile in this lesson and then perhaps make some variations on it in future posts.

Here's a rough outline of what we'll do:

  • Open GIMP and create a new 64x64 image as our canvas.
  • Create a very rough and perhaps a little cartoon-like flower shape and color it in.
  • Create a copy of that cartoon-like flower and split it down the middle both vertically and horizontally
  • Compress the layers we have created into one and then map it as a tile.
The test of a seamless tile is the seams.  If you can see them, you've failed.  So we will look closely and see how we've done.  Ok... Let's go through it in detail now.

Open GIMP and create our canvas:


Find GIMP and start it up then:

  • File->New .... and make the size, width = 64 and height = 64.
  • In the Gimp Layers window press the  "Create a New Layer" icon and choose 'transparent'
You should now have two Layers in your Layers window.... looking like the picture at the right.  (click on it to make it bigger)

Create our cartoon-like flower:


This is the creative part of this technique.  Your flower will not look like mine, and it doesn't matter if it looks really rough.

  • Make sure you have the "New Layer" layer selected in the layer window, then click on the thing that looks a bit like a lariat.  When you hover your mouse over it you will see it's called the "Free Select Tool".
  • Go to the image window and use your mouse wheel to make the white square bigger and then click and hold the left button of the mouse and drag it on the white area to trace the outline of your flower.  As you do so, try to make your selection end up very close to where you started and release the mouse button.
  • Now go to the color selector on the Toolbox window and click on it - then play with the colors to pick a color you like.  As you can see, I picked a nice pink.  :)
  • Now select the Bucket Fill Tool (looks like a dripping paint bucket) and go to the Image window and click within the area you have selected.  
Here's a GIMP-trick you will find useful as you use the Free Select tool.  Let's say that about half-way through your flower is looking like a nondescript lump of something that may be rather... well... smelly.  :(  Here's how to start over.  Finish your Free Selection by taking your cursor up to when you started and clicking... that will complete your selection.  And now press Ctl-Shift-A (or Select->None).  That will clear the selection and let you start over again.  Don't feel bad if you have to do this several times.  It usually takes me 3 or 4 attempts to get something I like.

Another GIMP-trick that may work as well, and is often even better is Ctl-z (Edit->Undo History).  It simply steps you back one step for each time you press it.

The picture below will give you an idea of how mine looks at this stage.


Duplicate the layer and transform it:

  • Now make sure you have your new flower layer selected, and on the Layers window find the "Create a duplicate layer..." icon and press it.  The new layer will be a copy of the first and will be selected.  
  • Go to the Image Window and choose Layer->Transform->Offset then click the "Offset by x/2, y/2" button and then click the Offset button.
Your result should look something like the image we see below:


This is the only tricky part about this process.  So lets look carefully at what we have done here.

We have taken the cartoon flower we created and made a version of that layer that is literally turned inside-out.  If you draw an imaginary line through the middle both horizontally and vertically, then take the upper left quadrant you have created and mentally move it to the lower right.  Also then imagine that you're doing something similar with all the other quadrants and you have what the new layer we have created has done.  With this, we create a diagonal pattern to the fabric.  Since our original tile is square, the diagonal goes off at 45 degrees.   If we wanted some other angle for our diagonal, we could repeat this process with a non-square starting canvas.  You might try it with a 64x128 canvas and see how it works.

Compress the layers and map it as a tile:


Now for the final few steps!

  • On the Image window choose Image->Merge Visible Layers.  Notice that the image window appearance has not changed, but the layers have combined into one.  This is our seamless tile. 
  • Now we will test our tile....  On the Image window choose Filters->Map->Tile.   I have choosen to make the test 640x640.  
And you can see the results below.


Now we will take a look at it more closely and see if we can see any seams.


Nope!!  Not seam to be seen!

Sooooo..........  What do you do with this sort of thing?  Can you spell... F..A..B...R...I...C?    Yes!  How about a nice pink flowered dress?  We'll have to make a dress sometime in the future and we'll use this technique to make the fabric for it.  Well, and perhaps I'll add a few more interesting twists too.  *winks*

robin

No comments:

Post a Comment