Many people have some basic working knowledge of what overlays are; however, if you don’t already have a basic knowledge of overlays this tutorial may be a bit confusing, so if you wanted to look up some others before reading this one go right ahead.
Overlays act just like decals do but have several more options available to them such as resizing and tiling it across multiple surfaces which decals cannot do as they remain static in their shape, display and location. Decals can also be somewhat costly to render when overused or misused and the same can be said about overlays; however, overlays can be optimized to regain the lost performance!
Your basic Overlay has the following modifiable settings which I will go through and explain during the course of this tutorial:
- Name (Self Explanatory)
- Material (Self Explanatory)
- Brush Faces (Self Explanatory)
- Render Order
- U Start
- U End
- V Start
- V End
- Start Fade Distance
- End Fade Distance
The last two should look familiar if you’ve done any work on Model Fade Optimization or know of the process than this is the exact same function but for overlays. Quite handy to be able to turn them on/off as you want/need them for when you need to limit the number visible at a time.
Also, the “Render Order” has nothing to do with the rest of the map if you were wondering. This option is for stating what overlays to render last to first (0-3). You only need to set this when you have overlays overlapping each other need to specify which goes on top of the other. Ex,

Connecting Multiple Overlays

Since this part is about connecting overlays together feel free to try this out and make a blank map with some overlays – I’ll be using the dust2 road overlay (overlays/brickroad01).
Before you start connecting overlays together you should have your overall shape in mind first of the path you want them to take, then take into account how many overlays you want to use to make it.
I’m just going to do a simple 90o turn and will use 4 overlays for this example.
Just place them in the rough positions they need to be in; then select each one and rotate so they start to form your shape. See my “roughed in” example on the right.

Now comes the actual connecting them together part,
Select all the overlays while holding CTRL and then go back to the left menu and click on the overlays button. The highlighted overlays should change from the green outline to now showing the grip points for each overlay like they were vertex points on a brush.
You can click on these and move them around manually to warp the overlay however you wish. What we want however is to connect these dots together, which can be difficult without a steady hand and zoomed in as much as you can, but luckily you don’t have to do that!
Select and hold one of the points and it will turn red to tell you its active, now hold SHIFT and drag that point to the one you want to connect it to. The point will snap to the other overlays point as you move it closer making a perfect connection. Repeat this for the remaining points.
There will probably need to be some tweaking of the shape to remove any unwanted distortions in the overlays but when your done you should get a nice result like this:

To make a smoother looking road all you have to do is use more overlays, but since optimization is about balance its a good idea to restrain yourself a bit and test things out.
Overlay Tiling
Tweaking the amount in which the texture tiles is something you will definitely be doing often as the whole point with overlays is to stretch them across several brushes.
So I’ll just use the simple example of the ivy textures that are available by default.
Depending on what modes you have on resizing the overlays will turn out perfect results or stretched & deformed textures. You want to make sure that “Texture Locking”
(Top Menu Bar) is off so it will repeat the texture as you resize it rather than stretch it.

In the case that you need to manually set the number of times the texture tiles in either the vertical or horizontal direction you will be editing the U and/or V start/end values.
U is Horizontal plane of the texture
V is Vertical plane of the texture
The texture will tile away from its origin on the top left of the texture, so on settings of a V end of “1.5″ and a U end of “2″ with the Starts both being 0 then the following will be the result:

This should make a lot more sense to people now as many are familiar with the origin always being the bottom left, and with that thinking the ‘expected’ result would be far from it.
Cropping/Resizing Overlays & Textures
With the understanding of how the U and V values are calculated its possible to crop the texture of an overlay to only show a portion of it rather than the entire thing. This is very handy for when you want a specific part of any texture for that matter whether or not its an overlay.
Thats right, you can use the overlay to crop normal textures.
To show one really good use for this I’m going to extract the window from the default texture “concretewall013h“. In order to do this all we do is modify those values as described in the previous section; just expanding on that and using both the Start and End values for U and V. I’ve shown how this works in the image below.

Note however, that these values are not following the units in hammer but are decimal values from 0 – 1. As explained in the tiling portion, the end values of 1 and 1 will show the texture in its entirety with no trimming or extra. So you can’t just say start 16 units in for U and end at 56, you need to convert this to a decimal with 1 being the total length/height of the texture.

Getting these values isn’t that difficult either if you follow the ‘brush’ method.
All you do is create a brush 128×128 units with the texture in question on the large square face. Check off the “To Face” value to make sure its oriented the correct way the overlay will be displayed (overlays are automatically oriented to face).
Now with the clipping tool cut out the window shape from the 128×128 brush leaving all the pieces intact – Do not delete any part of the brush!
Yours should look similar to that of mine on the right, or in some configuration where you can grab the lengths as described in the example above.

Now I’m afraid you have to do some math here to get the correct values to place into the overlay. With my texture these are the units I have in hammer for the distances and then how to get those values as a number between 0 and 1:
- U Start: 16 units ~ 16/128(Total Brush Length) = 0.125
- U End: 56 Units ~ 56/128 = 0.4375
- V Start: 28 Units ~ 28/128(Total Brush Height) = 0.21875
- V End: 112 Units ~ 112/128 = 0.875
With these values you can enter them into an overlay so that it will only display the texture from between those UV co-ordinates.
If you haven’t already done so, create an overlay with that texture and make it the same size as the window – my example was 40×84 – and input those values.
Now you have a nice brand new window overlay to use on your maps like mine on the right. And no texturing or material creation required
I may add some more examples of what can be done with overlays at a later date, such as animated waves on the water some may remember seeing in HL2.

*Example – Will post how to steps only if there is enough interest.
You can find those textures in the browser by looking for “shore” and you will see the two variants. With what you learned here, using them is not that difficult hence why I have not included it from the start but only if there is a demand for it. It would just be a re-hash of the connecting overlays section really.
Even still, this should keep you busy for a while
-Logan “Lost” Dougall



