Check out Half-Life Re-imagined competition results!
Check out Skewing textures in Hammer, our newest tutorial!
Welcome, fighter667, our newest member!

logo

Site Stuff

Reference

Maps

Community

ShoutBOX

Poll

Feeling Blue

What's your favourite shade of blue?

Azure

14

Cobalt

32

Turquoise

9

Cyan

10

Royal

8

Teal

3

Onliners

4 mins

Ghost129er

12 mins

Suparsonik

16 mins

NineTnine

34 mins

Crollo

37 mins

Jessie

1 hours

Solokiller

1 hours

Penguinboy

Affiliates

A gaming and technology blog by TWHL admins Penguinboy and Ant. A music blog by TWHL users Ant and Hugh.

Custom Decals

By Luke Haywas

This beginner's tutorial will discuss how to make your own custom decals for inclusion in your maps. Please notice that this is not a tutorial about how to make your own spraypaint tag for use in multiplayer games. There are plenty of tutorials about this on the web, so look elsewhere.

I am talking about the in-game decals that are placed manually in Hammer/Worldcraft. Remember the various signs stenciled on the walls throughout Black Mesa, such as "Processing Area 2" and "Explosives"? Such decals, when used correctly, can add a great deal of atmosphere to a map. The stock Half-Life decals, contained in decals.wad, include all of those seen in-game; by placing them carefully, you can pre-place bullet holes, scorch marks, arrows, and other markings with ease.

However, when I begin to see the same set of stock Valve decals in many, many different singleplayer mods, things begin to get old. Here's how to make your own.

First of all, realize that unlike the spraypaint tag, custom decals must be monochrome. Although this limits us somewhat, it allows for a very nice effect: decal transparency, based on intensity of the applied color, so that you can still slightly see the texture of the wall on which the decal is placed. Without this effect, decals could look very fake:

Admittedly, there are some uses for flat decals like that, but you can tell by looking at it that it doesn't seem to be stuck to the brick wall behind it - almost as if we painted the words right on to the screenshot. In real life this doesn't happen: paint applied directly to a wall inherits some of the physical surface texture properties of that wall: bumps, grooves, ridges. (Flat decals like the one above are best suited for use as clean text or diagrams on clean backgrounds, but even then it is often useful to vary the intensity as we shall see in a moment)

The decal must be 256 color, its palette constructed as follows: Pure white (255 255 255) to pure almost black (1 1 1) in palette index 0 thru 254 respectively. The last palette color, index 255, may be whatever color you wish the decal to be:

To be sure that I am using the right palette, I import a palette from any of the original Half-Life decals, then apply it to my decal after I have made it. It is then simple to edit the palette and change the last color to be whatever I wish.

Note: Sometimes, especially if you start with pure black (0 0 0) in palette index 255, changing the last color will cause it to appear in places in your decal. To fix this, change, within the picture, all pixels of this color to the one just before it in the palette. Most graphics editors have a 'Replace Color' function that will do this.

Draw the decal using the black and white and various shades of gray. In the game, pure white will be transparent, and the near-black will be an essentially opaque pixel in the color of the last palette index. Thus, the 'grayness' of the pixel determines how transparent it will appear in-game. This gives the decal the appearance of being stuck to the irregular texture of the surface beneath it.

With the decal made, save it as a 256 color (8 bit) Windows bitmap (.BMP), and make sure that you its filename begins with the character { (the left curly brace). Example: {MYDECAL.BMP This indicates that the texture within the bitmap contains transparency. Realize that this is set up somewhat differently than the standard textures that contain transparency (the pure blue color which is 100% transparent) because decals have variable transparency, but the naming convention remains the same.

Now go to your Half-Life\valve folder and copy decals.wad to the folder where you are making your mod. Go into the properties of this new copy and make sure that the "Read Only" file attribute is not checked. Otherwise, Wally will crash when you attempt to insert the file. Fire up Wally, and insert this new decal into the new decals.wad. Save and close, and you can now place your decal in Hammer/Worldcraft. (Make sure that the 'Textures' setup in the Hammer configuration points to the new decals.wad, not the old one in Half-Life\valve. Otherwise it won't appear in the texture selection window.)

Make sure that you include the modified decals.wad in the distribution of your mod, or find some way to include the new textures, otherwise your users won't see the decal (and may possibly have an error).

Having trouble? Make sure that all of the following are true:

  1. The decal palette is set up correctly.
  2. The decal is saved as a 256-color Windows bitmap.
  3. Its filename begins with the left curly brace. {
  4. It is placed into decals.wad, and is in the proper directory.

I hope that you have found this tutorial useful. Now get off the computer and go outside for a while!