I've recently been using a technique to take photographs and turn them into seamless textures (for use in images, games, or whatever). There are various tutorials around that explain parts of this process, but I haven't seen one for Gimp that takes you from start to finish, so here goes:
BEFORE YOU START: Download and install the Gimp High Pass Filter script, here:
http://registry.gimp.org/node/7385
There are instructions for installing it in the comments below the plugin.
Step 1: Take a photo of some repeating surface with your digital camera. Stone, grass, brick, bark, whatever -- it doesn't matter, provided that it's something you can make a repeating pattern out of. High resolution is best. I'm using brick for this tutorial because the perspective warping problem is so obvious.

Step 2: Notice how the center of the image "bulges" outward. We need to correct this before we can do anything else with the image. Go to Filters -> Distorts -> Lens Distortion, and adjust the "Main" slider until the image appears flat.


Don't move it too far or your image will appear to curve inward instead. Note that if your image has no obvious bulge and doesn't have any clear straight lines, you can usually skip the perspective correction steps and go straight to step 6.
Step 3: If you're dealing with an image that has straight lines in it, you may still notice minor problems with the perspective of the image. In this example, the lines along the bottom are slightly crooked compared to the ones along the top. Create some guidelines (make sure View -> Show Guides is checked) by dragging them off the top and side rulers. This should give you a pretty good picture of where your image isn't straight.

Step 4: Select Tools -> Transform Tools -> Perspective.

A dialog box will appear. Move it out of the way or minimize it. Now make small adjustments to the corner until your lines line up with the guides.

When you're satisfied that your lines are no longer crooked (they'll never be perfect, but try to get as close as is reasonably possible), click the Transform button on the dialog that popped up. You may need to sacrifice some of your edges here, but that's okay. Next step, we're going to crop the image.
Step 5: Use the move tool to drag your guidelines off of the image (or hide them from the view menu) because we don't need them anymore. Use the rectangular selection tool to select a *roughly* square area of the image, taking care to make sure that the area you select will tile correctly. It's more important that it tile well than be perfectly square.

Now crop the image to the selection with Image -> Crop to Selection.
Step 6: Now, scale the image into a perfect square using Image -> Scale Image (or, if there are no obvious patterns, simply reduce the canvas size and pick a good section of the image). Make sure the chain icon is deselected, and change the pixels value to the next lower power of two that is smaller than your current image. (1024x1024, 512x512, 256x256, 128x128, etc).

After that, get rid of the layer outside the image by selecting Layer -> Layer to Image Size.
Step 7: I've applied an Offset to the image to show you something (don't do it yet).

Notice how some sections of the image are darker than others. This particular image doesn't have too much of that effect, but you'll find that some images do. We're going to use the high pass filter you installed to fix this issue. Click on Filters -> Generic -> High Pass Filter.

Adjust the filter radius so that it's larger than the small features in your image, but a good bit smaller than the image itself. In this particular case, 150 pixels seems to work well, but you may want to experiment a bit. Change the mode to "Redrobes" and click OK.

This should even out the colors somewhat, making the image far easier to tile.

Step 8: Now, offset the image by clicking Layer -> Transform -> Offset. On the dialogue that appears, click the "Offset by x/2, y/2" button and make sure Edge Behavior is set to "Wrap around", then click "Offset". Notice how the colors match up a lot better than they did in my example in step 7.


Step 9: Now for some fun. Select Gimp's healing tool (it's the two yellow bandaids in a X shape) and use it to smooth out the seams in the image.

Note that while my screenshots are zoomed way out, you may want to zoom in closer so you can see the details. To do this, control click on one area in the image to sample from, and then paint over the seams (if you're working with a high resolution image, you may want to choose a larger brush size). Choose your sampling area carefully! You want to pick something that's similar to the area where the seam is. You also want to make sure you don't sample the same area too many times, or there will be obvious repetitions in your image. When you can't see any more seams. Offset the image again (but this time by some other, unrelated number, like 300 or so) and repeat.
And that's it! You should have a seamlessly tiled image. :)

You can grab a copy of my completed one here:
http://opengameart.o...t/brick-texture
Peace!
Bart
EDIT: Hopefully the images are fixed now. Sorry about that.

Help













