Friday, April 1, 2011

Making a seamless tile - part two

Hi again!

We're going to make another pink flower tile this time, but much fancier. First, I'm sure you've noticed that flower petals are not really just one color, but instead they are delicate shades, merging from one color to another.  And flowers have that thing in the center, what is it called?  (Pistil and Stamen I think). Whatever it is, its often yellow and we'll make a yellow one for this flower.

We're going to go through the same steps as before with some additions.  I'm not going to repeat the detail from the previous post though.  Instead I'll try to focus on the new GIMP tricks in this post - hopefully you'll be able to put it together yourself.

Sooo.... First let's open GIMP, create a 64x64 canvas to work on like we did in the last post.  Here's what mine looks like... just 2 layers:

That's simple enough.

Now let's make the petals of the flower more interesting.   We're going to shrink the selection by 3 pixels and add a layer for the new size and fill it with a lighter shade of the pink we have above.  Then!  We'll do it again!  Shrink the selection by another 3 pixels, create a new transparent layer and put paint the lighter shade in that layer.  To shrink the selection use Select->Shrink and tell it you want it 3 pixels smaller.

Now if you look at that closely it looks a little ragged around the edges.  So we need to smooth it out.  We'll use something called Gaussian Blur on each layer to do that.  You'll find it in Filters->Blur->Gaussian.  I chose to blur by 2 pixels on the lower (biggest petals) layer and 3 pixels on the other two.  Choose what looks good to you though, your flower is likely different.  Here's my result:

That's much nicer!

Now we need the yellow center, the pistil/stamen.  This is pretty easy - just do what you did before to create the flower petals, but create a round area in the middle that you will paint yellow.  It doesn't have to be centered perfectly.  Heck it doesn't even have to be perfectly round.  Look at mine!

I went ahead did the blurring thing we did above.  Nice!  Isn't it?!

Oh, one thing I forgot to mention.  I also tinted the background layer pink and made it a little less bright.  You may want to do the same.

What we've been done so far is to create a fancier version of the rather cartoon-ish flower we had before.  Now I want to add some 'pop' to this.  Some 3-D effects.  We'll use something called Bump Map in a few minutes, but first we need to do a little preparation.   I'll detail the steps here so its easier to follow.

  1. Click the eye icon on the background layer so that it is no longer visible.
  2. Now make a copy of the large petal layer and click the eye icon to make it invisible.
  3. And make a coy of the large pistil/stamen layer and click the eye icon to make it in visible
  4. At this point you have the original layers visible, minus the background.....Now go to Image->Merge Visible Layers and all of the petal and pistil/stamen layers will be merged into one layer.  (If this makes you nervous, save the file before you do it).
Ok, now it should look something like this:

Note especially the Layers window.... four layers, one visible, our merged layer.  Now we're going to use the large petals layer and large pistil/stamen layer to create masks for the Bump Map.

First the petals layer.  Click on where the eye should be, making it visible.  Then select that layer, making it active and....

  1. Make the layer black and white with: Colors->Desaturate
  2. Then blur the layer rather severely.  Use Filters->Blur->Gaussian ..... I chose 8 pixels and that's probably a good number for you too.
  3. Finally you will want to brighten this - its very grey at the moment.  So choose Colors->Brightness-Contrast and adjust the two controls you see to the right.  I think for mine I moved both up to somewhere between 50 and 60.
  4. Click on the eye and make the layer invisible again.
Next make the pistil/stamen layer visible and active and repeat the above.

Now select the layer that is our merged flower.  Just check - it should be the only visible layer.  If it is not correct this now.  The Bump Map we're going to do next will actually make changes to the layer, so let's make a copy of this layer and work on the copy.   The new layer will now be selected and visible - that's good.

Now for the Bump Map.  We're going to do it twice, once for the petals and once for the pistil/stamen.

  1. Choose Filters->Map->Bump Map.  You will get a dialog window with many choices... The only one we need to look at is the first one that chooses the Bump Map to use.
  2. Click the pull down and select the large flower petal layer we had been working on above.
  3. Notice in the preview window that some subtle shading has appeared - this is exactly what we want.  Press OK.
Take a moment and notice what the Bump Map filter did.  It created a rather nice 3D look on your petals.  So now repeat the process again, except in step 2 choose the pistil/stamen layer we had been working on before.

In the end, you should see something like this:

Pretty nifty!  Isn't it?

Now, you could at this point do the same thing we did before....  Duplicate this layer, divide the duplicate in half vertically and horizontally....  Combine the two with the background layer and create your test tiling.  And there is really nothing wrong with that but we'll do something just a little fancier.  This creates a result where the upper of the split image and the lower part of the split image, both overlay the original.  Since we've added a kind of 3D-ness here though, I'd like to carry that into the end result and make it so there is a kind of interleaving.

To do this we'll create the duplicate, divided layer as before, but then we'l add a layer mask.  (New GIMP trick!) and use it to hide one half of the duplicate divided layer.  Then we'll duplicate that and reverse the layer mask and with some simple positioning of the layers we'll achieve our result.

Ok let's list the steps:

  1. Duplicate the layer and split is as we did in the previous post.
  2. Now right click that new layer and choose Add Layer Mask.  Make it a white layer when you are asked to choose.
  3. Now right click again and check 'Show Layer Mask"  (note that Edit Layer Mask is already checked). The image will become white, showing the layer mask you just created.
  4. In the tools menu choose the Rectangle Select Tool.   Drag your mouse across the lower half of the layer mask.  Your first will not be perfectly accurate, but you will want this to be positioned at 32 on the vertical axis.  (recall that the image is 64x64).  You can use the 'position' on the lower part of the Tools window to see where your selection is.  Move it up or down as needed to make the second position value 32.
  5. Make the foreground color in the Tools window black.  
  6. Select the pain Bucket Fill Tool (the paint can) and click within the selection on the Image window.
  7. Right click the Layer and uncheck 'Show Layer".
Now you will see that the portion of the layer with the white layer mask is visible.  And the part with the black layer mask is not.  Here's a snapshot of the result:

Now one more thing to do:

  1. Duplicate the layer we've been working on.
  2. The duplicated layer will be selected.... Choose Color->Invert.
You should see the layer mask reverse on the selected layer.  Black becomes white, white becomes black.    Now move the layer with the white/black layer mask above our original merged layer and look closely at the result.

Look at the upper corners first and how they interact with the middle.  The corner flowers are overlaying the middle flowers.  Now look at the middle flower and how it interacts with the lower corners.  The middle flower is overlaying the lower corner flowers.   Cool!!

Before we do anything else, let's save the file.  There's a lot of work here and it would be awful to loose it though a simple mistake.

Now, we need to make one layer for our tiling test.  So Image->Merge Visible Layers.  (notice that all three flower layers and the background layer are visible).  Then Filters->Map->Tile  and choose 640x640.   Here's the result:

Click on the image to get a close look at the tile testing window.  It looks pretty good to me!


No comments:

Post a Comment