Seamless Pattern Maker
Operator: Abdulla Al Fahad. How tools are built and checked
A seamless tile is a picture whose left edge continues into its right edge and whose top continues into its bottom, so copies laid side by side show no joins. Almost no ordinary photo does that: the brightness drifts across the frame and objects get cut at the edges, so a straight repeat shows a grid of visible lines. Making a tile from a photo is therefore a matter of rewriting the edges so they agree.
This tool offers two ways of doing it, and a way to see whether it worked. Edge blending keeps the middle of your picture and fades the edges into content taken from the opposite half, which keeps the picture's look. Mirror tiling flips the picture into a 2 by 2 block, which always matches at the edges but looks symmetrical. A seam view slides the repeat by half a tile so that any remaining join is in the middle of the screen.
Key features
- Edge blending with an adjustable blend width, or mirror tiling
- Square or proportional tiles from 128 to 2048 pixels
- Half-drop and half-brick repeat arrangements
- Tiled preview at 25, 50, 100 and 200 percent, with a seam view
- An edge mismatch figure before and after
- Tile PNG, repeated PNG and an SVG pattern with the image embedded
Making edges match
You choose the tile's shape, either a centre-cropped square or the picture's own proportions, and its size: 128, 256, 512, 1024 or 2048 pixels on the longest side. The picture, held at up to 4096 pixels, is scaled down to that size with stepwise halving, so fine detail is kept.
Three methods are available. Edge blending needs a blend width from 10 to 100 percent of the distance from each edge to the centre. Mirror tiling halves the tile size first, so the 2 by 2 block comes out at the size you chose. None keeps the scaled picture untouched, useful when it is already tileable and you only want the offset or the exports.
The repeat arrangement can be a straight grid, a half-drop or a half-brick. In a half-drop every second column is moved down by half a tile; in a half-brick every second row is moved across by half a tile. The exports use the smallest block that repeats by plain translation, which is two tiles wide for half-drop and two tiles tall for half-brick.
Exports are the tile as a PNG, a repeated PNG of 2 to 8 tiles each way with the arrangement applied and limited to 6000 pixels on a side, and an SVG file with one pattern element that embeds the repeat block as a PNG data URI. If that data URI would exceed 6 million characters the page asks for a smaller tile instead. Transparency in the source is kept.
How it works
Edge blending uses the fact that a picture shifted by half its width is continuous across its old left and right edges, because those edges now come from the middle of the original, but has a seam down its own middle; the original has the opposite property. The tool mixes the two with a weight that is 1 for the original at the centre column, 0 at both edges, and eases between them with a smoothstep curve, 3t squared minus 2t cubed, over a distance set by the blend width. Then it repeats the same step vertically on that result, with a half-height shift.
The two passes are done one after the other on purpose. A single weight in two dimensions cannot be right everywhere: the shifted copy has seams through its middle and the original has them on its border, so at the points where those lines meet one of them would always show. Done one axis at a time, each pass is continuous at the centre and at the wrap-around, and the second pass does not disturb the first.
Mirror tiling copies the picture into the top-left quarter, a left-right flip into the top-right, an up-down flip into the bottom-left and both flips into the bottom-right. Each edge of the 2 by 2 block meets its own mirror image, so the colours there are identical on both sides of the wrap-around.
The worst-join figure measures how far the biggest jump between neighbouring columns, or neighbouring rows, rises above the typical jump. It counts the wrap-around pair at the tile's border and every pair inside the tile, so a step left behind in the middle by blending would show up too. On a smooth gradient a plain tile scores close to 90 and the blended tile under 1 at any blend width from 10 to 100 percent; real photos start lower.
Typical uses
- A repeating website background from a scan of paper or fabric
- A game texture, such as grass, stone or sand, made from a photo
- A surface pattern for wrapping paper or textiles previewed in a half-drop
- A kaleidoscope-style pattern from any picture using mirror tiling
Building one
- Drop in a picture. Textures, fabric, foliage and paint work well; images with one obvious subject do not.
- Choose a square tile and a size, and select Edge blending.
- Open the tiled preview and tick Show seams. Raise the blend width until the middle of each tile shows no line.
- Try Mirror tiling if the blend leaves ghosting you dislike.
- Pick a half-drop or half-brick arrangement if you want a less grid-like repeat, then export.
Example
A 3000 by 2000 photo, square tile of 512 px, edge blending at 60 percent
centre crop 2000 x 2000
scaled to 512 x 512
fade distance (512 / 2) x 0.60 = 154 px from each edgeResults
tile 512 x 512 PNG
half-drop block 1024 x 512 (two columns)
repeated x4 2048 x 2048 PNG
SVG pattern one 1024 x 512 repeat block embeddedTips for best results
- Choose textures without dominant features. A lone flower in the middle repeats like wallpaper stamps; an even field of leaves does not.
- Use the seam view first and the 25 percent view second. The first shows joins, the second shows repetition of landmarks.
- If blending leaves a ghost double of an object, lower the blend width or crop to remove the object before building the tile.
- Half-drop breaks up the straight columns that give a repeat away, and is the usual choice for floral and motif prints.
- Export the tile at 512 or 1024 pixels and let CSS or your engine repeat it, rather than shipping a huge repeated image.
Things to check before you rely on it
Edge blending changes the picture. The outer region is a mix of two parts of the photo, so lines that cross the edges can look doubled.
Mirror tiling makes visible symmetry. It suits abstract and organic material but is obvious on faces or text.
Brightness or colour gradients across the photo, such as a vignette, are made seamless but still produce a visible lattice of dark corners; flatten the lighting first.
Tiles are scaled down from the source. A very detailed photo at 128 pixels loses most of its detail.
Common errors and how to fix them
- The SVG pattern is too large to paste
- The embedded PNG over 6 million characters is refused. Choose a smaller tile size, such as 512 pixels, or use the PNG export.
Best practices
- Test the tile in its final place, such as a page background, before using it widely.
- Check the half-drop or half-brick preview at 100 percent for obvious repeating spots.
Frequently asked questions
Which method should I choose?
Start with edge blending, which keeps your picture's character. Use mirror tiling when blending leaves ghosts or when you want a symmetrical pattern.
Will the tile repeat in both directions?
Yes. Both the left and right edges and the top and bottom edges are made to match, and the seam view lets you check it.
What is a half-drop repeat?
Every second column of tiles is moved down by half a tile height, so motifs sit in a staggered pattern. A half-brick does the same sideways for rows.