|
|
Leaks - Finding Them All Difficulty: Beginner |
| Category: CS:S > Mapping | Author(s): |

Researched Info Of The Net...Id recommend you reading this before posting help related to leak issues
Levels created with the Source Engine must be completely internally sealed. No part of the interior of the level, the "world", must connect with the outside, the "void". When there is any kind of gap to the void, a leak is generated when the map is compiled by vbsp. When a leak occurs, the tools cannot know which part of the level is inside, and what part is outside, and vvis cannot be run.
When a map like this is compiled, with a gap to the void, vbsp generates an error similar to this in the compile log:
Quote:
ProcessBlock_Thread: 0...1...2...3...4...5...6...7...8...9...10 (0)
**** leaked ****
Entity light (-1607.69 -1094.12 -183.00) leaked!
Effects of leaks
A leak in a level has a number of bad effects. First, the vbsp process will report the leak, and it will not produce a portal file (mapname.prt). The portal file is used by the vvis process to perform its visibility calculations. Since there is no portal file, vvis will not run at all. When vvis doesn't run, it doesn't produce the files necessary for the vrad process to calculate its light bounces. Due to this, the vrad process will only perform direct lighting - no light bounces.
The most serious effect by far is that the vvis process will not run when a leak is present. When the level is run in the game, the rendering engine will not have any visibility info available with which to limit itself, so it will attempt to draw the entire level. This will most certainly lead to high polygon counts and may lead to sections of the map to render incorrectly or not at all.
Finding leaks
Sometimes these gaps aren't quite as obvious as the above example. They can be as little as one unit wide and still cause a leak. The compile tools provide you with a pointfile to help you locate the leak. A pointfile is a file generated by vbsp that draws a line between the void of the map to the entity it found during the leak check. After receiving a leak error in vbsp, a mapname.lin file will be created in the same directory as your .vmf map file.
Other causes of leaks
Besides gaps in outside geometry, there are other map errors that can cause vbsp to generate a leak error. For any of these errors, see the following section for information on finding the source of the leak and fixing it.
Entities outside the level
Placing any entity in the void will cause a leak.
One common mistake is the accidental placement of an entity outside the interior level space. This can happen if you place an entity outside in the void area while you're working on it, then forget to delete it when you're finished. This can also occur if you attempt to seal the map with an brush entity, such as a func_door. Since brush entities do not block visibility, this will create the same condition as if there were a gap in their place. All entities must be inside valid level space, or the map will generate a leak. This is because vbsp determines the inside of the level depending on where it finds entities.
Improperly constructed areaportals
Areaportals that do not seal areas will cause leaks.
Leak error messages can also be generated when an areaportal does not properly seal the two areas it connects. See the section on areaportals in the Performance and Visibility document for more information. Finding leaks with areaportals uses a similar method as geometry gap leaks.
Non-solid geometry does not seal the world
Seal areas behind non-solid geometry to prevent leaks.
One more cause of leaks is if you try to seal a map using other types of non-solid geometry, such as displacements (terrain), water, or func_detail brushes. None of these non-solid brush types will block visibility and seal the world. Attempting to use them in this way will generate a leak. You can fix this type of leak by adding a solid brush behind them to seal the map. Using a brush with the tools/toolsnodraw material will seal the map, but not add any additional rendering cost, so it's a great way to seal the map behind non-solid geometry. |
| Added: 2 years ago | Tags: leaks, finding, them |
 Add Feedback Provide constructive feedback. What is "constructive"?You cannot post yet!Get involved on FPSB by posting your thoughts. Give authors your feedback to help them develop. To post in this submission register or login. |
 You cannot assess yet!Moderating FPSB is in your hands - when you assess a submission your vote determines its success or failure. To vote on this submission register or login. This Tutorial in a nutshell... Well Written & Helpful 1 x Well Written 1 x Helpful 1 x Informative 1 x Detailed 1 x Confusing You cannot stamp yet!Stamps let you apply characteristics to submissions to help others understand them. To stamp this submission register or login. None foundWant more? Find related tuts. |