Alpha Channel Textures

Ok, this tutorial is all about textures.

Alpha Channel textures is all about opacity/translucanty on Textures.
It's a great way to make grates, windows fences and other stuff thats translucent.

What you need is:
"Photoshop" (Working with PS:CS so i dont know if it works with lower)
Knowledge of compiling textures (see Tutorial)

Step one is a easy way to make a window with a rysty metalframe. I recomend doing the first step to be able to make only the Window transparent. If not use this image.

news post image

1.Make a new image, Size 256x256. Choose a grayish color [#828282]. Make a new layer. Name it "Metal" and fill it.

Now click on Filter/Artistic/Film Grain, set the sliders to:

Grain: 6
Highlightarea: 0
Intensity: 1
Press Ok.

You should get a picture that looks like this.

news post image

Now click on Filter/Artistic/Underpainting and use these settings:

Brush Size: 0
Texture Coverage: 40
Texture: Sandstone
Scaling: 50%
Relief: 8
Light: Top
"Uncheck Invert"
Press OK

The image should look something like this.

news post image

Now for the rust.

Make a new layer and name it "Rust". Choose a brownish color [#944D00] and have black as secondary color.

Now click on Filter/Render/Clouds.

Highlight the "Rust" layer and click Image/Adjustments/""Brightness/Contrst""

Now set the contrast to "+40" and press OK

Click the Blending roledown and chose overlay.

news post image

Highlight the "Rust" layer. That merges the rustlayer with the layer under it, in ouer case it should be the "Metal" layer.

The result should be something like this.
news post image

Now for the window. Turn on grid for some help. (Fastes way is Ctrl + ' or go to View/Show/Grid)
Now go to Edit/Preferences/Guides, Grid & Slices.

Set "Gridline every:" to 16 "Pixels"

Now select the Rectangular Marquee Tool (M), Set the feather to "1 Px".
Make a select box with a border of 1 gridbox.

Now chose Select/Modify/Contract and contract by 2 pixels. Delete the selection (Delete)

Highlight the "Background" layer and make a new layer, Name it "Window".
Fill it with a darkbluish color [#19191F].
Make another layer and Render it with clouds (Use primary color white secondary black "Filter/Render/Clouds" )

Change the Blending to overlay and merge the clouds layer with "Window" layer.

Voila the window is done. Should look something like this.

news post image

2. Alpha channel uses grayscale colors to controll transparency, the darker an area is on the textures alpha chanell the more transparensy it has. And the otherway around with white.

In the layers window switch to channels.

We need to duplicate one channels, Red, Green, Blue.
It's always good to use the whitet one. If can't find the whitest one try duplicating one at a time to check them. But for now we will go with "Red".

Drag the Red chanell on the New layer button.

news post image

That should create a whole new channel named "Red Copy".

Make sure that there's no selected areas and that "Red copy" (Alpha channel) is selected
Click on Image/Adjustments/""Brightness/Contrst"" and set the Brightness to about -45 and Contrast to about -70. Press OK.

Now go back to layers and CTRT + Click the "Metal" layer. (The Rusty metal border)
Go back to channels and click "Red Copy" Channel.
Press "Shift + Backspace". A Fill window should pop up, Use white as fill color. Press OK.

The selected area around the border should be white. The Red Channel should look like this

news post image

The white color makes the Metal a solid part of the texture.

Now save the image as a .TGA image (Targa), name it "window_test"

3. Compile the image. ( Tutorial

4. Now comes the fun part. Lets script the texture. First of find the compiled image. When you've found the map look for a file named window_test.VMT

Open the .VMT file as a txt document.

Now there should be a piece of script already, that looks like this.

"$baseTexture" "texturedir/window_test"

Now we need to add 1 row of script


"$Translucent" 1
"$baseTexture" "texturedir/window_test"
"$nocull" 1

Notice that i Put 2 rows insted of 1.

("$translucent" 1) This command gives hammer/game the command to use the Alpha channel we added in photoshop as a transparency layer.

("$nocull" 1) This command gives hammer/game the command to use the face on both sides of the face. NOTICE !!! To show a face both ways the brush has to use a func_
Best thing to use is a func_wall. But to show on the other side it allso has to be a few units thick or have a similar texture on the other side.


Red is the texture with $nocull command

Black is nodraw texture





Not working:


Check hammer and test the texture out.

Should be transparent in hammer to.

Well that was all I had to write about Alpha channels


Heres an example of a fire escape.

news post image


View comments ( 15 )

Back to top