Dev Tutorial [Textures] Creating Seamless Textures

btv

Veteran Member
Jan 15, 2016
334
Favourite Truck
Scania
Creating Seamless Textures
Using your own, custom textures can help improve the way your maps, buses, splines, objects etc. look, as well as make them stand out from other projects. One option is to use a website such as textures.com which provides a large number of various textures to choose from, most of which already are seamless. Another option is to use images you have taken yourself or from another source. If you go for the second option, it is likely you will have to make those textures seamless. Making seamless textures means that the texture can repeat many times, but you will not be able to tell exactly where it starts and ends. For example:

5b8b8f7ea6a5406a4c22d1f3463fc896.png
This is the original, unedited texture. You may need to zoom in but if you look carefully, you can see that there is a seam in the middle where the texture ends. It is not very obvious in this example, but it can become much more noticeable with different textures.
There are two ways of turning an image into a seamless texture, both of which are covered in this tutorial. Below I have compared results from both methods to show which one looks better.
5b8b8f7ea6a5406a4c22d1f3463fc896.png
This is the texture created using Method 1. While you no longer get a nasty seam in the middle, you can clearly see that the texture has been mirrored. In my opinion this result does not look very good, although you may get away with it in some cases. This is why I recommend you use Method 2 when possible:

5b8b8f7ea6a5406a4c22d1f3463fc896.png
This is the texture created using Method 2. With this texture, it is not obvious where the texture ends, and it does not look mirrored.

For both of these methods, I have only used Paint.NET.

This tutorial assumes that you are already fairly familiar with the software, and the basics of creating and editing textures. It also does not go over how to apply those textures to a 3D model.

1st Method
This is the simplest and quickest way of creating a seamless texture. This method works by selecting half of the image, flipping it and then pasting it on the opposite side. The advantages of this method are that it is fairly simple and does not take a lot of time. However, it produces worse results compared to the other method.

5b8b8f7ea6a5406a4c22d1f3463fc896.png
This is the base image I will use for this tutorial. I took this image off Google Streetview, and then cropped it to only include the area I need.

The next step is to select one half of the image and drag the outermost edge over to the opposite side of the image. You should end up with something like this:
5b8b8f7ea6a5406a4c22d1f3463fc896.png

You can then save it and use it to texture your building/spline/whatever.

This is the final result:
5b8b8f7ea6a5406a4c22d1f3463fc896.png

And this is how it repeats:
5b8b8f7ea6a5406a4c22d1f3463fc896.png

2nd Method
This method is more complicated than the first. It works by swapping parts of the texture around, then blending them with the original image. The advantage of this method is that it produces a much more realistic and convincing result than the first. However, it is more difficult and takes more time.

5b8b8f7ea6a5406a4c22d1f3463fc896.png
I will be using the same image for this method, so that you can easily compare both methods and the results they give.

The first step is to create two new layers. You can name them something like 'Left Half' and 'Right Half' if you wish, but it is not necessary. Then, select the Background layer and select half of the image:
5b8b8f7ea6a5406a4c22d1f3463fc896.png
Then, copy and paste the selected area so that it is on a new layer and on the opposite side of the image to where it was originally. You should end up with something like this:
5b8b8f7ea6a5406a4c22d1f3463fc896.png
Repeat the process for the other half of the image, so that you end up with something similar to this:
5b8b8f7ea6a5406a4c22d1f3463fc896.png
Select the eraser tool and set the brush width to something like 100 and the hardness to 0%. Then, erase the inner parts of each layer, making sure to start in the middle of the image. This is to make the layer blend in nicely with the original image in the background. Do this for both layers.

If you hide the background layer, you should end up with something that looks similar to this:
5b8b8f7ea6a5406a4c22d1f3463fc896.png
Finally, make sure that all the layers you need are selected, and merge them into one. You can then make any further edits to the texture and save it. If you wish to make your texture repeat both vertically and horizontally, you will now need to repeat this whole process for the top and bottom halves.

This is the result:
5b8b8f7ea6a5406a4c22d1f3463fc896.png

And this is how it repeats:
5b8b8f7ea6a5406a4c22d1f3463fc896.png

Sorry if some things don't make sense, it's my first time writing a tutorial. If you have any questions feel free to ask! :)
 

whistlehead

Alias Mr Hackenbacker
Staff Team Leader
Forum Moderator
UKDT
Premium Subscriber
Dec 10, 2015
1,379
Nice tutorial :)

I'd like to add that this simple little plugin can be an aid to making seamless textures in paint.net: Seamless Texture Helper Plugin - it's not magic and I don't use it exactly the way it's described, instead I use it as a means of making sure the texture lines up across its borders. When applied, you know that the outside edges line up for sure, so all you have to do is deal with the transitions which have been moved to the central area of the texture, then apply the modifier again and you're done :) it just means rather than dealing with unknown transitions on two sides and trying to make them match, you can deal with a visible transition in the centre of the texture.