Contents ~ Posts ~ Free Images ~ GIMP 2.8 Shortcuts ~ Studio Dalio Gallery

10 April 2015

How to Create Tiling Patterns in Inkscape – The Grid Methods

Patterns that tile can be fun to create and are useful for filling large spaces, like fabric, comforter covers, rugs, and so forth. There are many different methods that can be used to create these sorts of patterns. Herein I describe some simple methods that I think of as the grid style and which I used to create these summer-themed tiling patterns.


Simple Square Tiled Pattern

Matching Edges Tiled Pattern

Offset Tiled Pattern


For the three methods described below, I used 600 x 600 pixel squares as my base units. I used the Create rectangles and squares tool (F4) to draw two squares. For each one, I set the stroke width to 20 and the size of the square to 600 x 600. I made the squares slightly different shades of green to get a two-tone effect for the background.

To allow for possible future changes to the color scheme, I used Alt+D to copy each square, then pushed the original squares to the side. This method of copying creates clones. Any change to an original object is reflected in any clones it has, so changing the color of my eventual checkerboard can be accomplished by changing only two objects.


A – The Contained Rectangle Method


The simplest method of creating a tiling pattern is to set up a rectangular area and fill it with an integral number of units.


Step A-1 – Set Up the Page Size


Since I plan on keeping the checkerboard pattern to be the background, I need an even number of squares so that they'll alternate light and dark properly when tiled. I decided to work with a 4x4 grid, so I set my Page size (File > Document Properties) to 2400 x 2400. I also ticked Border on top of drawing so I can keep an eye on the pattern border. This becomes more important with the later methods.

Document Properties - Page


Step A-2 – Create a Checkerboard


Setting up a checkerboard of squares makes it easy to place objects into the pattern. I copied the clones of my original two squares (using Ctrl+D) to make as many copies as I needed to fill out the width of the page. The Align and Distribute dialog (Shift+Ctrl+A) gives you access to great alignment tools for creating rows of squares that just touch each other. I selected all the squares for a row, making sure they overlapped slightly along a vertical edge, then set Relative to to First selected [1], clicked on Align top edges [2], then clicked on Move objects as little as possible... [3] to move the selected objects so that they just touch.

(See Alignment and Distribution of Graphic Elements in Inkscape for detailed information on aligning objects.)

Aligning Squares

I created two rows with one pattern and two rows with a complementary pattern and aligned them using the above method to make a checkerboard, then centered the checkerboard on the page. I used Group (Ctrl+G) as necessary to make alignment easier.

Four by Four Checkerboard

Once the checkerboard was in place, I made sure all of the squares were individually selectable by selecting them all and using Ungroup (Shift+Ctrl+G) as many times as necessary. Then I made sure that all of the squares were at the bottom of the object layers so that when I copy an object to a square, the object will show up on top of the square. This is done by selecting all of the squares and either hitting the End key on the keyboard or selecting Object > Lower to Bottom.


Step A-3 – Place Objects on the Checkerboard


I had previously created several summer-themed objects such as beach balls, flip-flops, ice pops, and a glass of lemonade. I sized each one to 480 pixels along its longest dimension so that it would fit nicely inside a square, then I used the squares to place these pattern objects.

Before starting placement, I set Relative to in the Align and Distribute dialog to First selected. Then I performed the following actions for each pattern object:
  • Left-click on a square
  • Hold down the Shift key and left-click on a pattern object
  • Click on Center on vertical axis [4]
  • Click on Center on horizontal axis [5]

This placed each pattern object on the center of its associated square.

Aligned Objects

Once the pattern was created, I exported the page in a useful size to a PNG file. Now I could either use GIMP to tile it, or I could upload it as a single tile to a print-on-demand site that has a tiling function for its products.

Export Bitmap Dialog

I recommend tiling the pattern in a tool like GIMP to make sure that the edges match up properly before actually using the pattern anywhere.

Simple Tiled Pattern

Sometimes I delete the grid and export the pattern with a transparent background so I can put it over another background in another tool.

Simple Tiled Pattern with Transparency


B – The Matching Edges Method


To illustrate a method that requires pattern edge matching, I decided to create a pattern similar to the one in Section A, but with an odd number of objects along each side. In order to keep the alternating light and dark squares, it is necessary to overlap the squares and their contained objects on the edges of the pattern over the edges of the page.


Step B-1 – Set Up the Page Size


Keeping with my 600 x 600 pixel squares, if I put five squares across and down, that yields 3000 x 3000 pixels. To have opposite edges match up, I need a page that's 2400 x 2400, which is calculated from 3000 minus 300 for half of a square on one side and minus another 300 for half of a square on the opposite side. How convenient! My page size was already set to those dimensions in Section A.


Step B-2 – Create a Checkerboard


I created a 5x5 grid of squares using the method outlined in Step A-2 and centered it on the page, remembering to ensure that all of the squares were individually selectable by using Ungroup (Shift+Ctrl+G) and that all of the squares were at the bottom of the object layers (End key) so that when I copy an object to a square, the object will show up on top of the square.

Matching Edges Grid


Step B-3 – Place Objects on the Checkerboard


I've found it's a good idea to do all of the edges first. It's important to note that the same object must be in each corner square, plus the objects along the top row must be the same as the objects along the bottom row and the objects in the left column must be the same as the objects in the right column. I used the method described in Step A-3 to create this grid.

Fill the Edges First

I filled in the rest of the pattern after the edges were done.

Final Matching Edges Grid

I exported the page and tiled it with GIMP to make sure it looked OK.

Matching Edges Tiled Pattern

Again, I also deleted all the squares and exported the pattern with a transparent background so I could put it over another background in another tool.

Matching Edges Tiled Pattern with Transparency


C – The Offset Lines Method


A third style of tiling pattern requires the use of offset grid lines, just like you would use for making polka dots. For this pattern, I decided to stick with the 5x5 concept. All I had to do was move two of the rows over by half the width of a square. I selected the second and fourth rows, grouped them into one group, then opened the Transform dialog (Object > Transform), set Horizontal [6] to 300 and clicked Apply [7].

Offset Lines Grid

Then I ungrouped these two rows and deleted the two dark squares on the right since they're outside the page. I made sure all the squares were individually selectable and were at the bottom of the object layers.

As before, I positioned objects on all the overlapping edges first. All four corners must contain the same object, plus the top and bottom rows must contain the same objects in the same order and orientation. And, in my example, the middle row must have the same object at both ends.

Offset Lines Grid Edges Filled First

After that was done, I filled in the middle and exported it, then tiled it in GIMP to check it.

Offset Grid Tiled Pattern

I also created a transparent background version.



Using these basic grid patterns, you can make variations based on non-square rectangles to adjust the spacing. This generally requires the document size to also be a non-square rectangle. Simply do the math to ensure that the objects on the edges of the pattern will match up correctly.

(Please note: All images in this tutorial are provided for instructional purposes only. I am not giving permission for copying, transmitting, selling, or otherwise using these images for any purpose other than practicing using Inkscape. Exception: Posting an unaltered image to your website for display only with credit given to me and a link provided back to this post is allowed.)

No comments:

Post a Comment