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:
- The decal palette is set up correctly.
- The decal is saved as a 256-color Windows bitmap.
- Its filename begins with the left curly brace. {
- 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!
I was trying to translate the half life decals..
But i can't edit decals using wally..whenever i try to compile it, the game don't recognizes it
At first i tought the problem were the edited images
But then
even if i just export and recompile the original vanila decal files,the same problem happens
In the normal half life engine some decals just becomes invisible while others loses its transparency
In xash 3d all the textures loses its transparency(meaning its a big white box)
And i can't find any other apps like wally to edit wads,and wally is not working for me
I see a lot of people can edit decals no problem
Any ideas on what i am doing wrong?
Edit. Someone helped me out
WadMaker, a command-line wad-making tool that I made, can turn 32-bit images into decal textures if the output wad name is 'decals.wad'. It'll use their alpha channel to create the decal, and the average color of the image to set the decal color. To add textures to decals.wad, first drag decals.wad onto WadMaker.exe - this will extract all decal textures and store them as png files in a 'decals_extracted' folder. Rename the folder to 'decals', add your own images, then drag the folder onto WadMaker.exe - this will update decals.wad with your new images.
{
textures. My working theory is that it checks that palette indices 0-254 are monochromatic (black→white or the reverse). If it's neither then it assumes alphatest mode. I think I've also seen decals.wad in the wild that have the palette indices 0-254 all zeroed out (i.e. black all the way), but I haven't loaded them in game and see how the engine interprets that decal.