Care must be taken when reworking textures with alpha channels. Textures without alpha channels are saved as 24 bit images while textures with alpha channels are saved as 32 bit. If you save them out as 24 bit, the alpha channel is erased. Note: Adobe Photoshop will prompt you to save as 32, 24 or 16 bit. Choose wisely. If you save a texture as 32 bit and you don't actually have anything in the alpha channel, Quake III Arena may still be forced to use a lower quality texture format (when in 16 bit rendering) than if you had saved it as 24 bit.
To create a texture that has "open" areas, make those areas black in the alpha channel and make white the areas that are to be opaque. Using gray shades can create varying degrees of opacity/transparency.
Example: An opaque texture with see-through holes knocked in it.
textures/base_floor/pjgrate1 { surfaceparm metalsteps cull none // A GRATE OR GRILL THAT CAN BE SEEN FROM BOTH SIDES { map textures/base_floor/pjgrate1.tga blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA alphaFunc GT0 depthWrite rgbGen identity } { map $lightmap rgbGen identity blendFunc GL_DST_COLOR GL_ZERO depthFunc equal } }
The alpha channel can also be used to merge a texture (including one that contains black) into another image so that the merged art appears to be and opaque decal on a solid surface (unaffected by the surface it appears to sit on), without actually using an alpha function. The following is a very simple example:
Figure 1
Start with a TGA file image. In this case, a pentagram on a plain white field (figure 1A). The color of the field surrrounding the image to be merged is not relevant to this process (although having a hard-edged break between the image to be isolated and the field makes the mask making process easier). Make an alpha channel. The area of the image to be merged with another image is masked off in white. The area to be masked out (notused) is pure black (figure 1B). The image to be merged into is greenfloor.tga (figure 1C).
Make a qer_editorimage of greenfloor.tga. This is placed inthe frame buffer as the map image for the texture. By using GL_SRC_ALPHA as the source part of the blend equation, the shader adds in only the non-black parts of the pentagram. Using GL_MINUS_ONE_SRC_ALPHA, the shader inverts the pentagram's alpha channel and adds in only the non-black parts of the green floor.
In a like manner, the alpha channel can be used to blend the textures more evenly. A simple experiment involves using a linear gradiant in the alpha channel (white to black) and merging two textures so they appear to cross fade into each other.
A more complicated experiment would be to take the pentagram in the first example and give it an aliased edge so that the pentagram appeared to fade or blend into the floor.
Adobe Photoshop has the ability to easily create alpha channels. PaintShop Pro from JASC (v5.0+) can also make an alpha channel by creating a mask and naming it "alpha".
Generally speaking, regardless of the program used, we found it best to do most of the art manipulation of the alpha channel in a separate layer or file and then paste it into the alpha channel before saving.
The installation of Q3Radiant will create a text document called "shaderlist.txt" in the following path:
Q3Radiant will use the contents of this script to grab your new textures for inclusion in the game. The contents of shaderlist.txt document will contain a listing of all the shader documents that were used by id Software to create Quake III Arena.
Since you will obviously want to create your own shaders, you need to put them in separate folders and create a new shader script for them.
If you plan to work on several maps at once and want to distinguish between textures used in each map, simply add additional map names here. For map and mod makers, we STRONGLY recommend that any new shader scripts created use the name of the map or mod in the shader file name. We know we can't avoid every incident of files overwriting each other, but we certainly can advise you how to try.
Now, in the scripts directory that you just created, create another text file and call it:
This file will contain the shader scripts you write to modify a particular texture.
Textures: baseq3/textures/[mymapnamefolder]
Bsp & aas: baseq3/maps/mymapname.bsp, mymapname.aas
Shader scripts: baseq3/scripts/mymapname.shader
You need to use an archiving program call Winzip to make the pk3 file. Get Winzip from http://www.winzip.com/winzip/winzip.htm
Make a zip archive called mymapname.zip
Zip all the required assets into a zip archive file (Quake III Arena DOES support compressed pk3 files).
Rename the zip archive to mymapname.pk3
Put it where the Quake III Arena community can find it.