There are 2 methods to make transparencies in Quake
III.
One alpha method works with normal optimized jpgs and one with 24 bit TGAs. The one
that works with jpgs needs either a 100% black background or a 100% white background
in order to work(depending on scripting). The one that works with TGAs needs a
proper 8 bit alpha channel saved in the tga. This involves for some older photoshop
users a plug-in thats available from Adobe.
(Some older versions have a faulty tga exporter and do not include the alpha channel
upon export).
In order to decide what type of alpha you will need, just figure out the difference
between how the two work. If you want something thats solid, but has the cookie
cutout edges to it, you'll want to go the TGA route.. If you want a fuzzy flare
or beams of dusty sunlight.. the jpg is the path to take.. If you're making a
jump pad you will often combine both tga and jpg in order to achieve an overall
layered effect.
JPG Examples
a)
b)
c)
d)
e)
a) A 128x128 black bg jpg image of a blue lense flare.
b) A 64x256 black bg up/down scrolling modulating static field blend stage image.
c) A 64x256 black bg up scrolling light/blend stage image.
d) A 64x256 black bg up scrolling light/blend stage image.
e) A 64x256 white bg up/down scrolling modulating energy field blend stage image.
An example jpg script for a light fixture beam/flare sprite.. This is a simple square shaped black background jpg image with an air brushed type of flare effect on it. You can make anything you like and substitute in tcmod effects so that it grows and shrinks or rotates.. See the Q3MAP2 Shader manual for info about tcmod..
//NOTE - comments are preceeded by two forward slashes in Quake III shader files (*.shader) which can be edited by associating .shader with notepad or by using a shader GUI like Q3Ase.
Example JPG Script
textures/foldername/shadername //Shader name
{ //script opening tag
surfaceparm nolightmap //Don't light it
surfaceparm nomarks //Don't let bullets mark it
surfaceparm trans //It's See through
surfaceparm nonsolid //It's not solid
cull disable //It's going to be seen from both sides
deformVertexes autosprite //It's going to always face the player
qer_trans .5 //In the editor it's semi transparent
{ //script mid-opening tag
clampmap textures/ecel/flare.tga
//This clamps the pixels to the face for rotating
blendFunc add //Adds the value of the sprite pixels
} //script mid-closing tag
} //script closing tag
An example of a side scrolling 24 bit TGA image of mist with
an 8 bit alpha channel to define the mist edges. Removing the tcmod information
will stop the mist from moving.. this could be people or cars or anything really
moving along at a nice smooth pace..
Get the TGA here
Example TGA Script
textures/leafland/mist //Shader name
{
surfaceparm nomarks
surfaceparm nonsolid
surfaceparm trans
qer_trans 0.5
qer_nocarve //Exclude this from cutting during compile
cull disable
{
map textures/leafland/mist.tga
tcMod scale 1 4 //1 high and 4 wide
tcMod scroll 0 .07 //moving left slowly
blendFunc blend //um.. this ought to be different.. like,
//GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
//also see shaderlabs shader manual for info on blending
rgbGen vertex //Lights itself
}
}
Tutorials (Shader and Scripting)
Quake Toolkit