Skip to content

Latest commit

 

History

History
592 lines (469 loc) · 27.8 KB

manual.adoc

File metadata and controls

592 lines (469 loc) · 27.8 KB

DarkRadiant User Guide

Introduction

DarkRadiant is a level editor for Doom 3 and The Dark Mod, developed by The Dark Mod team. It may also be used for editing levels for similar id Software games such as Quake 4.

This User Guide describes the features and functionality of DarkRadiant, however it is not intended as a guide to mapping techniques. Level design is a complex topic, and is covered by various other learning resources, some of which are listed below.

The Dark Mod Wiki

The starting point for most Dark Mod documentation and tutorials, including gameplay, configuration and editing.

ModWiki

Online wiki covering editing topics for vanilla Doom 3 and similar engines.

The Dark Mod forums

Online community for discussion of the Dark Mod, including various ad-hoc mapping tutorial threads posted by individual users.

Editing workflow

DarkRadiantWorkflow

The level editing process starts off with basic assets: models, textures, sounds, entity definitions, skins, animations and so on. Many of these assets will be packaged with a particular game installation, but a level designer may also choose to create custom assets for a specific mission. These assets are installed into a directory tree which is accessible both by DarkRadiant (for editing) and the game engine itself (for playing the mission).

Once assets have been arranged in DarkRadiant according to the wishes of the level designer, a .map file is saved to disk. This is a text file in a format understood by the game engine, and includes both level geometry and references to the assets used in the map. Since the .map file is simply text, and does not actually embed the binary asset data, it tends to be fairly small.

The game engine includes functionality to compile the .map file into a .proc file containing low-level vertex geometry derived from the brushes and patches within the .map file. The game engine can then render the mission in realtime, making use of the same assets that were accessed by DarkRadiant during editing.

DarkRadiant also maintains its own separate file containing various editing information, such as object layers used within a map. This .darkradiant file is never used by the game engine, and is non-critical — a .map file with no accompanying .darkradiant file can still be edited with DarkRadiant, although certain DarkRadiant-specific state may be lost.

What’s in a MAP?

There are three main types of object contained within a .map file: entities, brushes and patches.

Entities are the top-level objects in a map — essentially, a map file is just a list of entities. Every entity has an entity class which determines the type of entity it is: static mesh, AI, sound emitter, particle emitter, light etc. Entities also store a list of string key/value pairs, known as spawnargs or properties. Some entities also contain brushes and patches as children.

Brushes are convex solids used to define basic map geometry: walls, floors, ceilings, steps and other medium to large items. Brushes are often rectangular in shape, although a brush can actually have any number of faces provided that it is convex (it is impossible to have a brush in an L or a U shape, for example). Brushes are not smooth-shaded by the game engine, which generally makes them unsuitable for representing curved surfaces.

Patches are smooth one-sided surfaces used to represent curved objects such as vaulted ceilings, pillars or cave interiors. A patch is defined by a number of Bezier control points, and offers control over the level of detail used when subdividing the patch into triangles for rendering: more triangles will produce a smoother surface but may lower rendering performance.

The entities, brushes and patches in a map are arranged in a hierarchy: not every entity has children, but every brush and patch must have an entity as a parent. Each map therefore starts with a single default entity called the worldspawn, which acts as the parent for new brushes and patches created in DarkRadiant.

Initial configuration

Choosing a game type

When running DarkRadiant for the first time, the Game Setup dialog will be shown. This is where you configure the path to the game installation from which DarkRadiant will load assets, such as textures, models and entity definitions.

GameSetupDialog

The Game Setup dialog contains the following options:

Game Type

DarkRadiant ships with support for several different game engines, each of which is contained within a .game file. For editing Dark Mod missions, the default choice of The Dark Mod 2.0 (Standalone) is the one to use, but it is also possible to edit stock Doom 3 or Quake 4 missions.

DarkMod Path / Engine Path

This is the path to the game installation on the system. The label text will change depending on whether the selected game is The Dark Mod or another engine.

Mission

Optional path to a subdirectory containing assets specific to a particular mission which is being worked on. For game types other than The Dark Mod, this will be displayed as Mod (fs_game), and should be set to the path of a subdirectory containing a particular game mod, if one is being used.

Mod Base (fs_game_base)

This field only appears for non-DarkMod game types. It allows a two-level mod structure, where the Mod Base can point to a major game mod, possibly downloaded from elsewhere, while Mod can be set to point to an entirely local "sub-mod" which contains local changes and overrides. Before the release of Dark Mod standalone, this field would have been set to darkmod while the Mod field would have been set to the local mission, however this is no longer necessary when The Dark Mod 2.0 (Standalone) is being used.

Once the game paths are set up, click the Save button to proceed to the main DarkRadiant interface.

Note
It is possible to Cancel the Game Setup dialog and proceed to the main window without configuring a game installation, in which case DarkRadiant will show a warning and ask if you wish to proceed. If you do, DarkRadiant will run but there will be no available textures, models, entities or other game assets.

Interface layout

DarkRadiant ships with a number of different user interface layouts, which control the position, visibility and window type of the major interface elements. The current layout can be changed from the View → Window Layout menu, and will require DarkRadiant to be restarted.

There is currently no support for custom layouts, however all of the provided layouts allow window sizes and splitter positions to be changed, and the changes will persist through multiple editing sessions.

Embedded

A large 2D window is shown on the right, while the left-hand side is divided vertically into the 3D camera window and a tab widget containing the main editing panels. There are no floating subwindows in this layout.

Regular

A legacy GtkRadiant layout which places the 2D window on the left, the 3D camera view on the top right, and a 2D scrolling textures panel on the bottom right. Other tabs in the editing panel are shown in a floating window.

RegularLeft

The same as Regular except the full-height 2D window is on the right and the 3D window and texture panels are on the left.

Floating

The 2D window, 3D window and editing tab widget are all shown in separate floating windows which always appear above the main DarkRadiant window. The main window itself is empty apart from the toolbars and status bar. This is the most flexible layout, since each subwindow can be sized or positioned as desired, but the multiple subwindows may be cumbersome to manage.

SplitPane

Three separate 2D windows, showing each of the major axes, are shown alongside the 3D camera view in a 2x2 layout similar to traditional 3D modelling applications. The editing tab widget is in a floating window.

Colour schemes

DarkRadiant defaults to a black-on-white colour scheme in the 2D windows, but ships with four other colour schemes, which can be accessed under View → Colours…​. If you prefer a dark theme, the Black & Green scheme might be suitable, whereas the Maya/Max/Lightwave Emulation and Super Mal themes provide a more neutral, low-contrast look.

Each of the colour schemes can be edited using the colour selector buttons in the Colours dialog, and it is also possible to copy one of the default schemes into a custom scheme with a new name.

Basic editing

Navigating the 2D view

The game world is a three-dimensional vector space with a central origin, rendered in the 2D editing window as a grid. The unit of measurement is an arbitrary game unit which does not directly correspond to any real-world measurement system — in The Dark Mod, a typical human stands around 80 - 90 game units high, making a game unit about 2 cm.

Each 2D window shows which axes it is representing with an icon in the top-left corner, as well as an identical icon at the <0,0,0> origin position, if visible within the view.

2DViewMarkedUp
Figure 1. Components of the 2D view

The 2D view also shows the current position of the camera (used for rendering the separate 3D camera view window), and its view direction.

The following commands are available within the 2D view:

Right drag

Scroll the view horizontally or vertically

Mouse wheel

Zoom the view

Shift + Right drag

Zoom the view (alternative binding)

Ctrl + Middle click

Move the camera directly to the clicked position

Middle click

Rotate the camera to look directly at the clicked point

Ctrl + TAB

Change view axis (XY, XZ, YZ)

Ctrl + Shift + TAB

Center 2D view on current camera position

Adjusting the grid

The grid shown in the 2D view is used to snap the position and size of brushes and patches, as well as the centerpoints of entities. The size of the grid can be configured, in powers of 2, from 0.125 up to 256, using the 1-9 keys on the main keyboard (not the numeric keypad), or the equivalent options in the Grid menu.

The 0 key on the main keyboard can be used to toggle the display of the grid. Note that objects will still be snapped to the grid even if the grid is not visible; this is purely a visual toggle.

Important
Level geometry built from brushes and patches should always be snapped to the grid to avoid problems such as rendering glitches and map leaks. Static meshes and animated AI can be positioned more freely, however grid snapping is a useful tool for ensuring that models are appropriately aligned with the level geometry.

Using the 3D camera view

The 3D camera view provides an approximate rendering of the map in three dimensions, in several different render modes: wireframe, flat shaded, textured, and fully lit by in-game light sources. While the 2D view is the main interface for creating and aligning level geometry, the 3D view is a vital tool for tasks such as texturing, or configuring light parameters.

Important
The fully lit rendering mode in DarkRadiant is very limited, and only offers a partial view of what the game engine will ultimately render. In particular, there are no shadows or foglights.

The 3D view always renders the scene from a particular camera position, which is shown in the 2D view as a blue diamond. This camera position can be set directly from the 2D view with Ctrl + Middle click, and the camera view direction can be set with Middle click. There are also various options within the 3D view itself to adjust the camera position.

Right click

Enter or leave free camera mode. In this mode, moving the mouse around updates the camera view direction in real-time, and moving the mouse around while holding Ctrl causes the camera to move up/down/left/right according to the camera motion.

Default mode (not free camera)

Left/Right arrow

Pan the camera left or right

Up/Down arrow

Move the camera forwards or backwards on the horizontal plane, without changing its height on the Z axis.

Free camera mode

Left/Right arrow

Move ("truck") camera left or right, leaving view direction the same.

Up/Down arrow

Move ("dolly") the camera forwards or backwards along its view axis

Manipulating objects

Every object in a map can be selected and moved within the 2D view. Some objects — including brushes, patches and lights — can also be resized.

Shift + Left click

Select or deselect the object at the clicked position. Any existing selected objects will remain selected. If the clicked position overlaps more than one object, the closest one (according to the current 2D view axis) will be affected.

Alt + Shift + Left click

Select the object at the clicked position, and deselect any existing selected objects. If the clicked position overlaps more than one object, each click will cycle through the overlapping objects.

ESC

Deselect all objects

Left drag inside a selected object

Move the selected object(s)

Left drag outside a selected object

Resize the selected object(s) (if available)

Space

Duplicate the selected object(s)

Backspace

Delete the selected object(s)

Tip
Like other editors in the Radiant family, DarkRadiant offers a rather unusual system for resizing objects. Rather than clicking exactly on the edge, or on a dedicated resizing handle, you can click and drag anywhere outside an edge to move that edge inwards or outwards. Dragging outside a corner allows you to move two edges at once.

Working with brushes

Brushes are the basic building blocks of all maps. Typically they are used for coarse-grained level geometry such as walls, ceiling and floors. Brushes also have a vital role in sealing a map from the void: even a map built entirely from patches and static meshes must still be surrounded by brushes in order to avoid leaking.

Additive versus subtractive geometry

If you are used to mapping for the legacy Thief games using Dromed or T3Edit, the system used by DarkRadiant may seem somewhat back-to-front. In previous games, the world starts out as an infinite solid, in which you "carve out" rooms using subtractive brushes. In DarkRadiant, the world starts out as an infinite void, and all brushes are solid. The space in which the mission happens must be fully enclosed by solid brushes, otherwise the map will "leak" and fail to compile.

The need to deal with map leaks may at first seem like a burden, however the exclusive use of solid brushes frees the engine from needing to worry about "brush ordering", and allows an important performance optimisation: by "flood filling" the map interior, the map compiler can efficiently discard geometry that never needs to be rendered.

Creating a brush

To create a simple rectangular brush, ensure that nothing is selected (ESC), then Left drag in the 2D view. A new brush will be created and sized according to the dragged area, with its dimensions snapped to the current grid level. To adjust the third dimension of the brush (perpendicular to the view direction), used Ctrl + TAB to switch the 2D view axis, and Left drag outside the brush boundary to adjust the size.

Tip
Whenever you drag to create a new brush, the third dimension will match the size of the most recently selected brush. This makes it easy to draw a series of brushes with the same height, such as when you need to create a series of floors or walls in succession. To match the height of an existing brush, simply select (Shift + Left click) and deselect it (ESC) before drawing the new brush.

More complex brush shapes

Although each brush starts out as a six-sided cuboid, it doesn’t have to stay that way. DarkRadiant offers several options for creating multi-sided brushes in more complex shapes. To create one of these shapes, first define a regular cuboid brush covering the volume you want the new shape to occupy, then choose the appropriate option from the Brush menu:

6Prism

Prism

An n-sided approximation of a cylinder, with the axis of the cylinder aligned with the current 2D view.

6Cone

Cone

A tapered n-sided cone, which always points upwards regardless of the 2D view axis.

6Sphere

Sphere

A rotationally symmetric n-sided approximation of a sphere, with the axis of rotation pointing upwards.

While these shapes can be useful for certain architectural modelling, remember that brushes are always flat-shaded and are not generally a good substitute for spheres or cones created with patches or static meshes.

Creating a room

Although it is not too difficult to create a hollow room by creating floor, ceiling and wall brushes manually, this is a common enough operation that DarkRadiant provides a couple of shortcuts. These options can be found on the vertical toolbar at the far left of the main window.

CreateRoomBrush

CreateRoom Create Room

Create a room whose interior size matches the size of the currently-selected brush. The wall thickness will be equal to the current grid size.

HollowBrush

Hollow Hollow

Hollow out the selected brush, leaving the exterior dimensions the same. The wall thickness will be equal to the current grid size, but the wall brushes will overlap at the corners, rather than just touching each other as with Create Room.

This is legacy tool from GtkRadiant, and generally inferior to Create Room. The overlapping wall brushes make it more difficult to precisely align interior textures, since part of the inner face is obscured (and therefore removed during map compilation). However, there may be occasional situations in which Hollow is useful, so it is retained in DarkRadiant.

The room creation tools do not require the initial brush to be rectangular — you can quite happily Create Room with a triangular or trapezoidal brush, or a brush with sloping sides. However, with a more complex brush shape, the complexity of the resulting wall geometry increases considerably, so attempting to hollow out a 7-sided sphere is probably ill-advised.

Splitting brushes

Sometimes it is necessary to divide a brush into two or more pieces, perhaps to create a doorway or other opening. The Clipper tool, accessed with the X key, is used for this purpose.

ClipTool3D
Figure 2. Splitting a brush into two parts
  1. Select the brush to be split (the Clipper can be activated with nothing selected, but it will not do anything useful).

  2. Press X to activate the Clipper, or click on the respective icon on the left-hand editing toolbar.

  3. Click in the 2D window at two different positions, to define the plane along which the brush will be split. The proposed split plane will be highlighted in blue; feel free to change 2D view axis with Ctrl + TAB or use the 3D camera view to better visualise the split plane.

  4. Once the split plane is defined, press Shift + Enter to execute the split and keep both halves of the brush; press Enter to execute the split and keep only one half. The part of the brush that is kept with Enter depends on the order in which you define the clip points: the points (marked 0 and 1) will appear clockwise on the brush edge according to the current 2D view. If in doubt, just use Shift + Enter to keep both parts, and delete the unwanted one afterwards.

  5. Repeat the process to perform additional splits on the selected brush, or disable the Clipper with the X key. The Clipper is a toggled tool and will remain active until disabled.

Note
It is possible to create three split points before executing the split, which will define a split plane in three dimensions. Defining a three-point split plane which is actually useful, however, may be challenging.

Reshaping brush edges

All brush edges can be moved independently, which gives you the ability to quickly create shapes like triangles or trapeziums. This functionality is accessed via the Select Edges tool on the upper toolbar, or with the E key.

EdgeEditing
Figure 3. Creating a trapezium using edge editing
  1. Select a brush.

  2. Activate Select Edges with the toolbar button or E key. DarkRadiant will place a green control point at the center of each brush edge.

  3. In either the 2D or the 3D view, click and drag on a control point to move its edge. The control point will turn blue and move along with the cursor. In the 2D view, dragging corners is generally easiest, since the resulting shape change can more easily be seen.

  4. To reduce the number of brush sides, such as changing a rectangle into a triangle, simply drag one corner directly on top of another. The two edges will be merged.

Applying textures to brushes

There are two separate interfaces for browsing and applying textures, each of which provides similar functionality but presents the information in a slightly different way.

The Media tab shows a tree view which contains all of the textures available within the game installation. Selecting a texture in the tree will show a small preview swatch in the widget at the bottom of the panel, along with some metadata about the texture definition. To apply a texture to the selected brush, either Double-click on a texture name in the tree, or Right-click and choose Apply to selection.

The Textures tab provides a scrollable canvas containing preview swatches of all the textures which are currently loaded. When DarkRadiant first starts up, no textures are loaded and this panel is empty; to load a texture you must either apply it to a brush directly from the Media tab, or use the Media tab’s context menu to Load in Textures view (this command can be applied to an individual texture or an entire folder). To apply a texture from the Textures tab, simply Left-click on the texture preview with one or more brushes selected.

You can control which faces of a brush are textured by choosing the appropriate selection commmand:

  • Selecting a brush with Shift + Left click, which works in any 2D or 3D view, will select the entire brush. Any applied texture will apply to all faces.

  • In the 3D view, use Ctrl + Shift + Left click to select or deselect a particular brush face. This works best when the entire brush is not already selected with Shift + Left click. Each selected brush face will be rendered with a red-coloured overlay, and any texture operation will apply only to the selected faces.

Working with entities

If brushes are the bricks and mortar of a map (often literally), entities are its fixtures and fittings. Every object in a map which "does something" other than form part of the level geometry is an entity: lights, audio speakers, particle emitters, static meshes, animated creatures or machinery. There are also various functional entity types which provide vital metadata to the game engine, such as determining where the player should start, or how creatures should navigate between locations.

DarkRadiant provides certain common functionality to all entities, such as the ability to edit properties using the Entity tab. Particular entity types are sufficiently common, however, that they have their own dedicated creation and editing tools.

Light

Every map requires at least one light source in order to render anything in game. A light occupies a rectangular volume, which can be created and resized much like a brush, and has properties to determine its colour, visible shape and falloff pattern in three dimensions. Lights can optionally cast shadows, and can even be animated to flicker or flash.

Model (func_static)

Model entities represent geometry that is not compiled as part of the map itself. The model geometry can either be derived from brushes and patches created inside DarkRadiant, or from an external model file in ASE or LWO format. Model files are the primary mechanism for including fine detail in a map which would be cumbersome to create with brushes and patches.

Speaker

Essentially the audio equivalent of a light, a speaker entity represents the point from which an in-game sound source will emanate. It has properties to control its size and falloff, and optionally override certain properties of the sound shader itself, such as volume.

Player start (info_player_start)

This entity tells the game engine where to place the player when a map is first loaded. A map without such an entity will not be playable.

Creating lights

To create a light, Right click in the 2D view and choose Create light…. The position and size of the light volume depends on the current selection:

  • If nothing is selected, then a light volume will be created at the clicked position with a default size.

  • If a single brush is selected, the brush will be deleted and the light volume will match the size and position of the brush.

  • If several brushes are selected, then all selected brushes will be deleted and the light volume will be sized according to the bounding box of the brushes (i.e. the smallest box that would contain all of the brushes).

Unselected lights are shown in the 2D view as small boxes, while selected lights also show the boundaries of the light volume.

LightSelectedAndUnselected
Figure 4. Light entity selected (left) and unselected (right)

A selected light entity can be moved by dragging inside the small center box, and it can be resized by dragging outside the edge of the light volume. Unlike brushes, light volumes will by default resize symmetrically, so that the center point does not move during the resize.

There are a couple of options on the top toolbar which control the display and behaviour of light volumes:

view show lightradii

Show all light volumes

If enabled, light volume boundaries will be rendered in the 2D view for all light entities, not just selected entities. The default behaviour is to show only the center box for unselected light entities.

dragresize symm

Drag-resize entities symmetrically

If enabled (the default), light entities will be resized symmetrically, without moving the center point. If disabled, lights will be resized like brushes: dragging an edge will move only that edge, while the opposite edge remains fixed.

The light inspector

When initially created, a light is pure white in colour and has an unrealistic rectangular illumination pattern matching its shape. You can change these properties using the light inspector, which is accessed with the L key while a light is selected.

LightInspector
Light volume (omni vs projected)

The majority of lights in a map will be the default, omnidirectional shape. An omni light is a simple axis-aligned cuboid which emits light in all directions from its center to its edges.

A projected light is pyramid-shaped, and emits light from the tip of the pyramid towards the base. Projected lights behave more like spotlights in real-life, and can be used to highlight particular areas or project images of windows onto the floor.

Colour

Use the colour selector button to display a standard colour selection dialog, or enter the RGB values directly using the text box. As well as changing the hue, the light colour also governs the overall brightness of the light.

Texture

The falloff texture governs the shape of the lit area when rendered in-game; the square texture chosen here will be mapped directly onto the rectangular shape of the light volume. Light textures can be simple, such as the generic circular gradient of biground1, or much more complex, including multiple colours or animation.

Options

There are a few light-propagation options which are mostly used to tweak performance. In particular, disabling shadows for any light which does not actually need to cast shadows can give a significant boost to rendering speed.