It's free to join Gamasutra!|Have a question? Want to know who runs this site? Here you go.|Targeting the game development market with your product or service? Get info on advertising here.||For altering your contact information or changing email subscription preferences.
Registered members can log in here.Back to the home page.

Search articles, jobs, buyers guide, and more.

By Mark Peasley
Gamasutra
[Author's Bio]
October 24, 2001

Introduction

Making a Simple Tileable Texture

The Blend Set

Printer Friendly Version
 

This article originally appeared in the September 2001 issue of Game Developer magazine.

Letters to the Editor:
Write a letter
View all letters


Features

Tiled Terrain

The Blend Set

At the most basic level, there are only three additional textures needed to create a blended set. The entire set contains five tiles: two flood fills and three transitions. For clarity's sake, I'll refer to them as the one-fourth blend, the one-half blend and the three-fourths blend. With these and a tiled environment, you can create any sort of varied coastline required. However, it's good to note that making three or four variants of each of these textures will make the transitions from one texture to another much less visible and more natural-looking.

First, make the one-half blend tile. To create this tile, place the stone texture on Layer 1 or the Background layer in a new file you've created in Photoshop. Next, open and copy the lava texture into the clipboard. Paste the lava into the new file as a second layer over the stone.

The next step is either to add guidelines or to set your grid to show you where the 128-pixel point is on the side of the texture. Once you do this, select the top half of the texture, which should be a 256x128 selection box. On the layer mask, fill the selection with black to make it transparent and hide the texture under the selection. Now it's time to go into the texture and add some randomness. In the case of the stone texture, I tried to follow some of the natural contours of the rock. By alternating between black and white on the layer mask, I was able to add or subtract stone to the composite image as needed (see Figure 6).

Figure 6 (left). The one-half blend texture. Note that the transition point on the edges is at exactly the 128-pixel point. Figure 7 (right). The one-fourth blend transition texture.

Avoid eliminating or altering the pixels at the very edge of the texture on either side. If you do, you won't have a tiled texture anymore. Also, try not to get too dramatic in the uniqueness of the transition. If, for instance, you decide that a big pool of lava would look good right in the middle of the transition, you will find that the distinctness of this element becomes apparent when the tile is repeated. If you are using multiple variations, then a unique tile every so often works quite well. The base repeating tile should be somewhat generic so that it doesn't bring attention to itself.

For the one-fourth blend and the three-fourths blend, take the exact same steps using the layer mask, editing only one quarter of the texture. The quadrant you choose is arbitrary, since the texture is rotated to allow for all four directions. Figures 7 and 8 show the final edit on the textures.

Figure 8 (left). The three-fourths blend transition texture. Figure 9 (right). A unique texture that can be utilized (sparingly) to break up the patterns of the flood fill.

Additional Textures to Add Variety

Now that you've created the base set, you will find that no matter how well you created the texture, the repetitive nature of the tiles is difficult to escape. If memory allows, you can create variants for each of these base sets. You can also create unique "random" tiles. These are special-case tiles or groups of tiles that occur very sporadically (to minimize their recognition) but give the terrain a more natural look (see Figure 9). Try to create variants that can also be reused to maximize your texture usage, such as a set of three or four variants that all work together and allow you to mix and match them.

Once you have your entire set, you can always build another test screen that checks for any problems in the tiled layout. Without the use of multiple transition types, the terrain isn't as natural as it could be, but Figure 10 is a good example of a base set.

FIGURE 10. An example of the basic set of texture types and transitions used to blend between two terrains.

On the Horizon

The methods I've just covered are just one technique for terrain tile generation. Once you've mastered the basics, you may find that there are things you can do to enhance your textures even more. If your game requires the use of a graphics card, then you have some powerful animation possibilities at your disposal if you have access to the hardware texture calls. You will need to talk over the technical requirements with your graphics programmer, but you can easily achieve such effects as pulsing lava, flowing water, and moving steam with animated textures. The base requirement is that the game use a graphics card, but with the latest-generation games, this is quickly becoming an expected base system requirement.

______________________________________________________

[Back To] Introduction


join | contact us | advertise | write | my profile
news | features | companies | jobs | resumes | education | product guide | projects | store



Copyright © 2003 CMP Media LLC

privacy policy
| terms of service