Map Compiler

Before you can load a map into the engine, you need to compile it into the .WMB format that the engine accepts. Build converts the map into the .WMB format, adds the lighting information, and generates a BSP tree for optimizing the frame rate even in huge levels. You can run it from the Build WMB window. The following options are available (some are mutually exclusive):

Build BSP Map Compile the map as full level with BSP / PVS data. This is the default. Engines that support BSP rendering (like A6 or A7 Pro) render especially indoor levels noticeably faster.
Build Simple Map Compile the map without BSP / PVS data and palettes, for simple level or Map Entities, or levels that contain concave or imported elements and are not suited for a BSP tree. The map compiles faster this way, but light maps can compile slower.
Update Entities Only the entities are updated in an existing WMB map. This way, the entity positions and properties can be fine-tuned without having to rebuild the whole map.
Update Textures To copy changed texture images into an existing WMB map. The name, size, scale, or position of textures must not be changed. This option must only be used when the map itself was not changed or edited after the last compile process.
Update Lights For recalculating the static lights if nothing else has changed.
Visibility Calculations Set this to off for disabling PVS generation. The level will be compiled much faster, but the rendering of the level will be slower. For extremely huge levels (> 5000 portals) this may be the only way to compile them at all in considerable time.
Light Calculations Adjust the light/shadow quality. Lower quality results in faster compiling time, but reduced shadow resolution.
 
Warnings Quiet: no warnings; default: only important warnings; all: all warnings
CPUs to be used Number of simultaneously running build threads. If every CPU has one thread, the build process will be faster. Don't put two or more threads to one CPU. Hyper-Threading CPUs can work with two threads.
Detail faces Calculate none or all detail faces. Auto renders only the visible detail faces.
Zoom Level Zoom the geometry by the given factor before building, and zoom it back afterwards. This can be used to prevent inaccuracies due to the integer snap of all coordinates. The level size multiplied by the zoom factor must not exceed the Max Level Size.
Tessellate Shaded Divide shaded textures every N texels. The lower the value, the better are the dynamic light. Higher values are for high FPS. By default, shaded surfaces are tessellated when they span more than 240 texture pixels, and flat and turbulent faces are not tessellated at all. Reducing the tessellation size increases the number of polygons, but also increases the dynamic light resolution especially for spotlights.
Tessellate Flat Divide flat textures every N texels. The lower the value, the better are the dynamic light. Higher values are for high FPS. Auto is for the highest FPS.
Tessellate Turbulence Divide turbulence textures every N texels. The lower the value, the better are the dynamic light. Higher values are for high FPS. Auto is for the highest FPS.
Lightmap Ambient Set the lightmap ambiance, lower values give a better shadow gradient.
Lightmap Gamma Gamma value for static shadows. Higher values increase the brightness of shadows.
Phong Jitter When compiling in light low quality mode, a light sample is taken every 16 texture pixels. In high quality mode, 4 light samples are taken and then averaged into a single light texel. The jitter distance gives the offset of these 4 points from the final location. Larger values provide better averaging over a large area, while smaller values work better for small surfaces and edges. This parameter only influences smooth shading. Flat shading has a fixed jitter setting of 8 and preview mode corresponds to a setting of 0.
Lighmap Scale  A7  Lightmap resolution in Create Meshes mode (see below). "Std" gives a resolution of 1.0. Better-looking lightmaps are achieved with higher resolutions. The higher the value, the slower the lightmap calculation and the more video memory is consumed. A scale of 2.0 requires 4 times the lightmap space, 3.0 requires 9 times the lightmap space and so on. Hires lights get twice the resolution.
 
Lighting 2.0 A7.1 New fast radiosity lighting algorithm. Always check this box unless you want the slower and coarser lighting of A6.
Light Limit Limits the light value stored in the light maps (0..255, after compression).
Light Compress Helps to increase the contrast in overexposured areas. The value represents the percentage of the light limit (see above) where the compression will be activated. 0% means full compression and 100% deactivates it.
Light Scale Scales the brightness of light sources (0.0..3.0)
Radiosity Subdivision Determines the quality of radiosity lighting. Lower value causes better quality but slower compilation. Higher values can be used for draft results.
Radiosity Bouncing Determines how often the light is reflected from walls (0..32). 0 disables radiosity completely. Higher values increases the indirect light in a scene.
 
Don't snap vertices By default, all vertices of convex blocks are snapped at integer coordinates. This can produce inaccuracies at small details or T-junctions of blocks, which is prevented by enabling this flag. The drawback is that the BSP tree process will be affected, resulting in a slower level and possible visibility problems.
Close when done Closes silently without requiring the Ok button to be clicked.
Solid Sky Treats all surfaces with the sky render flag as solids. Without it, the sky surfaces have their passable flag set. This has legacy reasons because the old lensflare code could not deal with a solid surface between the camera and the sun. Solid Sky should be set unless you use A5 templates.
Merge Across Leafs Re-merges polygons that were split by the BSP tree process. Reduces the number of polygons and vertices, and the WMB size; can increase the frame rate by up to 10%. Also removes the shadow seams that can be visible under some circumstances. Merging slows down the build process a little bit but improves runtime speed and quality. In some complex levels this method may fail, in all other cases the option should be enabled.
NOTE: This option requires the floor_trace variable set at 2 for using the ellipsoid collision detection, and does not work with AABB collision detection.
Lit maps only When enabled, a surface that receives no light from a static light source will not write out a lightmap at all. This reduces the WMB file size and memory usage, but when using shaders or a high ambient light, surfaces without lightmaps can turn out pitch black when they should not.
Write Logfile Outputs all messages from the build process into a buildlog.txt file.
Invisible == None Sets the None rendering flag for all surfaces of invisible blocks, rather than suppressing the block. Required when invisible blocks should be obstacles for the OBB collision detection.
Create Meshes  A7  Let the engine render static meshes, rather than polygon based blocks. Required for the A7 light manager, or when shaders are applied to level surfaces. This box should normally always be checked. Level rendering can be greatly sped up by combining block groups to single meshes.
Max Level Size The maximum map size can be increased to up to 250000 units. Note that higher than default level sizes can produce more warning messages with thin blocks and geometry problems. The z buffers of most 3D cards can not deal with huge distances unless camera.clip_near is set to a relatively high value. Use this option with caution.
Hull Offsets Used by the AABB collision detection for determining the two staqndard hull sizes for fat and narrow actors. The first number is the horizontal size of the hull, the second is the vertical size, and the third is the vertical offset of the hull relative to the entities' origin.
All map entities should be compiled with the same hull sizes as the level. 4 predefined vectors contain the current level's hull box sizes for evaluation in functions: hull_narrowmin[3], hull_narrowmax[3], hull_fatmin[3], and hull_fatmax[3]. They contain the x, y, z minimum and maximum values of the narrow and fat hulls.
Command Line Command line options for the build process, for experimental purposes.

Sometimes you'll encounter warnings, sometimes even error messages when building your map. In the latter case the WMB file won't be produced. You'll find a list of warning messages under Error Messages. The errors are usually caused by problems in your maps. Under Map Design you'll find hints how to avoid errors. Mostly they are produced by exeeding the map limits or creating invalid blocks.

► latest version online