Map Compiler

Before you can load a level or map entity 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 optionally generates a BSP tree for optimizing the frame rate in huge levels. The following options are available:

Build BSP Map Compile a special map with BSP Tree / PVS data. BSP engines, like A7 and A8 , can render such maps noticeably faster, especially with huge indoor scenery. But some design rules must be followed. Not any map is suited for a BSP tree!
Build Simple Map Compile a normal WMB map for ABT rendering, suited for all A7 and A8 engines.
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 can only be used when the map itself was not changed or edited after the last compile process.
Default Settings Set all map compiler settings back to their default state.
Light Calculations Adjust the light/shadow quality. Lower quality results in faster compiling time, but reduced shadow resolution.
Ok Start the map building process.
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 in BSP trees due to the integer snap of all coordinates. The level size multiplied by the zoom factor must not exceed the Max level size (see below).
Max level size BSP maps have a size limit that can be set here to up to 250000 units. Simple (non-BSP) maps don't have a size limit. Higher maximum level sizes can produce more warning messages with thin blocks and geometry problems in BSP levels. 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.
Tessellate shaded Divide shaded surfaces every N texture pixels. Lower values increase the quality of dynamic lights. Higher values increase the frame rate and reduce the memory requirement by the compiler. 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 surfaces every N texture pixels. The lower the value, the better are the dynamic lights; higher values are for high frame rate. Auto is for the highest frame rate and no dynamic lights except for the sun.
Tessellate turbulence Divide surfaces whose texture names start with '*' every N texture pixels. The lower the value, the better are the dynamic lights; higher values are for high frame rate. Auto is for the highest frame rate and no dynamic lights except for the sun.
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 min angle A7.82 Minimum angle between surfaces for Smooth. Surfaces with a more acute angle are not smoothed. This prevents light seams caused by a wrong setting of the Smooth flag.
Light compress at Helps to increase the contrast in overexposured areas. The value represents the percentage of the light limit (see below) where the compression will be activated. 0% means full compression and 100% deactivates it.
Light limit at Limits the light value stored in the light maps (0..255, after compression).
Light scale Scales the brightness of light sources (0.0..3.0)
Radiosity subdivision  A7  Determines the distance of light samples on shaded surfaces. Lower value causes better quality but slower compilation. Higher values can be used for draft results. Leave this at its default value during development, and set it to a lower value for the final compilation.
Radiosity bouncing  A7  Determines how often the light is reflected from walls (0..32). 0 disables radiosity. A higher value increases the indirect light quality in a scene, but also greatly increases the lightmap calculation time and the virtual memory required for calculation.  !!  Radiosity requires a lot of memory and lightmap calculation time in huge levels. Leave this at 0 during development, and set it to a higher value only for the final compilation.
Lightmap resolution  A7  Lightmap resolution . "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.
Close when done Closes silently without requiring the Ok button to be clicked.
Write Logfile Outputs all messages from the build process into a buildlog.txt file.
Create Meshes A7 Compiles the level in A7 mode, with 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.
Create PVS Enable PVS generation in BSP levels (see rendering). PVS increases the compile time, but prevents rendering of objects that are hidden behind walls. For extremely huge levels, you can disable PVS for compiling them to a BSP tree in considerable time.
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.
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.
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.
Invisible == None Sets the None rendering flag for all surfaces of invisible blocks, rather than suppressing the block. Required when invisible blocks should still cast shadows, and be obstacles for the OBB collision detection of BSP trees.
Terrain lighting A7.76  C  Generates lightmaps not only for blocks, but also for terrains. Terrain lightmaps are cast by the level geometry and by the terrain itself.
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.
Use tesselation A7.82 Activate the subdivision of surfaces. Required for dynamic lights.
Hull Offsets The two standard hull sizes for models with FAT or NARROW flag. The first number is the horizontal size of the bounding box, the second is the vertical size, and the third is the vertical offset of the box 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, hull_narrowmax, hull_fatmin, and hull_fatmax. 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.

How the Map Compiler works

The map compiler processes your level in several steps:

 !!  Sometimes you'll encounter warnings, sometimes even error messages when building your map. Most warnings can be safely ignored, but in the case of errors the WMB file won't be produced. The errors are usually caused by problems in your maps - such as exeeding the map limits or creating invalid blocks. Use the WED Find Block function to identify and fix blocks that are indicated as faulty.

 !!  In A6 compatibility mode (with Create Meshes deactivated), lightmaps can only be generated on convex blocks with perpendicular texture vectors. A blue tint indicates that a lightmap can not be generated for this surface. In this case you need to make the block convex, and/or rotate the texture back to its original orientation. This restriction does not apply to mesh-based A7 levels.


► latest version online