MAP Prep & Export (*.map) files from Blender

Link, Like, Share.


IN this exercise we’ll take a look at using Blender to make levels to be exported as *.map files using the third-party Blender MAP Export script. First the *.py Python script is downloaded and installed using Blender Preferences. Once installed, following some basic rules to ensure compatibility, a test level is created from a number of mesh primitive objects that will become Brush Volumes once exported to MAP file.

Duration: total c. 35 mins (00:35:00).
Info: 1080p.
Suitability: Beginner+.
Source: KatsBits – Example Map (c. 200 KB | *.blend, *.map).
Product ID: n/a.

Download: Blender MAP Export script (external link).

Design note: depending on the editing environment being used, some trial and error may be required to export a fully compatible *.map file. To assist in making levels in Blender use the Radiant Entity Kit.

Blender Compatibility

Although Blender 3.6 LTS was used throughout the Blender MAP Export script is compatible with Blender 2.83 or above, including Blender 4.(x). To verify, install the script and perform a simple test export.

Radiant Grid Setup

Most *.map and *.bsp level editing tools use an environment defined by the ‘power of two rule‘, so 2, 16, 64, 512 etc, all generally divisible, and using a minimum object size of 8 units (smaller can be used but are generally to be discouraged). This essentially means one minor grid subdivision is 8 units on the XYZ, one larger subdivision is 64 units or 8 x 1 minor division on the XYZ (8 x 8 units = 64 units).

Radiant grid scale
The default grid setup in GtkRadiant is 8 x 8 units.

Blender Grid Setup

To replicate Radiant, or other similar editors grid in Blender, ensure Units is set to None so the grid subdivisions can be changed – this is crucial to match up between Blender and Radiant et al. In Scene Properties make sure Unit System is set to None [1] (Metric default is Metric). Then in Viewport Overlays change both Scale and Subdivisions to “8” [2] – Scale: 8, Subdivisions: 8.

Blender grid scale
Mirroring Radiants grid and units of measurement in Blender by setting None [1] as the Unit System then changing grid Scale and Subdivisions [2].

Inverted Faces

Typically maps are built using a lot of object duplication, flipping and mirroring. Doing so however tends to cause issues insomuch as mesh faces can be inverted or flipped inside-out [3] when transforms are applied. When this happens face Normals have to be reverted so they all faces outwards for valid brush volume generation. To do this, select the object and in Edit Mode select the offending face(s), or select everything – Select » All (A), then from the Mesh menu select Normals, Flip, or Recalculate Outside [4] to force everything to point outwards – Mesh » Normals » Flip/Recalculate Outside.

By default material render two-sided so any face orientation issues won’t be immediately noticeable. To address this, in Material Properties, enable Backface Culling in Settings, or enable Face Orientation in Viewport Overlays.

[descriptive alt image text here]
Inverted faces [3] need to be fixed to ensure valid brush volumes are generated during export. This can be done using Flip or Recalculate Outside [4], forcing faces to point in the right direction, outwards.

Generic Map Export Settings

When exporting meshes and other objects from Blender, either; 1) select only those parts that are to be included in the *.map file, or optionally 2) delete unwanted items. The settings used to export a properly compatible *.map file [5] will vary depending on the editing environment being exported to. For generic ‘idTech’ for example, these might be (bold highlights are important);

Selection Only
Apply transforms
Apply modifiers

Object types
Mesh: Brush
– Nurbs: Ignore
– Lights: Ignore (if not present)
– Empty: Ignore (if not used)

Grid: 8.00
Depth: 0.00
– Scale: 1.00
– Precision: 5

Output format
Planes: Quake
UVs: Standard
– Flags: None
Output: File

– Grouping: Generic
– Class: func_group
– Material: skip (or caulk)
– Tex size: 64

Generic map export settings
Export options [5] vary depending on the editing environment being used. For Radiant ensure Brush is set as the Mesh type.


Times are approximate;
– 00:00 : Overview & Install
– 02:00 : Units, Grid & Snap
– 08:00 : Valid Objects & Example
– 18:00 : Materials & Caulk
– 25:00 : Object Prep & Export
– 29:00 : Radiant Editor Import

Link, Like, Share.