Alpha Channel Tutorial

From RA2Wiki
Revision as of 21:07, 16 September 2008 by Naryar (talk | contribs)
Jump to navigation Jump to search

This tutorial is made for Adobe® Photoshop® CS3 Extended version 10.0, but it will work on the other versions as well. This tutorial will help you not only learn how to make or edit Robot Arena 2 : Design & Destroy chassis skin decals, surface layers, and edge lines, but also how to reskin the arena textures, change parts of the game's UI. Also, “*.TGA”s with alpha channel are used a lot in most games, so you will be able to edit/create textures with alpha channels in other games too.

First, I must apologize that on some of the screenshots in this tutorial the mouse cursor, which becomes different when using some tools in Photoshop, may not look like it usually is. This is because my screenshot capture program which was suppose to capture the cursor also was bugy.

Now a little theory : Most RGB bitmap files are 24-bit, i.e. there are three 8-bit (256-level) channels, one each for red, green and blue. The image combines 256 levels of each color to make a full color image containing up to 256*256*256 or 16,777,216 colors, often abbreviated 16.7 million. So if we separate those three channels they will look like this :

[[Image:

Targa (*.TGA) files can include an extra fourth transparency channel, making it a 32-bit image. The alpha channel isn't visible but acts as a mask to make certain areas of the image transparent in software that recognizes alpha channels. Because this alpha channel is 8-bit, 256 levels, it can have 256 levels of transparency from black 100% transparent to white 100% opaque.


After opening Photoshop, make sure you have at least these windows, they will be needed for your work :

[[Image:

Now you can create a new document and draw whatever your decal will look like, or open a picture to copy a part of it as a decal. Go to File>Open select you picture and open it.

[[Image:

Now you will learn about some ways to select only what you want from an image.

First way : Magic Wand Tool

Choose the Magic Wand Tool.

[[Image:

Make sure all the options are set like this :

[[Image:

This tool is very usefull when you want to select an object that is made of identical color. Our object is only made of identical red color so we set the Tolerance to 0, but if the object is made of colors that vary a little then you start adjust the value of Tolerance until it works fine for you. Now click somewhere inside of the object and it will be marked like this:

[[Image:

You can also use this method in another way. If the object is made of different colors but the background is made of only one color (for the same reason, sometimes film makers capture the film on a green background in the movies, so they can easly cut the background later) you can click somewhere on the background to select it. Then press this :

[[Image:

This will invert the selection and mark the other parts of the picture. In your case, it will be area of the object you want. If you need to, you can add or remove from this selection. Just hold “SHIFT” and click to add, or hold “ALT” and click to remove. This can be done with any selection tool and when you hold “SHIFT” or “ALT” it will add “+” or “–“ to the tool cursor icon. Now you can add or remove from the selection infinite times and make the selection to what you want. As I said this works with all selection tools from the tool select menu.

This will invert the selection and mark the other parts of the picture. In your case, it will be area of the object you want. If you need to, you can add or remove from this selection. Just hold “SHIFT” and click to add, or hold “ALT” and click to remove. This can be done with any selection tool and when you hold “SHIFT” or “ALT” it will add “+” or “–“ to the tool cursor icon. Now you can add or remove from the selection infinite times and make the selection to what you want. As I said this works with all selection tools from the tool select menu.

Second way : Polygonal Lasso Tool

Choose the Polygonal Lasso Tool.

[[Image:

Make sure all the options are set like this :

[[Image:

This is usefull when the object is more complicated and made of different colors. Lets imagine this “N” is made of different colors. Start clicking on the edges of the “N” one by one, to close the selection click again on the first point you clicked. The more accurate clicking points you have, the more good and smooth the selection will look.

[[Image:

Third way : Lasso Tool

Choose Lasso Tool.

Make sure all the options are set exactly like the Polygonal Lasso Tool

[[Image:

This way is not for people with shaking hands. This is free select mode where after the first click the lasso tool follow every moving with the mouse until its closed back to the first point. You can finish your selection by clicking again on the first point you clicked.

[[Image:

Fourth way : Color Range

[[Image:

Click on Color Range. Make sure all the options are set like this : This way is only if you want to mark exactly a specific/definite color. It will mark what color you select, but it will mark EVERYWHERE that this color exist on the image. Now click inside of the object on the image. Now you see what you have marked. The white is marked, the black not. As you can see the letters “NO” have very sharp edges. To select a object that is made of color that vary a little bit or just to make the edges more smooth you need to use the Fuzziness slider. Experiment with it to see what suits your needs best. Now click “OK” button.

[[Image:

Those were some ways of making/selecting parts of a image. Use whatever way you prefer, and mark what you have need. I will mark the letters like this :

[[Image:

Now you need to copy the selection to the real file you will use. So, click copy.

[[Image:

If you don’t know how to make a new file and add an alpha channel in it, I will tell you one easy way to do this. Open one file from the original “.TGA” files from the game depending of what you want to build, a decal, component skin, arena skin, etc. In this case will be a decal. Click open and go to “…\RA2\Texture Library\decals”, choose the “Gear.tga” and click “OK”. You are now working in a new document. Click Select>All.

[[Image: