Modifying HUD GFX
The current hud graphics are a little
dull. If you're making a mod, you'll probably want to spice them
up a little or totally redo them. In this tutorial I'll explain how
to modify/replace the numbers on the hud (since that's about all there
is to mess with). Unlike Quake and Quake2, which have 1 color of
a 256 color palette transparent, Quake3 uses graphics with and alpha channel
which has 256 shades of transparency. You'll need a fairly advanced
graphics editor to edit these. I'll make this a step-by-step tutorial
using Photoshop, since
that seems to be the most popular one.
The first thing you need to do is extract
all the number graphics from the .pk3 file. For simplicity's sake,
just extract everything and rename the .pk3 file. If you don't know
how, I've got a tutorial on that too. They're
in the /gfx/2d/numbers/ directory.
Load up one (or all) of the graphics
in Photoshop. I'll just start with zero_32b.tga. It's rather
small so you'll probably want to zoom in a couple times. There's
two images you'll need to create -- one for the mask (alpha channel), and
one for the actual image. In order to edit the alpha channel, you'll
need to go in quick mask mode (button in red below). In the channel
window, select channel #4 and make it the only one visible (see below).
Now you can edit to your heart's content.
Remember, this is just the alpha channel. This is this sets where
the transparency is. Black is transparent. White is solid.
If you wanted something partially transparent, you'd make it gray.
Also note that Q3 stretches the image taller in the game, so you'll want
to make your numbers fill the whole image so they look normal in the game.
They should appear too wide here. I'll just make an LCD 0.
Once you've finished your mask, you'll
need to make the actual image that will be shown. It might look ok
if you just fill it solid white, but if you're like me, you'll want to
make it look cool with shading and stuff. You need to shut off quick
mask mode (button in red), make RGB visible and channel #4 invisible (see
below).
Now you can do whatever you want with
it. Only the parts that are white in the alpha channel will show
(gray shades will be partially transparent, black is invisible).
You can use colors and not just grayscale here, but I would recommend
against it since the numbers are changed colors in the game (mostly to
green). I'll make another LCD 0 with some shading on it:
Now all that's left to do is test.
Save the image. Sometimes Photoshop is a pain about this. If it only
wants to save as a .PSD file, try flattening the image (Layer | Flatten
Image). If that doesn't work, do a "Save a Copy..." and save it
as zero_32b.tga. Make sure "Exclude Alpha Channels" is unchecked
and you save it as 32 bit. Load up Quake3. If it works correctly
and is satisfactory to you, you can do it for the rest of the numbers.
If it doesn't work, check out the troubleshooting stuff below.
Note...
- It might be easier to start your
own graphic from scratch. This is just the way I did it. I'm
learning here too :)
- You can create HUD graphics any
size and Quake3 will resize them to what you currently see in the game.
Though they will work at any size, multiples of 8 are recommended (gl friendly).
The current ones are 32x32. 16x16 will look slightly worse, but it
has speed and file size/memory benefits. You can also create higher-res
ones like 64x64 or 48x64, but they will likely cause a little performance
drop in Quake3.
- While editing, sometimes it helps
to make a big image to work with, then shrink it down when you're done.
- It might be easier if you use a
2:3 width:height ratio when creating your graphic and either resize it
to 32x32 or save it in that size (something like 32x48 would work).
The images are resized to a ratio of about that in the game.
Troubleshooting
Nothing changed:
a) You didn't save it, or didn't save
it in the right format. Make sure you saved a zero_32b.tga file in
the /gfx/2d/numbers/ directory.
b) You didn't extract the files from
the pak0.pk3 file and rename it. Check out my other
tutorial on how to do this.
There's no image:
a) Your alpha channel has nothing
in it. If it's solid black, nothing will show up.
b) You didn't turn off quick mask
mode. Make sure this is turned off before you save.
c) When saving, you excluded the alpha
channels. Make sure alpha channels are included (uncheck "Exclude
Alpha Channels" in Photoshop if it's checked).
Other:
If you have some other problem or
feel I left something important out of this tutorial, please email
me. |