Call of Duty 2: Compile Tools Documentation

From COD Modding & Mapping Wiki
Jump to: navigation, search

Nutshell.png CoD2 Compile Tools is your user interface for easy compiling, lighting, paths, vis, vclogs, and loading levels.

The first time you start CoD2CompileTools you may have to specify where your CoD2 is installed.

The default path is "C:\Program Files\Activision\Call of Duty 2\".

To specify where CoD2 is installed click the "Browse..." button located near the upper left corner.

Once you have told CoD2CompileTools where your game is installed you should then see a list of map files under the "All Maps" tab.

Cod2compiletools firstload.jpg

Now you are ready to compile BSPs, compile Lighting, calculate vis for multiplayer maps, and connect paths for single player maps. This tool will also allow you to easily create a grid file for the selected level.

Cod2compiletools compilemap.jpg

BSP Options

-onlyEnts Only recompiled the entities within you map. Doesn't touch brush triggers, geometry, or lighting. This is useful if you want to quickly recompile a map that you only moved an entity in. (Note that if you move a model that casts a shadow, the lighting will not be recompiled by doing onlyEnts, so your shadow will still be in it's old position, not where you moved that model to.)
-blockSize Grid size for regular BSP splits; 0 uses largest possible
-sampleScale Scales all lightmaps; 2 doubles pixel size, 0.5 halves it
-v Verbose; enables extra compilation messages
-verboseEntities Includes verbose messages for submodels if '-v' is given
-subdivisions Divides all geometry on a grid; only works for small maps
-noSubdivide Ignores the 'tessSize' setting in all materials
-brushSmoothAngle Smooth lighting at brush edges at angles less than this
-curveSmoothAngle Smooth lighting at curve edges at angles less than this
-terrainSmoothAngle Smooth lighting at terrain edges at angles less than this
-noWater Ignores all water brushes
-noCurves Ignores all patch and terrain geometry
-noDetail Ignores all detail brushes
-fullDetail Turns all detail brushes into structural brushes
-leakTest Quits immediately if the map leaked
-expandPlayer Writes a map for Radiant to see player-to-brush collision
-expandBullet Writes a map for Radiant to see bullet-to-brush collision
-debugPortals Writes a showing portal/structural geometry
-noReorderTris Disables reordering of optimized triangles for T&L cache

Light Options

-Verbose Turns on verbose prints
-Quiet Turns off progress counters (can be used with -Verbose)
-Warn Sets the warning level
-Fast Use fast presets for several options (generates lower quality lighting but is much faster)
-Extra Use high-quality presets for several options (generates high quality lighting but takes longer)
-ModelShadow Allows model surfaces to cast shadows
-NoModelShadow Prevents model surfaces from casting shadows
-Traces Number of traces to do from each sample point
-Jitter Breaks up aliasing from trace pattern (0 none, 1 max)
-SuperSample Turns each sample into NxN samples instead
-BounceFraction Higher values are more washed out, lower values darker
-Gamma Gamma value assumed to be implicitly stored in textures
-ContrastGain Increase lighting contrast (0 no change, 1 max)
-Threads Allows using more or fewer threads than processors
-DumpOptions Displays current settings of most parameters

What is a Grid?

Entities (models, players, AI) in a map are lit by the lights in the map. In complex maps (as opposed to small test maps) calculating which lights affect which entities takes a lot of work.

To prevent the engine from having to do this in real-time, this information can be written into the bsp using a mapname.grid file.

If a map doesn’t have a grid, you will experience harsh hitches when entering new areas where entities are now visible. These hitches feel like texture thrashing. Grids are needed for both single player and multiplayer maps. A map must be recompiled after creating or modifying a grid.

Sources: Infinity Ward Docs