Ads keep us online. Without them, we wouldn't exist. We don't have
paywalls or sell mods - we never will. But every month we have large bills
and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3
Texture Creation 101
- A Tutorial for Counter-Strike: Source
Making custom maps used to be a specialty, something only an elite few could do. Today, many people can produce their own maps with ease with the already vast range of textures and props already provided by Valve. So, how do you make your map truly custom and separate itself from the rest of the crowd. The answer is rather simple, add custom content, but this is easier said than done. Making models and skinning them for a map can be a long and time consuming. Textures on the other hand are actually rather simple and can be picked up by anyone with a certain degree of skill in an image editing program like Photoshop.
This tutorial aims to show and detail all the steps in making a custom texture from start to finish. I think you may be surprised at just how quick and easy this can be. My tool of choice is of course, Adobe Photoshop CS2. You will also need to download and install the VTF plug-in. You will also need VTFEdit.
I'd also like to thank Method, for his original tutorial on this subject.
In the past, textures needed to be of relatively low resolution as computing power couldn't handle realistic textures. Today, as computers have become more powerful, we can use real life photographs and edit them to get exactly what we want. http://www.cgtextures.com is one of my favourite sites for getting photo's suitable for making textures.
After a little exploring and clicking, I found the base texture I wanted to use. It's simple and clean, which gives it a lot of potential for us to use. Open the image in Photoshop (or GIMP, or another image editing program you are comfortable with) and crop/resize it to 512x512 or 256x256 pixels. Already, it looks like a half decent texture, but we are far from done with it.
Improving The Image
Now it is time to improve the actual image. It's currently very plain; I wanted to add some colour to it. Duplicate the layer and delete the top part of the image. Go to Image -> Adjustments -> hue/saturation controls, have a fiddle with the settings until you get something you like. I went for a dark green/grey colour.
By repeating this step again, I added a border to add just a little more colour to it. This time, I went for an even darker green/grey colour.
Adding More Detail
Now, I want to add some extra detail to the image, you can skip this part out if you like, but it's really entirely up to how you want your texture to look. By using cgtextures.com I found a good image with what looks like water leaks. I think this would look perfect at the top of the image. After a quick crop and resize, I placed it onto the main image.
After placing it on the image, I then set it to "overlay," supplicated the layer and set the opacity on the copy to 75%. This gave a very quick and easy effect to the image.
Next, I wanted to add some scratches to the bottom of the image, to make it look like paint has been scratched away over time. To do this, we yet again go back to what should be a bookmarked resource http://www.cgtextures.com/ I found a nice image with some scratches which would be ideal. A good image will be one that will produce a subtle effect, make all of this detail too noticeable and people will notice the repeat in-game. As always, scale and crop the image then place it onto the main one.
This time I set it to an overlay with the opacity set to 25%. I'd like to encourage you to play with these setting, trying multiple layers, with different setting. A wide variety of results can easily be achieved.
Now, that is a texture, it looks incredible, I'm very happy with how it turned out. However, we aren't done yet; the hardest part is unfortunately, yet to come.
Making The Texture Tile
This is the hardest part of making a good texture, getting it to tile well. If the texture didn't tile well, the realism will be lost as real life doesn't have seams. Merge all the layers, then flatten and save it under a different file name, in case you screw this up and want to try again, or want to go back and change the texture. Go to Filter -> Other -> Offset. Set the properties to 256 pixels in the horizontal as the texture need not tile vertically. If you did need it to tile vertically, you would need to set it to 256 pixels in the vertical as well. This number will also be different for the size of the texture, as I am making a texture that is 512x512 it needs to be offset by 256; this number is essentially half the size of the texture.
Now we need to use the healing brush tool and clone stamp tool to remove the seam in the middle of the image. There are other tools you could use, but this is down to time and practice. There isn't really any proper way of doing this. Just after 2 minutes of using the healing brush tool, I managed to get the seam removed. Very quick and easy tool to use and gets the job done fast.
Just some final touches needed now, you can offset the image again, so it's back to normal or leave it as it is. Duplicate the image, and then go to Filer -> Other -> High Pass. Set the radius to one, then change the layers blending to vivid light and set the opacity to 50%. This just increases the crispness of the image, so it will look better in-game.
Exporting The Image As A Texture
Huzzah, we are done the editing of the image. Now we can finally make it into a texture. Simply go to 'save as' and save it as a VTF file. Now, you have to choose which format you want the texture to be, the main ones are, DXT1 (no alpha channel support), DXT3 (Basic alpha channel support) and DXT5 (full alpha channel support). Usually you will use these three, to find out more, go to VDC (http://developer.valvesoftware.com/wiki/VTF). I shall be using DXT1 as I have no need for an alpha channel and it will still look good after compression. You want to save the image in your materials folder of CS: S, you can create a subfolder just for your textures inside that one.
Creating The VMT
Now we need to create the VMT file for the texture, this is so Hammer and the game can understand what the texture is and what to do with it. The VMT contains information on other aspects of the texture other than the image itself. It can be used to define a normal map, what it's made from and how to shade it in game. Open your newly created texture in VTFEdit. Click on tools -> create VMT file, this should open up a new screen, click on the 'options' tab and select a material from the 'surface' drop down box. This is what your texture will be 'made' from in game; it controls what sound you make when you run across it and when you shoot at it. Hit create and save it in the same location as your texture.
I hope this has been an informative tutorial, it took me around half an hour to make the texture from start to finish, but writing this tutorial took considerably longer. I hope you like your texture and you can now see it in Hammer, ready to be applied to your maps. Just make sure you see my BSPZip tutorial to learn how to ship your textures with your map when you put it up for download.
As you can see from my result below, even just a single custom texture in the right place can make a map look good.
This tutorial continues in:
Texture Creation 102 - Normal and Specular Maps
Dont have any problem with textures personally but i wasnt aware of that site, so i learned something today! :)
One thing i think you could have touched on in addition to what you have here is desaturating the texture youre making once you have a seamless base that you like, then using the Match Color function in photoshop to pull the tones from the original image and apply them evenly to the texture youre making, eliminating any fade or unmatched tones on opposite sides of the texture, keep the color more consistent. (i know you didnt really need to do that with the images you were working with in this tutorial, but, a useful thing to practice if you do have base textures that arent a steady single tone.)
Very nice tutorial tho sir. And that texture site is indeed pretty sexy. hehe. good posting.