Unsealed Map
This is the most common type of leak a mapper will encounter.
As mentioned previously, the map must be sealed air-tight with a relatively thick solid brush. When I say
thick, I mean a brush thicker than 8 units. Playing on the safe side, I always seal my maps with brushes that are at least 16 units thick. Sealing the map with anything thinner is just like leaving a gap between solid brushes.
Map Sealed with a Non-Solid Brush
You can think of this type of leak as a variation of the unsealed map. When we're trying to seal a map, we can only use solid world brushes to do the job. Attempting to use a brush entity (
i.e. func_door, func_detail), a displacement surface, or a model to seal the map would result in leaks.
Remember, a brush that has one of its surfaces converted into a displacement surface cannot seal a map.
Entities Outside the Map
Outside of our sealed map, there can be nothing else (well, there is an exception with the 3D skybox, but we'll get to that in
another tutorial). So if you placed any entity in the outside void, you'll encounter a leak problem.
 Entities outside the map |
Unsealed Areaportals
When an areaportal does not properly seal the two areas it connects, the compiler will also generate leak error messages. See the
tutorial on Optimizing Performance for more information on using areaportals.
 Unsealed areaportal |
Outlying Origins
A more subtle cause of leaks can occur with any entities that have origin helpers, such as func_door_rotating or func_rot_button. While the entity itself may be inside the world, if the origin helper is outside the map, the entity will cause a leak. Pay special attention to these entities (any entity that requires an origin) when you create and manipulate them to avoid leaks.
Finding Leaks
Personally, I found the official "pointfile" method of finding leaks difficult and unintuitive. So I never use it. Instead, I use the error message generated by the compiler to get an idea of the location of the leak. Usually, it will point to a specific brush. Use the "Show Selected Brush Number" option under the "Map" menu to see which brush is involved in the leak, and go from there.
I also find it helpful to locate leaks by cordoning sections of the map and compiling just that section. If the compile runs without error, then the leak must not be located within that cordoned section of the map. Repeat the process until all the sections in the map are compiled. Using this method of divide and conquer, you can usually narrow down the leak to a specific part of the map quickly, and subsequently fix the leak.
But as I said earlier, prevention is the best way in avoiding leak problems. Good luck, and live long and without leaks.