How to use LeafMarker
By Egir Helgrimson
Introduction
When starting out making maps most new mappers soon experience
having a LEAK. They see something like this in their compile log:
Warning: === LEAK in hull 0 ===
Entity info_player_start @ ( 129,-384, 121)
Error:
A LEAK is a hole in the map, where the inside of it is exposed to the
(unwanted) outside region. The entity listed in the error is just a helpful
indication of where the beginning of the leak pointfile starts, so the
beginning of the line can be quickly found and traced to until reaching the
outside. Unless this entity is accidentally on the outside of the map, it
probably should not be deleted. Some complex rotating objects entities need
their origins outside the map. To deal with these, just enclose the origin
brush with a solid world brush
Leak pointfile generated
The error itself actually describes what a leak is, so I am not
going to concern that in this tutorial. The big problem about leaks is
finding them. It is here that a very nice tool by Martin
Gustafsson comes in. The tool is called Leak Marker and can be
downloaded from http://www.egir.dk/files/leakmarker.zip (original
link was dead). What it does is simply marking your leak with a red
box so that you can easially find it within hammer.
Install
Installing the tool is quite simple. Extract the downloaded zip
file into a directory that you can remember. This is so painfully
simple I don't understand why I am even writing this paragraph.
A Map with a Leak
For this tutorial I have just made a tiny map with an intentional
Leak for the sake of demonstration. You can see a hammer screenshot of
the map below.
Note that I have made some ugly vertex manipulation resulting in a
leak in the roof.
When I try to compile my compile log ends up looking like the
following: (Click here to skip the code)
** Executing...
** Command: Change Directory
** Parameters: "C:\Program Files\Valve\Steam\SteamApps\{my@email.here}\counter
-strike"
** Executing...
** Command: C:\PROGRA~1\VALVEH~1\zhlt\hlcsg.exe
** Parameters: "c:\documents and settings\robert olesen\desktop\testmap\skytes
t"
hlcsg v2.5.3 rel Custom Build 1.7 (Dec 9 2002)
Zoner's Half-Life Compilation Tools -- Custom Build
Based on code modifications by Sean 'Zoner' Cavanaugh
Based on Valve's version, modified with permission.
Submit detailed bug reports to (merlinis@bigpond.net.au)
----- BEGIN hlcsg -----
Command line: C:\PROGRA~1\VALVEH~1\zhlt\hlcsg.exe "c:\documents and settings\r
obert olesen\desktop\testmap\skytest"
Entering c:\documents and settings\robert olesen\desktop\testmap\skytest.map
Current hlcsg Settings
Name | Setting | Default
---------------------|-----------|-------------------------
threads [ 1 ] [ Varies ]
verbose [ off ] [ off ]
log [ on ] [ on ]
developer [ 0 ] [ 0 ]
chart [ off ] [ off ]
estimate [ off ] [ off ]
max texture memory [ 4194304 ] [ 4194304 ]
priority [ Normal ] [ Normal ]
noclip [ off ] [ off ]
null texture stripping[ on ] [ on ]
clipnode economy mode [ on ] [ on ]
onlyents [ off ] [ off ]
wadtextures [ on ] [ on ]
skyclip [ on ] [ on ]
hullfile [ None ] [ None ]
min surface area [ 0.500 ] [ 0.500 ]
brush union threshold [ 0.000 ] [ 0.000 ]
Using mapfile wad configuration
Wadinclude list :
[zhlt.wad]
0 brushes (totalling 0 sides) discarded from clipping hulls
CreateBrush:
90%... (0.00 seconds)
SetModelCenters:
(0.00 seconds)
CSGBrush:
90%... (0.03 seconds)
Including Wadfile: \program files\valve hammer editor\zhlt\zhlt.wad
- Contains 2 used textures, 40.00 percent of map (8 textures in wad)
Using Wadfile: \program files\valve\steam\steamapps\{my@email.here}\counter-st
rike\cstrike\eatpopcorn.wad
- Contains 0 used textures, 0.00 percent of map (117 textures in wad)
Using Wadfile: \program files\valve\valve\halflife.wad
- Contains 3 used textures, 60.00 percent of map (3116 textures in wad)
Texture usage is at 0.05 mb (of 4.00 mb MAX)
0.06 seconds elapsed
----- END hlcsg -----
** Executing...
** Command: C:\PROGRA~1\VALVEH~1\zhlt\hlbsp.exe
** Parameters: "c:\documents and settings\robert olesen\desktop\testmap\skyte
st"
hlbsp v2.5.3 rel Custom Build 1.7 (Dec 9 2002)
Zoner's Half-Life Compilation Tools -- Custom Build
Based on code modifications by Sean 'Zoner' Cavanaugh
Based on Valve's version, modified with permission.
Submit detailed bug reports to (merlinis@bigpond.net.au)
----- BEGIN hlbsp -----
Command line: C:\PROGRA~1\VALVEH~1\zhlt\hlbsp.exe "c:\documents and settings\r
obert olesen\desktop\testmap\skytest"
Current hlbsp Settings
Name | Setting | Default
-------------------|-----------|-------------------------
threads [ 1 ] [ Varies ]
verbose [ off ] [ off ]
log [ on ] [ on ]
developer [ 0 ] [ 0 ]
chart [ off ] [ off ]
estimate [ off ] [ off ]
max texture memory [ 4194304 ] [ 4194304 ]
priority [ Normal ] [ Normal ]
noclip [ off ] [ off ]
nofill [ off ] [ off ]
null tex. stripping [ on ] [ on ]
notjunc [ off ] [ off ]
subdivide size [ 240 ] [ 240 ] (Min 64) (Max 512)
max node size [ 1024 ] [ 1024 ] (Min 64) (Max 4096)
Warning: === LEAK in hull 0 ===
Entity info_player_start @ ( 129,-384, 121)
Error:
A LEAK is a hole in the map, where the inside of it is exposed to the
(unwanted) outside region. The entity listed in the error is just a helpful
indication of where the beginning of the leak pointfile starts, so the
beginning of the line can be quickly found and traced to until reaching the
outside. Unless this entity is accidentally on the outside of the map, it
probably should not be deleted. Some complex rotating objects entities need
their origins outside the map. To deal with these, just enclose the origin
brush with a solid world brush
Leak pointfile generated
0.03 seconds elapsed
----- END hlbsp -----
** Executing...
** Command: C:\PROGRA~1\VALVEH~1\zhlt\hlvis.exe
** Parameters: "c:\documents and settings\robert olesen\desktop\testmap\skytes
t"
hlvis v3.0 rel 3.0 Beta 4 (Nov 11 2004)
Zoner's Half-Life Compilation Tools 3.0 For Half Life 1
Based on code modifications by Sean `Zoner' Cavanaugh.
Based on Valve's version, modified with permission.
Submit detailed bug reports to (amckern at amckern@yahoo.com)
If you have a Compile error with this stage of compile, please check
http://www.zhlt.info or the Mods Mapping Forum `Search Function'.
----- BEGIN hlvis -----
Command line: C:\PROGRA~1\VALVEH~1\zhlt\hlvis.exe "c:\documents and settings\ro
bert olesen\desktop\testmap\skytest"
>> There was a problem compiling the map.
>> Check the file c:\documents and settings\robert olesen\desktop\testmap\skytest.log for the cause.
----- END hlvis -----
** Executing...
** Command: C:\PROGRA~1\VALVEH~1\zhlt\hlrad.exe
** Parameters: "c:\documents and settings\robert olesen\desktop\testmap\skytes
t"
hlrad v2.5.3 rel Custom Build 1.7 (Dec 9 2002)
Zoner's Half-Life Compilation Tools -- Custom Build
Based on code modifications by Sean 'Zoner' Cavanaugh
Based on Valve's version, modified with permission.
Submit detailed bug reports to (merlinis@bigpond.net.au)
----- BEGIN hlrad -----
Command line: C:\PROGRA~1\VALVEH~1\zhlt\hlrad.exe "c:\documents and settings\ro
bert olesen\desktop\testmap\skytest"
>> There was a problem compiling the map.
>> Check the file c:\documents and settings\robert olesen\desktop\testmap\skyte
st.log for the cause.
----- END hlrad -----
** Executing...
** Command: Copy File
** Parameters: "c:\documents and settings\robert olesen\desktop\testmap\skytes
t.bsp" "C:\Program Files\Valve\Steam\SteamApps\{my@email.here}\counter-strike
\cstrike\maps\skytest.bsp"
** Executing...
** Command: Copy File
** Parameters: "c:\documents and settings\robert olesen\desktop\testmap\skytes
t.pts" "C:\Program Files\Valve\Steam\SteamApps\{my@email.here}\counter-strike\
cstrike\maps\skytest.pts"
This indicates that there is a leak, as the LEAK
warning I introduced in the introduction is appearing in the compile
log. Such a leak makes the map looks like the following in game:
This is UGLY, the map is full bright. We don't want maps to be
that!
Using LeakMarker
When you have compiled and the compile log shows the above
mentioned LEAK error you are ready to use LeakMarker.
During the compile, Hammer will have exported your map as a .MAP
file. My example map is called skytest.rmf so the exported .MAP file
is called skytest.map. We will need this .MAP file when using
LeakMarker.
In the directory where you extracted Leafmarker, start the
LeafMarker application, by double clicking it:
LeakMarker looks like this:
Click "Select Files"
Browse to the folder you saved your .rmf that has the leak, and
choose the .LIN file (1). Then press OK (2):
The next window that appears is just similar, except now you should
select the .MAP file (1), and then press OK (2).
You will now notice that both a LeakFile and a MapFile has been
selected, as marked with the two small orange arrows below. Press
"Mark Leak" to mark the leak in the .MAP file.
A sound should play indicateting success, and the following
windows hould appear.
Press OK and close LeafMarker.
Open Hammer and open the menu "File" and choose "Open..." as shown below
In the Files of type drop down box choose "Game Maps (*.map)" (1);
then select your .MAP file (2) and finally click OK (3). Numbers refer
to the following screenshot:
Take a flight around in your map, and you will notice a huge red
brush that wasn't there before:
Marking this brush and pressing CTRL+E will make all windows center
on the brush. And as you can see below, the brush indeed marks the
leak that I intentionally made for the sake of demonstration:
Hoorah, never again will a "My map won't compile" post appear in my
forums because of a leak, as the cure for that has been presented
above. I forsee this will be the end of online mapping
comunities.. (In my dreams).
|