Level Editor/Entities/Decal
| Decal | |
|---|---|
| Made with | Functional > Decal |
| What it is | A texture laid over a surface: a poster, a sign, a stain, a painted line |
| In the game | Yes, it is exported with the map |
A decal lays a texture on a surface over the surface's own: a poster on a wall, a sign, a stain on the floor, a painted line, a team logo. Hammer calls these decals and overlays. The surface keeps its own material and lighting underneath; the decal only changes what color it shows, so a decal in a dark corner is dark and one in the sun is lit, baked lighting included.
Placing one
- Pick the material you want in the Materials tab.
- Choose Functional > Decal.
- Click a surface. The decal lies flat on the face you clicked, the right way up on a wall and reading along the X axis on a floor, as big as its texture (256 texture pixels to a meter for the editor's own materials).
Move it with the Move tool and turn it with Rotate. Its size has handles, and the Scale tool sets its size rather than stretching it. The pink box round it is where it reaches: across, down, and how deep into and out of the surface.
In the scene tree a decal's row names the material it lays.
Inspector
| Setting | Type | Default | What it does |
|---|---|---|---|
| Texture | Material | the Materials tab's | The button shows what it lays; click it to pick another material. Or type a TF2 material or texture link into the field below it (tf2://materials/signs/sign044.vmt) and press Enter. A linked texture is read from each player's own TF2 install; without TF2 it shows a checker.
|
| Receivers | List | World | What it lands on. World is brushes, displacements and terrain only: a player walking past a poster never wears it, and nor does a crate pushed against it. World And Props takes the map's props too. Everything lands on characters as well. |
| Draw Order | Number | 0 | Where two decals overlap, the higher number draws on top. |
| Size | Meters (X, Y, Z) | the texture's size, 0.25 deep | X across the texture, Z down it, Y how deep it reaches. Keep the depth small, or it reaches through a thin wall to the surface behind. |
| Modulate | Color | White | Tints it. |
| Albedo Mix | 0 to 1 | 1 | Fades it. |
| Normal Fade | 0 to 1 | 0.5 | Fades it off surfaces turned away from it. At 0.5, anything steeper than 60 degrees from its own face, so a floor decal does not smear down the side of a step. |
The other fade settings (upper and lower fade, distance fade) work as their names say.
In the game
The game draws a decal onto the surfaces it lands on. Many decals cost little to draw, but each different texture takes video memory whatever its size: forty different large textures take a lot. Prefer smaller textures and reuse them.
Overlays and decals of an imported Source map come in as decals.