Left 4 Dead Graffiti Tutorial
Graffiti in the Left 4 Dead series is used extensively in official maps. There are many ways to make graffiti, as seen in Portal 1 (internally called scrawlings) and other Valve games, but the L4D series follows a particular technique that keep them small in file size and supposedly more efficient to render. The process is simple and fun! Only a few important details are should be kept in-mind in order to ensure a fast and painless process. In short, the goal is to create a material with a DecalModulate shader along with a texture that has a RGB 124 126 124 background. Steps and details are as follows:

The process can be broken down into four small steps:
- Create a transparent image with background completely filled with color RGB 127 127 127
- Save the image as TGA without alpha
- Convert the image to a VTF using vtex provided by the L4D1 or L4D2 Authoring Tools
- Create the accompanying VMT with
DecalModulate
shader and test.
Creating and saving the image
Save the file as a TGA in the materialsrc folder found in the game directory. If the folder does not exist, please create it. 24-bit appears to give good results. Unfortunately, you cannot create the VTF using VTFEdit or the VTFedit plug-in. vtex is necessary to create a proper background color of RGB 124 126 124.
Programs other than Adobe Photoshop should give the same results but they are not guaranteed. Feel free to experiment with other image editing programs, file formats, and settings.
Converting to VTF
The simplest process is to create a shortcut of vtex.exe and place it in the materialsrc folder. vtex is located in the bin directory of the game (for example, C:\Program Files (x86)\Steam\steamapps\common\left 4 dead 2\bin). Drag the source image, the TGA file, onto the vtex.exe shortcut. The resulting VTF will be created in the materials folder.
Create the VMT and testing
The VMT uses the DecalModulate
shader. The following example VMT refers to the basetexture located in the materials folder (also in the graffiti subfolder), graffiti/graffiti_saferoom_c1_m3-4_01.vtf. It is the only line that should be changed.
DecalModulate { $basetexture "graffiti/graffiti_saferoom_c1_m3-4_01" //notice how the file type is not needed! $surfaceprop default $decal 1 $vertexcolor 1 $vertexalpha 1 }
The new material should appear in Hammer and its material browser. The graffiti should have a completely transparent background when applied as an overlay on a brush.
Troubleshooting
There are some issues that may crop up during the process that can be easily resolved:
- Graffiti simply does not show up in the material browser or in the 3D view in Hammer
- In most cases, simply re-check the basetexture path used in the VMT. It might have the incorrect path to the texture (VTF).
- The background is not transparent as expected and appears to show the overlay border.
- Make sure the background layer to the image is completely filled with RGB 127 127 127. The solid gray background can be lost during image resizing.
- The VTF converted always has a background other than RGB 124 126 124. This results in a non-transparent background in-game.
- The source image should be converted using vtex provided with the authoring tools. Third-party programs appear to have difficulty achieving that specific color.