04/09/02 @894 |
This tutorial is about creating seamless textures out of photographs. There's a simple technique that allows you to create seamless textures. A skill any 3D modeler or game designer should be familiar with. I'll show you how I turn the photograph below into a texture that will seamlessly tile horizontally. (I apologize for the poor image quality, but I had to compress them quite a bit to save some bandwidth).
Step 1: the source file
![]() The original photograph, 2240x1680 pixels |
texture_full.jpg (1.6 mb)
You might want to grab it and tag along while I go through all the steps. I think it's easier to follow if you open up photoshop and follow my every move
. You can use this technique in most photoshop-like programs but it's written with the photoshop tools and functionality in mind.
Step 2: the cutout
![]() this is the part we'll use for the texture |
I wanted to create a texture for a wall, so I decided to use the whole thing. When making game textures, which are relatively small, you can also choose to use just a section of the wall. Since the source file is of such a high resolution, you'd be able to keep some more of the details that would otherwise be lost by the resizing...
Small note: we've not resized the image yet, keep it high res for now.
Step 3: deperspectivalising
![]() transform the image to get rid of the perspective. |
Since you're working on a high resolution, it's not a big problem to transform the image a bit. So select the whole image (ctrl + a) and goto Edit > Free transform (ctrl + t). Scale the image so the parts beyond the top and bottom of the wall fall off. All that remains is the end of the wall where the ground starts in the bottom right corner. Press ctrl while you grab the tranform point, this allows you to distort. Drag this point down a bit until the end of the wall dissappears from the screen. Basically what you've done now is you've corrected the perspective, making this face of the wall a perfect rectangle, which is exactly what we need if we want it to be a texture.
note: I've noticed that I cropped the image a bit to loose the dark gap on the right side of the image. It'll make it much easier to get the texture to tile seamlessly.
Step 4: some cloning
![]() we need to clone this part, to get rid of the shadows at the top |
Take the rectangular merquee tool and set the feather to 12 px. Select the part of the wall you want to clone. Since you can't select outside the canvas of your image, you'll get the feather effect at the top of the wall too, but we don't want that. So make the selection a tad bigger and then drag the selection outside you screen, that way it won't feather at the top, only at the sides and the bottom. Now press ctrl + alt + shift and drag the selection to the right. Ctrl makes you move the selection, add alt and you'll move a copy of the selection and add shift to constrain the movement to 45% increments. Now cover the whole top in clones, don't worry too much about tile effect since you'll hardly notice it. By making one clone overlap more than another you can break the repetition a bit.
Step 5: removing the seam
![]() here's that devilish seam sitting right there in the middle. |
To remove the seam we'll use just about the same approach, only we make the edges overlap a bit so we can 'paint' with the photomaterial by using a mask and the airbrush tool. Let me show you how I do this.
Step 6: copy and paste
![]() we copy the layer and make a small strip overlap the left side. |
Click the marquee tool and drag the layer to the left while pressing ctrl and shift to constrain the movement. Drag the layer to the left until only a small strip is still visible. Now we basically have two textures that overlap eachother a bit. Now we need to get rid of the seam and we're halfway done.
Step 7: paint that seam away
![]() using a mask and the airbrush tool with a soft 'brush' we can paint away the seam. |
Step 8: find the seam
![]() find the seam... |
Step 9: crop and voila!
![]() invert the selection and crop the image to make it seamlessly tileable. |
Once you've cropped the image, your texture should tile seamlessly, but only horizontally. At this stage you can use the same technique to make the texture tile vertically. I'm not going to do this because this texture was meant for a wall and doesn't need to be tiled vertically. Let's make some final adjustments before we resize our texture to the dimensions we need.
Step 10: locate imperfections
![]() the white marks mark the seam |
The tricky part is getting rid of the big, rough crack on the right side of the image. You can cover it up quite easily by using parts from the texture. The clone tool work pretty well too, if you know how to use it.
Step 11: spicing up the contrast and colors
Well I'm more or less done. I've made two variations of the texture by playing around with the clone tool. I also tweaked the colors a bit using image > adjust > color balance (ctrl + b). I also added a bit more contrast using image > adjust > brightness and contrast. It's easy to overdo this though, so contain yourself. Now we can finally resize the image. I need them to have dimensions of a multiple of 16 since I will use them as Counterstrike map textures. When your source image is high res, you can mess with the proportions a bit.

Aftermath
Of course the textures above can still be improved, there are still details in it that will create that 'repeat-effect' when you tile the image. It also depends a lot on the type of texture you're making and the amount of details like cracks and color variations in the texture. The real pro's still paint their own textures using photo's only for reference... But for the less skilled, I'd say this is a very nice alternative
.
- Martin
To write a comment you need to be logged in
If you're not a registered member, click here to sign up.Copyright © 2000-2009 All rights reserved
This site is a property of Brothers in art For more information and support, contact .













04/09/02 @920
04/10/02 @984
http://www.i-tex.de
04/10/02 @985
04/10/02 @405
04/10/02 @737
04/12/02 @446
04/12/02 @882
04/14/02 @459
04/15/02 @404
Thanx...
04/16/02 @055
04/18/02 @477
04/20/02 @417
04/24/02 @647
04/28/02 @271
06/05/02 @579
06/10/02 @624
09/05/02 @321
12/28/02 @671
05/12/03 @662
01/15/04 @867
03/24/05 @881
You dont even give the novice any clue as to which buttons to select..
As a novie/noob I was stumped by stage 4, and once it got 5 and 6 forget it, you don't even show what the person is supposed to click or do, you just say do this and do that.
You forget a novice doesn't know there way around the app.. they need STE BY STEP instructions all the way until it becomes second nature..
Somehow I dont hink that tutorial is going to be used by many begginers at all.
Signed, One peed of novice.
02/05/06 @372
In one step, the image has been cut in two and the sides flipped, the next, they are back together again and you dont even mention that fact. Your other reference photos dont show the full image, so most people have no idea what part of the image you are painting on or using Layer Mask on.
It was extremely frustrating to follow your tutorial, and in the end I gave up. Please, next time think about what you're writing, include facts about the image that you may fail to tell us (the image has been put back together now) and show the whole canvas when you want to highlight a point or show what you're doing.
03/24/06 @042
07/19/06 @452
All in all: Keep up the good work!
08/09/06 @469
Just one problem though : if you want to make game textures you have to make them perfectly square or rectangular with proportions based on powers of the base number 2. So, 2,4,8,16,32,64,128,256,512 or 1024 at most. Which means that the proportions of the width and high are usually 1 X 2, 1 X 1, 1 X 0.5, 1 X 0.25 and so on.
When you crop the image after removing the seams, I have found that the proportions don't match up to these specifications, so when you resize the image you can't get rectangular proportions like for instance 64 X 128 or 256 X 1024. Resizing such an image doesn't help either, because the whole image gets distorted.
I have tried to use grids and rulers in Photoshop to drag the layers horizontally and vertically the same amount of pixels, but you have to be very careful and you have to zoom in on the image a lot. I've noticed a few times afterwards that it can still go wrong, so it is quite a hit and miss type of thing.
08/09/06 @483
On the other hand, I have tried the above method a few times and I think it is way easier to work with and it guarantees a much better result. Plus, you don't need somebody else's textures "to cover things up". So, I don't get what you "offset-clone brush" fanatics are getting at when you say the offset method is better. I rather think it is a lot more time-consuming and it really gets annoying after a while.
So apart from the aforementioned problem, this is a really excellent tutorial. Exactly what I was looking for for ages. Keep up the good work !
08/15/06 @018
11/18/08 @707
03/27/09 @316