This is an old revision of the document!
This section explains what a leak is, why leaks are important, how they are found and fixed, and how leaks are prevented.
Maps created for the Ca3D-Engine are preprocessed by several compile tools (e.g. CaBSP, CaPVS, CaLight) for optimal performance. These compile tools assume that any map has an inside (where the player and monsters are), and an outside that nobody except for the mapper will ever see. The inside must be sealed “air-tight” or “water-tight” from the outside.
That is, if you imagine you flood-filled the map from the inside with water or pressurized air, at no point must the water or air be able to escape to the outside. Therefore, each place where that would be possible is called a leak.
“A leak is a hole in the world, where the inside of it is exposed to the (unwanted) outside region.” – CaBSP error message when a leak was found.
This section is currently under construction.
If your map has a leak, the CaBSP compiler will automatically detect it and consequently abort the compilation with an error message like this (if there is more than one leak in the map, only the first leak will be reported):
*** Fill Inside *** 0: 0: 1 ### LEAK DETECTED! ### A leak is a hole in the world, where the inside of it is exposed to the (unwanted) outside region. Thus, I generated a leak pointfile. Load this file into CaWE, and find the beginning of the line. Hint: The beginning is always near one of the "info_player_start" entities. Then find and fix the leak by tracing the line until you reach the outside. (I always take the shortest path, so this should be easy.) Notes: - Leaks can be *very* small. Use a close-up view, if necessary. - Use the grid. The grid is useful to fix leaks + to avoid them from the start. - Make sure that *all* "info_player_start" entities are inside the world! - Please refer to the documentation for additional information. Pointfile written to Games\DeathMatch\Maps\LeakDemo.pts FATAL ERROR: Stopped by leak. Program aborted.
That means that with a leak in the map, you cannot run the map at all. As CaBSP doesn't write any output file in this case (except for the above mentioned pointfile), neither the subsequent compilers (CaPVS and CaLight), nor the Ca3D-Engine itself can run the map.
Future versions of CaBSP may reduce the severity level of the occurrence of a leak from an error to a mere warning. This will allow you to run your map with Ca3DE even if it has leaks, but nonetheless will leaks remain a problem that should be fixed. Leaks always indicate that the map could not be optimally processed, and thus imply higher polygon counts and lower performance.
The next section will tell you how to find and fix the leaks reported by CaBSP.
This section is currently under construction.
This section is currently under construction.
CaBSP has become very good in reliably detecting leaks, and when CaBSP aborts compiling and complains about leaks, it makes pretty clear in its error message what's going on.
However, if this is your first leak, I'd much recommend to read the great explanation in the Hammer online help in the Troubleshooting section: “How do I fix leaks in my level?”. It also teaches you what leaks are and how you can prevent them. Here are a few additional remarks that might be helpful:
Finally, let me mention a very rare situation in which CaBSP reports no leak, but a leak is present: The symptoms of such unreported leaks are a blank screen when you load the world in Ca3DE, only environmental background is displayed, or you are falling through the floor and everything disappears after a few seconds. Such leaks occur sometimes when some old BSP decompile tools that are still available on the internet, produce world geometry that is so degenerate that not even CaBSPs rounding error control and validity tests can help it. It is possible to remedy such cases automatically, but I will write a description for the process only should somebody actually ever experience this problem.