Help Support the Baja Engine! Donate to Breezeway Studios!
Tiled Textures


Tiled Textures

To save texture memory (and work for the artist), textures in games are usually designed to tile. To make a roof texture for a house, you make a single small texture of maybe 30 shingles, and then have it repeat 5 or 10 times to cover the whole roof. Making a roof that you shot a photo of tile is actually pretty simple, it just takes time.

Tiling a Texture in Photoshop

Here is a raw texture shot from a camera and cropped; you probably can't see the seams here, but if you put the texture in Softimage and tiled it you'd see the seams.

Now we're going to offset the image so that we can see the seams and fix them. To do this, go Filter>Other>Offset. Set horizontal/vertical to something close to half the size of your image, and 'Undefined Areas' to 'Wrap Around'.

Now we need to fix up the image. Use the Clone Stamp tool to remove the seams. If there are parts of the image that are lighter/darker then the rest and stand out you can use the dodge/burn tool to tweak them. Sometimes you may need to use hue/saturation with a mask applied to fix color shifts accross the image. Sometimes you need to offset the image a second time because you introduced seams in the image at the edges while you were fixing the first set of seams.

Another tip: sometimes when you resize an image in Photoshop it can create a tiny 1-pixel white border around the edge of the image; this can show up in the engine. It's not an engine bug, it's a Photoshop bug and can be fixed by cropping the pixels off and resizing the image again.

Note: Make sure your textures are sized at Powers of Two.

Setup in Softimage

Setting texture repeats and applying textures to objects is discussed in Your First Game.