Tiling 1 : Standard Tiles

Posted by   on Dec 9, 2013  in Articles

A tiling texture is a texture that is repeated many times over a surface. The most common practice when tiling textures is probably creating an image file with its top pixels made to match the bottom pixels and the sides made to match each other in the same way. Sometimes this is called XY-tiling since the texture can be repeated both horizontally, X, and vertically, Y, without showing seams along the edges of repeated instances.


Creating XY-tiles in Photoshop

Let’s say that we want to make an xy tile out of this image.

If we repeat it 9 times over a surface as it is, the repetition is quite obvious. Sometimes this is wanted, but in most cases textures are repeated not to look repeated, but rather to cover a large surface while using less memory than a huge texture would, and still get the same texture resolution per distance unit. To repeat the texture you can often find a setting somewhere at the material or texture mapping settings depending on the software. You can also manually scale up the UVs of your model to extend beyond the 0-1 range. First lets get rid of the large gradient that makes the texture darker at the top.

We copy the layer two times so that we have three layers with the same information. On the top layer we use the high pass filter found under “Filter/Other/High Pass”. This removes big details and replaces them with grey. It is usually best to start with the slider far to the right and go left until the unwanted texture information is gone. If you go too far to the left the details left will get an unwanted bright halo around them.

The middle layer we average to a flat color.

The top layer is set to use the blending mode “Linear Light” with a fill opacity of 50%. Now the result is not grey any more, the fill opacity can be changed to get more or less intense details and the color of the middle layer can be slightly changed if we want another over all color.

At this stage the repetition is less obvious but we still see the borders between repeated instances of the texture and some details are so distinct that they can easily be spotted as a repeated pattern.

We can copy everything that we see to a flattened layer with three hotkey commands: ctrl-a (to select the canvas), ctrl-shift-c (to copy everything we see) and ctrl-v (to paste into a new layer). On a mac, use cmd instead of ctrl. The new layer we will offset horizontally and vertically by half the image width and height in pixels to move the image borders into the middle.

This is how the image looks after doing the offset. The old borders are visible like a cross in the middle.

By clicking the icon the arrow is pointing at, while the top layer is selected, we create a layer mask for it and then we can paint in black in the mask to reveal the underlying texture at the cross and at unwanted details. There are other ways to reach the same goal using the clone stamp, the spot healing brush or content aware fill. I like to use a mask like this because it is easy to follow details in the image while painting. I recommend setting your current colors to black and white and pressing x to quickly swap between them when painting the mask.

Here is the mask, alt-click a mask in Photoshop it if you want to see it like this. Some areas are gray to tone down details and some are black to remove them and completely show what is under this layer.

This is the end result repeated 9 times again. Depending on how many repetitions you will clearly see at the same time in the end it might be a good idea to further brighten or darken some areas.

Here is the difference between our original image at the bottom layer and the end result when they are both repeated.