Introduction

A lot of the game's most useful composites draw nothing at all: a search job, an area sweep, the spot where an android slams the player into a wall. In the Viewport they would be invisible, and where one stands - and which way it faces - matters to how the game uses it.

Composite markup is OpenCAGE's answer: simple coloured shapes the Viewport draws at every instance of a composite, showing what it is and how it is meant to sit in the level. It is for the editor only. It is never an entity, never part of the composite, and never seen by the game.

OpenCAGE ships markup for the game's job and melee composites, and you can give any composite markup of your own.

Built-In Markup

These composites have markup in every level that has them, with nothing to set up. Each shape is drawn in the composite's own space, so it moves and turns with every instance.

CompositeMarkup
Archetypes\Jobs\MeleeContext\MeleeContext_HighCoverA ring on the floor with a raised fist over it, and a line along the floor to a T standing 2.5 m in front: where the face of the wall the android throws the player against goes.
Archetypes\Jobs\MeleeContext\MeleeContextAs above, with the T 1.25 m in front: the low cover the player is thrown onto.
Archetypes\Jobs\MeleeContext\MeleeContext_CorpseTrapA ring, a figure lying on its back and a red warning mark: where an android playing dead grabs the player. It faces away from the android, which lies about 0.9 m behind it.
Archetypes\Jobs\Base\BaseSearchJobA ring and a magnifying glass: a spot an NPC searches at. It shows wherever a SearchJob is placed.
Archetypes\Jobs\Base\BaseAreaSweepJobA ring and a broom: a spot an NPC sweeps over (in every AreaSweepJob).
Archetypes\Jobs\Base\BaseIdleJobA ring and an hourglass: a spot an NPC waits at.
Archetypes\Jobs\Base\BaseFollowA ring, one person walking behind another and a red arrow over them pointing the way they walk: one NPC following another.
Archetypes\Gameplay\Container (and Container_Script)A closed box held up in front, with a line and arrow from the composite's origin pointing at it: something the player loots.
Archetypes\Gameplay\Fire_VolumeAn orange flame with a yellow core, standing in both side planes so it reads from any side.
The NPC composites in Archetypes\NPCs\ (Xenomorph_NPC, Facehugger, Egg, Android_NPC, Android_Heavy_NPC, the Worker, Security (Grunt) and Riot NPCs, and the named actors)The ring, turned so its bar points the way the character faces, and who it spawns written in blue on the floor just behind it, facing up, e.g. XENOMORPH, ANDROID, WORKER / PISTOL, SECURITY / SHOTGUN, MEEKS / SPACESUIT. It reads the right way round from above, and still makes sense with the Character render filter off.
Archetypes\Script\Mission\SpawnPositionSelectThe ring and PLAYER on the floor behind it: where the player can start.
CageOnly\front_marker (inside door packages)The word FRONT in blue on the floor, reading the right way round from the front.

The ring every job stands on is 0.42 m across, with a bar from its back edge to just past its middle. The composite faces its own +Z (the way a placed entity faces), which for a melee context is towards the T. The icons over the rings stand across the composite, so you see them face on from its front or back.

Melee Contexts

The two melee contexts' markup is to scale, and is worth lining up exactly: the grapple animation the android plays is laid out from where the context stands, so the surface it throws the player against has to be where the T is.

  • High cover (MeleeContext_HighCover): the T's near face is 2.49 m and its far face 2.5 m in front of the context. Put the T in the face of a high wall, with the context facing it. That is where the game's own levels put theirs: measured in their collision, the wall in front of a retail high cover context is a median 2.5 to 2.57 m away.
  • Low cover (MeleeContext): the T stands 1.25 m in front.

The line along the floor runs from the ring to the T, 4 cm wide. Place AI Markup puts the high cover it places 2.5 m from the wall's face for the same reason.

Showing and Hiding

Markup has its own filter in Render Filters, with the scene's other categories: Markup, on unless you turn it off. Turning it off hides all markup, built in and your own, at once.

Markup is drawn and nothing more. Clicking it selects nothing (a click goes through to whatever is behind it), it isn't listed among the composite's entities, a selected composite isn't greyed out over it, and composite previews leave it out.

Adding Your Own

Right-click a composite in the Composite Browser and choose Edit Markup. The window shows the composite's built-in markup, if it has any (which can't be changed), and the pieces your level adds to it.

  1. Pick a shape and press Add Shape, or press Import Mesh to use a model file's triangles (FBX, OBJ, glTF, COLLADA), read in metres as a model import reads it.
  2. Select a piece to set its name, shape, position, rotation, size and colour. Position and rotation are in the composite's own space, as an entity's are.
  3. Duplicate copies the selected piece; Remove takes it away.

Every change shows in the Viewport straight away, at every instance of the composite, and goes on the undo history (a run of changes to the fields is one step). Your markup is saved with the level.

Shapes

  • Box, Cylinder, Cone - stand on their position; the size is their width, height and depth (a cylinder's and cone's diameters across X and Z).
  • Sphere - rests on its position; the size is its diameters.
  • Arrow - lies flat on the floor from its position, pointing along the composite's +Z (turn it with the rotation); the size is its width, thickness and length.
  • Ring - lies flat round its position; the size is its outer diameter and thickness.
  • FrontLabel - the word FRONT standing on the floor, 0.42 m long, reading the right way round from the composite's -Z side; the size scales it.
  • Mesh - an imported model's triangles (up to 20,000); the size scales it.

What the Game Sees

Nothing. Markup is never written into a composite: the built-in markup is part of OpenCAGE, and your own is kept in a table of OpenCAGE's beside the level's scripts in COMMANDS.PAK, with its other editor data (entity names, flowgraph layouts and so on), which the game doesn't read. Adding markup doesn't mark a composite as changed, so it doesn't make a composite part of a mod, and it costs the game nothing at all.

For AI Assistants

An AI assistant connected to OpenCAGE lists markup with list_composite_markup (one composite's built-in markup and pieces, or every composite of the level that has markup), adds a piece (or replaces one, with index) with add_composite_markup (shape, position, rotation, size, colour; a Mesh from mesh_file or vertices and indices) and removes pieces with remove_composite_markup. set_viewport_view switches the markup scene filter.

Related Docs

  • AI Markup - placing search jobs, area sweep jobs and melee high cover over the navmesh
  • Level Viewer - the Viewport and its render filters
  • Making Mods - what goes into a mod