Sunday, July 10, 2011

Leaks and how to fix them

What are leaks

While making a map, you will encounter a problem while compiling. Sometimes, the map simply won't compile. Most of the time, these errors will be caused by leaving a gap in the map. While making a map, the geometry inside the map is said to be inside the map while everything outside is said to be in the void. Actually, you can call it anything as there is no particular definition of the outside area. It does not matter how small or big the gap is, your map won't compile or even if it will compile, the lighting won't be calculated. The gap itself is known as a leak. Here is a small sample:
You can obviously see this leak


How to remove leaks

There are many different ways to remove leaks. The first method should work for any one for the first time though.

1.   Pointfile method.(in-game)

  When testing the map, type pointfile in the console

This will trace the leak by making a tracer like line towards the leak. Follow the line and it will soon lead you to the leak

2.  Pointfile method(vhe)

  You must have seen a lot of files being generated while compiling. One of the file is the prt file which loads up upon the pointfile command. Go to map>load pointfile and you will see red lines around the leak in your map. This will show you the leak in the map.

3.  Block method

  This method is a bit unorthodox in finding leaks. Basically, you make a large chunk of brush in your map. This chunk is so large, it encompasses the whole area of the map. Compile and see if you find any leaks. If not then reduce the size of the chunk. Go on till you find the leak. To illustrate this, I have made a screenshot of the chunk:


 
    This method can also be used in conjunction with the pointfile method if you don't know the exact location of the leak.



  Remember that a leak can also be less than a unit. Leaks are really small and pesky. But a good map design can never lead to leaks. Just remember that however big a map is, you must always compile it every time you make a big change in the design of the map.

No comments:

Post a Comment

Post your views here