How to make partially transparent textures


In this tutorial, I will be showing you how to make a partially transparent texture for a game. This is useful when you want to make a window. I am using JASC Paint Shop Pro 8 for this tutorial. I'm sure other graphics programs are similar.

Start with your image. In the example, I will be using a 128X128 texture that's been filled blue.

Pick the layer you want to make transparent. In this example, there's only one layer to work with, so it's selected by default.

Now you want to make a new mask layer.

The "Layers" foldout should have created the mask layer for that particular layer. Now select the mask layer so it's highlighted.

The color palette should have changed to black and white when the mask layer is active.

I select black and fill the whole mask layer with that color. It will make the blue dissappear. It is now totally transparent.

I drew a box (with the selection tool) in the middle of it.

I brought up this palette window by double-clicking the foreground color. This is where the partial transparency takes place. Pick any of the black, gray, or white color to fill the box. The closer to white the color is, less light will be shown thru. The closer to black, the more transparent it will be. I picked a color in the middle so it will be half transparent.

Fill the box and some of the blue should show up. What you see here is what the texture will look like when applied to something. The grid in the background obviously won't be there, but if you didn't know already, it's just a placeholder to show where transparency is.

Deselect everything and go to the layers foldout and "hide" the mask layer. It should show the original image layer when the mask layer is hidden.

Now to save the mask as an alpha channel.

A new window should pop up. There will be a preview that shows what the transparency will be like. As I said before, the lighter the color, less light will show thru and the darker the color the more transparent the area will be. There will also be a box where you can give your alpha channel a name. I usually call mine "Alpha Channel 1" but I don't think games are very picky about the name. Then hit "Save".

Now you're finished! Save your work and try your texture.


Copyright © 2004 by Qwerty_86