Introduction

A shipped Cathode level is not just its scripts and its models. Sitting alongside those is a large amount of derived data that the engine reads at runtime but never works out for itself: which surfaces receive which lights, where NPCs can walk, what a bullet collides with, where the alien can take cover, and how sound travels from room to room.

Creative Assembly generated all of that offline, in CAGE, whenever a level was built. If you move a wall in OpenCAGE and only write the scripts back, the wall moves — but its shadow, its collision, and the navmesh around it stay exactly where they were.

File → Save and Build Level (Ctrl+Shift+S) is the option that regenerates it — it sits directly under the plain Save Level in the File menu, as shown below. It performs a normal save, and then rebuilds the level's instanced data from whatever the level now actually contains.

The File menu in OpenCAGE, with Save Level and Save and Build Level listed one under the other.

Save Level has the Ctrl+S shortcut and Save and Build Level has Ctrl+Shift+S. Both shortcuts also work while the Viewport has the focus.

This is the feature that makes it possible to add new geometry to a level and have the game treat it as real.

Which Save to Use

The File menu offers both (pictured in the introduction above), and they are not interchangeable:

  • Save Level — writes your scripts, models, textures, materials and other resources. Everything derived is left exactly as it was on disk. Fast, and the right choice for the vast majority of edits.
  • Save and Build Level — does all of the above, then regenerates the instanced data. Considerably slower, and the right choice whenever you have changed the level physically.

Reach for Save and Build when you have:

  • Added or deleted a composite at any level down in the hierarchy from the root composite with collision data
  • Ported a composite in from another level and placed it in the environment (see Composite Porting)
  • Changed the shape of the areas NPCs are meant to path through
  • Added or moved sound-relevant geometry — doorways, walls, room boundaries

A plain Save Level is enough when you have only edited script logic, parameters, links, or entities that have no physical presence in the world. It'll also work when moving geometry etc, but the collisions will stay in the old place.

Take a backup first. Building a level rewrites a lot of files at once, and there is no undo. Use the Backup Manager to snapshot the level before your first build of it — that is by far the quickest route back if something comes out wrong.

What Gets Built

Everything below is regenerated from the level as it now stands. You do not choose between them individually — a build runs the whole pipeline.

Geometry & Materials

  • Instance materials and properties — each placed piece of static geometry gets the material it should actually be drawn with, resolved from the model's own materials, any material mappings, and any overrides applied through aliases
  • Dynamic entity materials and models — particles, fog volumes and similar entities have their materials and meshes built from their entity parameters, so changing a fog colour in the inspector produces a matching material
  • Zones and environment map links — which streaming zone each object belongs to, and which reflection probe it samples
  • Environment animation links — the wiring that lets an animation clip drive a static mesh
  • Renderable structuring — the transforms and resource links behind renderables, which used to be maintained by hand and are now generated
  • Occlusion and lighting BVHs — the acceleration structures the engine uses to cull geometry and gather lights

Collision & Physics

Collision and physics instances are rebuilt to match where objects now are, including instances for newly scripted entities. This is what makes a moved wall solid in its new position rather than its old one. The Viewport can draw the generated collision over the level in solid cyan, as below — see Checking the Result for the filter that switches it on.

The Viewport inside the Torrens canteen with the Collision Meshes render filter on: the chair nearest the camera, the tables and the walls are all solid cyan, with only thin strips of the orange table and bench tops and the dark wall consoles showing through.

The same view of the Torrens canteen as the navmesh screenshot under Checking the Result, with the Collision Meshes render filter on. The overlay is opaque rather than a wireframe, so anything with collision becomes a cyan block — the chair nearest the camera fills the middle of the frame — and the ordinary render only shows through where the visible mesh reaches past its collision, as the orange table and bench tops do here.

NPC Navigation & Jobs

  • Navmesh — generated from the ExclusiveMaster sets in the level, so NPCs path around the geometry that is actually there
  • Cover — the positions NPCs and the player's pursuers can take cover at
  • Job positions — spotting, crawl and assault positions used by NPC behaviours

You can inspect the generated navmesh and cover in the Viewport — see Checking the Result.

Lighting

  • Radiosity — the baked bounce lighting for the level. This is the longest part of a build by a wide margin, and has its own behaviour worth understanding — see How Radiosity is Handled
  • Alphalight metadata — the per-object data behind the game's volumetric light slices, for the objects that support it

Runtime behaviour is configurable under View → Configuration Editors → Core Game → Radiosity (see Radiosity).

Sound

Sound networks and spaces are regenerated — the graph of rooms and the openings between them that the engine uses to route sound through the level and to decide which reverb applies where. Move a wall or open up a doorway and the sound propagation follows.

How Radiosity is Handled

Radiosity is the one system where regenerating everything is not automatically the best answer. CA's original bakes were produced with far more time and tooling than a build in OpenCAGE can spend, so on a retail level the shipped lighting is better than anything rebuilt from scratch.

Because of that, a build patches the existing bake rather than replacing it: your new and moved objects are lit and folded into the level's existing lighting, and everything untouched keeps CA's original quality.

There are two cases where that isn't possible, and OpenCAGE falls through to a full regeneration instead:

  • The level has no usable radiosity to patch — a stripped or newly created level with nothing to build on
  • The level's radiosity was already fully regenerated by a previous build — at that point none of CA's original data is left, so there is nothing to preserve

When a level is fully regenerated, OpenCAGE records that fact in a small .META file next to the level's radiosity data. Later builds read it and keep fully rebuilding, rather than patching lighting that is already entirely ours.

A fully regenerated bake is dimmer and flatter than retail's — expect to spend some time on your lights afterwards. If you have a pristine copy of a level's original radiosity, restoring it before you build will give you a better starting point than letting it regenerate.

Checking the Result

While a build runs, the progress window shown below reads Instancing <level>…. The generation phase cannot report a percentage, so the bar runs as a marquee; once the generated data starts being written to disk the title switches to Saving <level>… and the bar fills as it does for a normal save. Expect it to take substantially longer than a plain save — minutes rather than seconds on a large level.

The build progress window titled Instancing PRODUCTION/BSP_TORRENS with a marquee progress bar.

The progress window during the generation phase: the green block scrolls across the bar rather than filling it, because there is no percentage to show yet.

Once it's done, two of the generated systems can be inspected without leaving OpenCAGE. In the Viewport toolbar, the Show State Info dropdown lists every state the level has — State 0 (Default) plus one per ExclusiveMaster — and under each, Navmesh and Cover. Pick one and the generated data is drawn over the level, as below (navmesh in translucent blue, cover positions in orange); the button relabels to show what is active, picking the same entry again turns it off, and None at the top of the list clears both. If a region of your new geometry has no navmesh over it, NPCs will not walk there.

The Viewport inside the Torrens canteen with the generated navmesh drawn in blue across the open floor between the tables and the wall benches, and the State Info dropdown open on State 0 (Default) with Navmesh ticked.

State 0 (Default) → Navmesh ticked on BSP_TORRENS: the walkable navmesh shows in blue across the canteen floor, stopping short of the tables and benches, and the button now reads State Info: Navmesh 0. Cover draws the cover positions in orange.

For collision, tick Collision Meshes at the top of the Render Filters panel — it shares the left-hand pane with the Search tab, and is only present while the viewport is enabled — and the level's collision geometry is drawn over the scene in solid cyan, as pictured under Collision & Physics. Check that your new geometry has collision in the right place.

The Render Filters panel with Collision Meshes ticked, directly beneath Occlusion Meshes at the top of the list.

Occlusion Meshes and Collision Meshes sit above the divider in the Render Filters panel; the per-entity-type filters follow below it.

Tips & Troubleshooting

  • Build last, not constantly. Do your script and layout work with plain saves, then build once you're ready to test the result in game. There is no benefit to building after every small edit, and it costs you minutes each time.
  • Alien: Isolation is closed automatically when you save, as it holds write locks on the level files. That applies to a build too.
  • "Some data was not regenerated" after a build means a baker failed, or the build hit something smaller it could not do as asked (a required model or gobo texture the level does not ship, a shader it could not compile). The level still saved, but any system the dialog lists as not regenerated kept whatever was already on disk — if that was the navmesh or collision, the game plays on the old layout until a later build succeeds.
  • A backup in progress blocks saving. If the Backup Manager is working on the level you're editing, saving is refused until it finishes.
  • New geometry looks unlit in game? Check whether the level fell through to a full regeneration — see How Radiosity is Handled. Lighting on newly added objects is generated from your level's lights, so an object placed in a room with no light in it will stay dark.
  • NPCs won't path onto new floor? The navmesh is generated from ExclusiveMaster sets — geometry outside those sets isn't considered walkable. Check the generated navmesh with the Viewport's State Info dropdown.

Related Docs

  • Backup Manager — snapshot a level before building it
  • Composite Porting — bring a composite into another level, optionally building it afterwards
  • Radiosity — the engine-side lighting configuration
  • Viewport — inspecting generated navmesh, cover and collision
  • Material Mapping Editor — the remaps a build resolves when building instance materials