Cleanup is going to take awhile, so the site is back up but editing has been disabled.
Alpha Channel Textures
From HalfLife 2 Knowledge Base
How to create transparent textures with Adobe Photoshop 8
The following tutorial was submitted by Smith.
Ok we got an image, and we want to make a transparent texture with it.
You can take any image, we'll make a glass in this example.
It will look like this:
There are 4 steps:
1. Create the image itself
2. add the alpha channel in Photoshop and save as TGA
3. Convert the TGA to VTF format
4. Edit the associated vmt
1. The image
We assume you already got one. In this example it is a glass texture, a bmp 24 bits.
The size must be a multiple of 16 ie 32x32 64x64 128x64 etc... Maximum allowed is 2048x2048.
Name it myglass.bmp.
2. Creating the alpha channel
Let's open it with Photoshop. In the menu, clic on Window/Channels to show the channels window. Then in menu clic on Image/Mode/RGB color to show the rgb channels.
First we gotta create the alpha channel. To do this, clic on the channels Red, Green, and Blue, then select the one which show the image as white as possible.
In this case, the blue channel is the best to choose.
Drag the blue channel to the small white box at the bottom right of the Channels window, and you get the alpha channel it appears in the channels window, called "blue copy".
Now, press ctrl-L to work on transparency. Move the gray dot to adjust transparency. When moving the dot, the image will appear more or less black. The more it is black, the more transparent it will be in game.
As we don't want it to be too much opaque, we move the dot towards the right and keep it pretty dark.
Clic on ok to close the Levels window and save the image as myglass.TGA in folder hl2/hl2/materialsrc (you can place it somewhere else, but it's good to have all images sources there. Create this folder if needed).
Important! select 32 bit when saving the TGA.
Congrats! The alpha channel has been added. It can be modified later, just select the alpha channel, press ctrl-L to adjust transparency, and save the file.
3. Converting the TGA to VTF for HL2
It's bery easy we just gotta launch vtex.exe (in the hl2/bin folder) with a specific command line.
The command line has this format:
Exe path -- options -- path of the TGA
D:\hl2\bin\vtex.exe -mkdir -shader VertexLitGeneric D:\hl2\hl2\materialsrc\myglass.tga
You can use this command line from the windows Start menu: clic on "Run". Paste your command line and press enter.
Those of you who have their Valve folder located in Program Files, or any other folder with a space in the name can use quotation marks to enclose the directory of vtex and your tga.
For example
"C:\Program Files\Valve\Steam\SteamApps\username\sourcesdk\bin\vtex.exe" -mkdir -shader VertexLitGeneric "C:\Program Files\Valve\Steam\SteamApps\username\half-life 2\hl2\materialsrc\MyGlass.tga"
Now you should find [b]myglass.vtf and myglass.vmt[/b] in the materials folder. Move them to their final destination, the materials/Glass folder.
4. The vmt file
When loading a material, HL2 loads the vmt file first. Inside is the path of the texture to load. Edit the vmt with a text editor. It should look like this:
"VertexLitGeneric"
{
"$baseTexture" "myglass/myglass"
}
Modify it to become like this:
"VertexLitGeneric"
{
"$translucent" 1
"$baseTexture" "Glass\myglass"
"$nocull" 1
}
Pffeeww!!!
Open Hammer and place your texture, it will already look transparent.
This may help one of you to create alpha channels.

