MODSon[line.com] Wiki - Beta 1.0

Call of Duty 4: Compiling

From MODSonline Wiki

Jump to: navigation, search

Contents

[edit] Introduction

The Compilation is the first step to get a map running in-game after having worked on it with Radiant. The Format of the compiled map is still a .d3dbsp file type, but may have changed since the previous opus of the Call of Duty Series, as Call of Duty 4 uses a new engine.


[edit] Usage

Compiling a map in CoD4 can be done either via the command line, or via the modtools interface (User Interface).

[edit] Command Line

  • cod4map.exe
CoD4Map v1.1 (c) 2002 Id Software Inc. / Infinity Ward
USAGE: cod2map [options] mapname, where options are 0 or more of the following.
Options ignore capitalization; it is only present in the list for clarity.

-platform               Required if not copying a bsp between platforms; specifies target platform
-pcToXenon              Copies a PC bsp to a Xenon bsp
-xenonToPc              Copies a Xenon bsp to a PC bsp
-v                      Verbose; enables extra compilation messages
-verboseEntities        Includes verbose messages for submodels if '-v' is given
-onlyEnts               Compile doesn't touch triggers, geometry, or lighting
-sampleScale            Scales all lightmaps; 2 doubles pixel size, 0.5 halves it
-blockSize              Grid size for regular BSP splits; 0 uses largest possible
-subdivisions           Divides all geometry on a grid; only works for small maps
-noSubdivide            Ignores the 'tessSize' setting in all materials
-staticModelCollMaps    (Legacy support) Use collmaps for static models
-displayCollMapWarnings Display missing collmap warnings
-smoothAngle            Smooth surfaces are only smoothed at angles less than this
-loadFrom               Reads this map instead, but still writes to <mapfile>
-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
-brushMethod            Brush optimization method (players/bullets/all/none)
-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 _portals.map showing portal/structural geometry
-debugLightmaps         Fills lightmaps with random colors to show seams
-noReorderTris          Disables reordering of optimized triangles for T&L cache
-listSlowEntities       Lists entities that process in more than this many seconds
-warnLayerUses          Generates warnings for layer combos used this many or fewer times
-warnLayerArea          Generates warnings for layer combos used less than this many square inches
-reflectionDebug        Reflection debug mode. 1 is rainbow colors.


  • cod4rad.exe
USAGE: cod2rad [args] mapname, where args is 0 or more of the following.
Options ignore capitalization; it is only present in the list for clarity.

-Verbose             Turns on verbose prints
-Quiet               Turns off progress counters (can be used with -Verbose)
-Warn                Sets the warning level
-Platform            Target platform (pc, etc)
-Fast                Use fast presets for several options
-Extra               Use high-quality presets for several options
-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)
-SuperSampleAlpha    Does N lookups to antialias each alpha mask test
-SuperSample         Turns each sample into NxN samples instead
-MaxBounces          Stops radiosity after N bounces if it hasn't settled
-RadiosityScale      Scales intensity of all bounced light; 1 is no change
-TraceFilterLinear   Linearly filter lightmap pixels hit by radiosity traces
-TraceFilterPoint    Point sample lightmap pixels hit by  radiosity traces
-Gamma               Gamma value assumed to be implicitly stored in textures
-ContrastGain        Increase lighting contrast (0 no change, 1 max)
-NoRelight           Disable optimization of using results from last compile
-BasisDirCount       Sample directions used to approximate lightmap pixel
-Threads             Allows using more or fewer threads than processors
-DumpOptions         Displays current settings of most parameters


  • converter.exe
USAGE: converter [options], where options are 0 or more of the following.

build all
clean all
-nospam
-gamedir <game dir path>
-nocachedownload
-cacheupload <password>
-cachesqlserver <server name>
-cachesqldb <db name>
-cachefilepath <filepath>
-cacheprefix <depot name prefix>
-skiptype <asset type>
-single <asset type> <asset name>
-verbose
-changelist
-zonesoundvars <loadspec,loadspec,...>
-y
-n

[edit] User Interface

Not documented yet


[edit] Errors

  • error during inizialisation R_RegisterFont: error while reading font 'fonts/consoleFont
    This has been reported as a conflict between the language of the installed game and the language set by default by the ModTools. Please change accordingly; in the folders RAW and ZONE_SOURCE, the subfolders are named english by default.[1]
./Call of Duty 4: Modern Warfare/raw/english
./Call of Duty 4: Modern Warfare/zone_source/english

  • code bug: triangulation failed!
    This is due to possibly too many mesh. Possible solutions are as follow:
    • Replace flat terrain by brush
    • Test the map by portion: copy and paste half the map in a new temporary map. If that one compile fine, try with the other half. Repeat the process as many times as needed to find the part of the map to be reworked.

  • ERROR: Reflection probe at (x y z) is in solid.
    Delete or move this reflection probe as it will make the compiling to fail.

  • MAP_MAX_NODE
    Too many structural brush. Try and make a portion of those detail brush.

  • MAP_MAX_BRUSHES
    Too many brushes. Try and delete as many unneeded brush as possible.

  • MAX_CELL Exceeded
    Too many portal cells. This might be due to too may splited space.

[edit] BSP limits (approx.)

models: 4096
materials: 1024 (1223)
brushes: 32768 (32765)
brushsides: 655360? (655368)
planes: 65536 (65544)
entdata: 16,777,216 byte / 1 MiB (16773218)

nodes: 32768 (32773)
leafs: 32768 (32768)
leafbrushes: 262144 (262150)
leafsurfaces: ?

collisionverts: 65536 (65542)
collisiontris: 131072 (131080)
collisionedgewalk: ? (393026)
collisionborders: 32768 (32775)
collisionparts: 131072 (131181)
collisionaabbs: 262144 (262654)

layered verts: 524288 (524317)
layered data: 1048576? (1284080)
simple verts: 524288? (589834)
layered indexes: ? (992147)
simple indexes: 1048576? (1179581)
layered tri soups: 32768 (32771)
simple tri soups: 32768 (32766)

lightmaps: 31
light grid header: ?
light grid rows: 4096 (4235)
light grid points: 1048576 (1048545)
light grid colors: ? (671063)

visibility: ?
portalverts: 16384 (16380)
layered aabbtrees: 32768 (32791)
simple aabbtrees: 32768 (32738)
cells: 1024
portals: 2048
cullgroups: ?
cullgroupindexes: ?
reflection_probes: 255
primary lights: 255
light regions: 255
light region hulls: 2048 (2045)
light region axes: 16384? (16000)
paths: ? (1666)

Personal tools