Custom Terrain Textures

From HIVE
Revision as of 12:36, 6 April 2011 by Payne (talk | contribs)
Jump to navigation Jump to search

In this tutorial, we'll be creating a custom terrain texture using existing online images. However, you can create your own, using your chosen photo editing application, or photographs you take yourself. While the program used is GIMP, you can also use other applications such as Photoshop.

Finding a Base Image

The easiest way to find a good stock photo to convert into a terrain texture is via google. In this case, while we're going to be making a rocky snow texture, I search for concrete in google image search. I then save the highlighted image onto my computer.

Google Image Search

Editing the Image

Next, open up the image in your photo editing application. Crop the image until it is square. Then increase the brightness and contrast until it looks a lot whiter, and less colorful. I managed to get mine looking like this:

Snowy Concrete

Making the Texture Tile Correctly

There's a problem with the image as it currently is. If you have several of these placed next to each other, you may notice something. There's a large white patch that stands out quite a lot. If you have this plastered all over a StarCraft II map, these white patches will be quite obvious. To fix that, we're going to be using the Clone tool.

Large White Patches

Cloning

Cloning is fairly simple. You select a part of the image to clone from, then you click all over the large white patches, replacing wherever you click with the part of the image you previously selected. In GIMP, you hold down Ctrl and click on an area that looks quite bland and not too bright. Then, without holding down Ctrl, click on the large white patches. Once I finished, when tiled my image had no patches that stood out noticeably. For this kind of texture, that's the effect you want.

Kaminoans...them be CLONERS...

Make it Tile

This texture doesn't really need this, as it already tiles quite well. However, for textures such as wooden planks, bricks, and other textures which require parts that stand out, you'll need to run a Make Tileable filter on the image, or manually tile them yourself. There are tutorials on the internet about this, I won't go into more detail.

Alpha Mapping

StarCraft II uses the alpha map of the diffuse (color) map, aka your texture, to define how well a texture blends with other textures. Set your alpha map to black to make it blend smoothest.

Normal Mapping

To finish off, we're going to create a normal map for this image. First off, save your image as something like snow_texture.dds. Then save a copy of it called snow_texture_normal.dds. We'll be working on this copy now. Normal maps are oddly colored images that StarCraft II uses to add detail to a texture that the texture itself doesn't possess. It does this with shaders, which are more complicated. You don't need to know a whole lot about how they work, all you need to know is that with normal maps you can make bricks look like they're actually standing out of the ground, define the gaps inbetween planks, and make rocks in the snow stand out more. There's a great tutorial [[1]] on how to make a normal map out of your texture. After following it, here is my result:

Looks normal to me...

Now, StarCraft II uses a fairly odd version of the normal map. To convert your normal map to a less normal normal map, you have to edit the channels. Select the red channel, copy it, and paste it into the alpha channel. INCOMPLETE