How-to: Use Batch Compiler

watch_me_diewatch_me_die Join Date: 2002-11-10 Member: 8107Members
<div class="IPBDescription">... at the request of XiaoXiao</div> <span style='font-size:14pt;line-height:100%'><b>Compiling with Batch Compiler</b></span>

This guide will explain to you how to compile using batch compiler. It assumes you have already set it up as per the instructions in <a href='http://www.unknownworlds.com/forums/index.php?showtopic=50171' target='_blank'>this thread</a>. We will be going through all the compiler options for each part of the compile process and explain what each does.

First of all:
<span style='font-size:14pt;line-height:100%'><b>Batch Compiler itself</b></span>
In the centre of Batch Compiler is the compile tools' option tabs. This is where the compile options for each tool are displayed after you have loaded a specification file. These options will be explained after this.

<img src='http://merkury.orcon.net.nz/nsmapping/bc/bc_hlfix.gif' border='0' alt='user posted image' />

On the right of the window is a series of checkboxes, where you can turn off or on each step of the compile process.

The box under the compile tools' option tabs is where you put the path to your map to be compiled. Since we're using HLFix to export from RMF to MAP, there is no need to export using Hammer - and so, this should point to your RMF file of your map. Click the "..." button on the right hand side to browse to it. The "Run" button is the button you push to start compiling. "Remember File" will save the path to your map for next time you run Batch Compiler.

Once you have decided upon all your compile options, you can save the settings as a preset. Click "File->Save Preset As..." in order to do this. After this you will need to go to Options->Setup and then the Preset Files tab. Hit "Add" and select the preset you have created, then close the Setup dialog. You can now load a preset by clicking on the Preset menu and selecting the one you want.

Under the Options menu are "Close Program On 'Run'" and "View Log After Compile", both of which are useful, but self-explanatory. The last option in the menu, "Show Details" will give a brief description of each compile parameter when you place your mouse over it.

<span style='font-size:14pt;line-height:100%'><b>Compiling Steps</b></span>

1) Open BC and enter your map's path into the box beneath the Compile Tools Options Tabs.
2) If you have a preset ready, load it, and skip to 5 ... or else:
3) Check the boxes on the right for which tools you want to run (for a normal compile this will be HLFix, MBA, CSG, BSP, VIS, RAD, OptPlns.)
4) Set the options you wish to use for each tab. (See below for explanations).
5) Click the "Run" button.
6) Wait <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->

<span style='font-size:14pt;line-height:100%'><b>And now... the compile options!</b></span>

<span style='font-size:12pt;line-height:100%'><b>HLFix</b></span>

<b>What it does:</b>

From the site:
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->hlfix is a tool that converts Worldcraft/VHE format files (.rmf) to standard .map files. In the process, it performs a number of geometric operations to fix common problems with brush geometry. hlfix is far more sophisticated than VHE's built-in map export feature. The purpose of this tool is to give map designers much greater flexibility in the type of geometry they use to build their maps.<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->

<b>The Options:</b>
<img src='http://merkury.orcon.net.nz/nsmapping/bc/bc_hlfix.gif' border='0' alt='user posted image' /><ul><li>RMF File - This will output an RMF file instead of a MAP file. If you're using HLFix as part of the compile process as we are, this should be off.</li><li>No tesselation/decomposition/unite/corrections - These should all be off, unless you're having problems with what HLFix is doing. Basically they turn off each feature of HLFix.</li><li>Visible Objects Only - This is useful if you have hidden visgroups in your map which you don't want included in the compile. Good for hiding areas you thing are causing problems.</li><li>Epsilon Factor - You shouldn't need to change this, read the "Show Details" info box for more info on it.</li><li>Output file - Don't change this, BC needs the same output name for each step of the compile process.</li><li>Wad List - You <b>MUST</b> point this to the wad.txt which makewad.exe generates, or your map will have no textures. (See the Setup tutorial for more information).</li></ul><span style='font-size:12pt;line-height:100%'><b>Map Backup Application</b></span>

<b>What it does:</b>
Map Backup creates a backup of your map each time you compile. This is very handy in case your RMF becomes corrupted or you make changes that you want to undo. It also means you don't need to create many different versions of your map in order to test something as you will have a backup of each variation you create.

<b>The Options:</b>
<img src='http://merkury.orcon.net.nz/nsmapping/bc/bc_mba.gif' border='0' alt='user posted image' /><ul><li>Sub-Directory Save - Tick this, it will prevent your maps directory from becoming cluttered by backing up the map under a directory with the same name as your map.</li><li>Maximum Backup Files - Sets a limit on the number of backup files. Once it reaches the limit it will go back to 1 and count up again - and remember that deleting backups will mess up the order of things.</li><li>Extension - You can set an alternate extension for the backups - for example .BAK.</li><li>Backup Path - Sets a specific path to backup to (overrides Sub-Directory Save).</li><li>Additional Files - You can set additional files to be backed up in here.</li></ul><span style='font-size:12pt;line-height:100%'><b>CSG</b></span>

<b>What it does:</b>
CSG works out the Constructive Solid Geometry for your map (basically it puts all the brushes together) and creates the 4 hull files.

<b>The Options:</b>
<img src='http://merkury.orcon.net.nz/nsmapping/bc/bc_csg.gif' border='0' alt='user posted image' /><ul><li>No Wad Textures - Includes ALL used textures into your map... not recommended.</li><li>Entities Only - Compiles the map changing only the entities, good for tweaking things like particle systems - however do not try to add or remove entities and recompiling with this feature as it will break things. Sometimes moving entities will also break stuff.</li><li>No Sky Clip - Turns off automatic clipping of the skies. Should really be left on.</li><li>No Clip - Disables all clipping. This means that the entire level is non-solid. Just for testing purposes.</li><li>Brush Union - Warns you if a brush overlaps another by a certain percentage, set the percentage in the text box.</li><li>Tiny - Remove faces that are smaller than a certain number of square units. Set it in the text box.</li><li>Hull File - You <b>MUST</b> set this for NS to work properly. Browse to your NS directory and select "nshulls.txt".</li><li>Wad File - Include used textures from the wad file into the map, good for custom textures.</li><li>Wad Path - Include used textures from the wads in this directory into the map.</li><li>Automatic Wad Detection - Only uses wads which you actually used textures from in the map, this enables you to use many wads in Hammer and only have the used ones included.</li><li>No Clipnode Economy Mode - Turns off stripping clipnodes from places where they aren't needed (such as func_illusionaries). Recommended that you leave this off, as NS maps come very near the limits.</li><li>Wad Config - Allows you to specifically set the wad files you want used. Better to let CSG figure it out automatically.</li><li>Clip Type - These are XP-Cagey's modifications to CSG. The infobox will give full information on each setting.</li><li>Null File - This allows you to list entities which you want retextured with NULL automatically, and hence have their faces stripped. Works well for trigger_*-style entities.</li></ul><span style='font-size:12pt;line-height:100%'><b>BSP</b></span>

<b>What it does:</b>
BSP creates the Binary Space Partition for the map, generating a playable level by combining the information CSG generated.

<b>The Options:</b>
<img src='http://merkury.orcon.net.nz/nsmapping/bc/bc_bsp.gif' border='0' alt='user posted image' /><ul><li>Leaks Only - Ignores everything else and just checks for leaks, generates a PTS file for use in HL or Hammer.</li><li>Not T-Junction - There is no need to use this at all, purely a debugging option.</li><li>No Fill - Prevents filling from being performed, meaning there is no "void" and the outside faces of the map will not be stripped. Leaks won't occur. Don't use <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo--></li><li>Subdivide - Setting this higher will create lower r_speeds in most cases, but breaks software mode - thus it is not allowed in NS as Flayra is trying to be software compatible.</li><li>Max Node Size - Decreasing this will break the world into smaller sections - it will increase r_speeds but make VIS information more accurate.</li></ul><span style='font-size:12pt;line-height:100%'><b>VIS</b></span>

<b>What it does:</b>
VIS calculates the Visibility Information Set for the map, basically working out which parts of the map can see which other parts of the map.

<b>The Options:</b>
<img src='http://merkury.orcon.net.nz/nsmapping/bc/bc_vis.gif' border='0' alt='user posted image' /><ul><li>Fast - Performs a quick VIS, but r_speeds will be very high and errors common. Not recommended unless for a test build to find errors.</li><li>Full - Performs a full VIS, corrects most errors at the cost of time. For release compiles.</li><li>Maximum Vis Distance - Forces all leaves beyond this distance to be unseeable for the player. Be careful with how you use it.</li></ul><span style='font-size:12pt;line-height:100%'><b>RAD</b></span>

<b>What it does:</b>
RAD calculates the radiosity (lighting) for the map.

<b>The Options:</b>
<img src='http://merkury.orcon.net.nz/nsmapping/bc/bc_rad.gif' border='0' alt='user posted image' /><ul><li>Extra - Turns on 9 point oversampling for the lighting and halves the texture lighting chop, making it look much better much taking much longer. Use for release compiles.</li><li>Sparse - Uses a compressed vismatrix. If you don't have much memory in your computer then turn this on. (This setting makes no difference to quality of the lighting.) Sparse also allows you to break the 65535 patch limit.</li><li>No Vismatrix - This completely disables the usage of a vis matrix - however if you are using opaque entities in your map, it will take much longer. Works best with more than one processor.</li><li>Circus - Any parts of the map which are completely black will be set to a random colour. Debugging option to see what parts of the map need lighting.</li><li>No Linear Interpolation - Uses nearest point sample instead of 3 point interpolation for patch blending. Looks worse.</li><li>No Sky Fix - Uses old-style Sky lighting (multiple light_environments needed).</li><li>No texture scale - Disables scaling the patches to the textures. If you have many scaled-down textures in your map this will lower the patches, and conversely if you have many scaled-up textures in your map this will raise the patches.</li><li>Dump light patches - Developer/debugging option, no need to use this.</li><li>Incremental - similar to the "entities only" option for CSG, but for lighting instead. On the first run of rad, it will generate an incremental transfer list file. On subsequent runnings of rad for your map, you can tweak the lighting (but not geometry) and RAD will skip the BuildVisLeafs, MakeScales, and SwapTransfers stages of lighting.</li><li>Bounce - Sets the number of times light can bounce. Recommended that you don't set this above about 3 or your maps will lose their atmosphere and look washed out.</li><li>Smooth - Sets the angle below which edges will be smoothly lit in order to look like they are round.</li><li>Chop - Sets the radiosity patch size. Basically, the lower this is the better lighting will look - shadows will be sharper. However the lower you set this the more patches your level will have and the longer it will take to compile. Using the Sparse parameter will allow you to get around the 65535 max patches setting. The default is 64, try lowering it by values of 16 at a time.</li><li>Texture Chop - Sets the value of texture light's chop value, which is different to normal lights. By default this is half of the normal Chop value.</li><li>Coring - Sets how much light must hit a surface before it is lit. Can lower memory usage if set to a higher value.</li><li>Max Light - Allows you to set a maximum brightness for lighting on any surface.</li><li>Direct Light - Sets the maximum direct light threshold, in a similar way to Max Light - but instead it re-normalises the brightness instead of just cutting it off if it is too high.</li><li>Direct Scale - Sets the direct lighting scale. 0 removes direct lighting completely, 1 generates the most realistic lighting, and setting it higher will create harsher lighting in relation to shadows - which can look very atmospheric in an NS map.</li><li>Fade - Sets the global fade value. 1 is default. Higher makes lights fade more quickly, lower more slowly.</li><li>Scale - Scales the lighting - 1 is default, higher values brighter, lower values darker.</li><li>Gamma - Sets the global gamma of the lighting, higher is lighter.</li><li>Sky - Sets the ambient sunlight (sunlight that will be added to shadows of faces that have direct line of sight to the sky).</li><li>Fall Off Mode - You can change the style of the falloff mode here (inverse square is the default). Inverse linear will make lights travel much further.</li><li>Ambient light - Sets a light value that will be added to all faces.</li><li>Lights file - lets you set a RAD file that will be used for texture lights.</li><li>Custom shadows with bounce - Enables using custom ZHLT shadows with bounced light. Recommended that you use No Matrix with this option.</li></ul><span style='font-size:12pt;line-height:100%'><b>RipEnts</b></span>

<b>What it does:</b>
Allows you to import/export entities from a compiled BSP. Should be run seperately from other tools. First run it to export the list, modify it, then run again to import.

<b>The Options:</b>
<img src='http://merkury.orcon.net.nz/nsmapping/bc/bc_ripents.gif' border='0' alt='user posted image' /><ul><li>Import - Imports a modified entity list back into the BSP.</li><li>Export - Exports an entity list from the BSP in .map format named "mapname.ent".</li><li>Texture Data - Allows you to modify the maximum texture data limit for the map.</li></ul><span style='font-size:12pt;line-height:100%'><b>OptPlns</b></span>

<b>What it does:</b>
OptPlns optimises the planes, stripping uneeded ones from the BSP.

<b>The Options:</b>
<img src='http://merkury.orcon.net.nz/nsmapping/bc/bc_optplns.gif' border='0' alt='user posted image' /><ul><li>No Pause - This should be enabled for Batch Compiler to work properly. Skips the need for a key press at the completion of plane stripping.</li><li>Log File - Writes log output to this file. Browse to your MAPNAME.log file and select it.</li></ul><span style='font-size:12pt;line-height:100%'><b>Shared</b></span>

<b>What it does:</b>
The Shared tab sets values that are shared between the compile tools.

<b>The Options:</b>
<img src='http://merkury.orcon.net.nz/nsmapping/bc/bc_shared.gif' border='0' alt='user posted image' /><ul><li>Chart - Outputs a list of the BSP statistics so far in the compile.</li><li>No Log - Disables generation of .log and .err files.</li><li>Verbose - Displays all minor warning messages.</li><li>Estimate - Gives a very rough estimate of time remaining for the current tool.</li><li>No info - Disables the display of the compile parameters for each tool.</li><li>Texture data - Modifies the maximum texture data. 4096 is the max for NS.</li><li>Threads - Not really needed, the tools will detect this automatically.</li><li>Priority - Set this to Low if you want to continue to work on the computer while it is compiling. If you are leaving it overnight set to High.</li><li>Developer - Display developer messages, not needed for normal usage.</li></ul><span style='font-size:12pt;line-height:100%'><b>Batch</b></span>

<b>What it does:</b>
The Batch tab allows you to set which files should be deleted after compile.

<b>The Options:</b>
<img src='http://merkury.orcon.net.nz/nsmapping/bc/bc_batch.gif' border='0' alt='user posted image' />

I recommend ticking the left two columns.

Comments

  • SuperTeflonSuperTeflon Join Date: 2003-12-31 Member: 24893Banned
    edited January 2004
    Am I retarded? Where the hell is this? I looked uner the 'options' menu, and can't do anything like that 'under' it...

    <!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->The box under the compile tools' option tabs is where you put the path to your map to be compiled. Since we're using HLFix to export from RMF to MAP, there is no need to export using Hammer - and so, this should point to your RMF file of your map. Click the "..." button on the right hand side to browse to it. The "Run" button is the button you push to start compiling. "Remember File" will save the path to your map for next time you run Batch Compiler.
    <!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->


    EDIT: Gah, you should say 'The big box at the bottom near Remember File' <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->

    <!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Subdivide - Setting this higher will create lower r_speeds in most cases, but breaks software mode - thus it is not allowed in NS as Flayra is trying to be software compatible.<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->

    Software Mode is officially unsupported, last I checked, because it runs like crap in basic NS, and allows you to do wonky things like see cloaked things, see through walls, ets.
  • watch_me_diewatch_me_die Join Date: 2002-11-10 Member: 8107Members
    It says under the options tabs not options menu <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
  • watch_me_diewatch_me_die Join Date: 2002-11-10 Member: 8107Members
    I was wondering if any of the mappers who have created official maps would like to make presets of the rad settings, etcetera they have used so that newcomers can see how things have been done... perhaps also supply a texlights.rad <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
  • XiaoXiaoXiaoXiao Join Date: 2002-11-21 Member: 9543Members
    woot woot! Thanks!
  • AscelonAscelon Join Date: 2004-02-29 Member: 26969Members
    edited May 2004
  • ToneeTonee Wub wuB UK Join Date: 2003-10-25 Member: 21926Members, Constellation
    I'm using Hammer 3.5, ZHLT and my .bsp process keeps "crashing"

    it still ets me carr on with the rest of the compile...

    when I load up HL, and try to view my map it crashes... help?<!--emo&:(--><img src='http://www.unknownworlds.com/forums/html//emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif' /><!--endemo-->
  • WolvWolv Join Date: 2002-01-25 Member: 56Members
    Whatever happened to -dscale? Don't see it in the batch compiler options (and, as a matter of fact, don't see it in the hlrad possible entries when running it without parameters).

    It scales the direct lighting only and through a bug defaults to 2. As a result you need to set high bounce values to make the indirect lighting look compareably bright, creating a smoothed but also washed out look.
    Setting it to 1 with a low bounce of 1 or 2 creates sharper lightmaps (and requires increasing all light values in your map, so it's not something you'd want to do once your lighting is already tweaked).
    Of course you could also set it higher, creating stronger direct lights.

    Since Batch Compiler doesn't have this option available you'd have to enter it under "Additional Parameters".
Sign In or Register to comment.