Category: Quake Mapping Jam

Trenchbroom – Geometry Basics

In this post, we’ll go through the basics of geometry building in Trenchbroom. I had originally intended to write this blog post as a complete guide that explored all aspects of the engine (viewport navigation, hotkeys, brush creation, entities, custom WADS etc.), however this felt incredibly boring and redundant as there already is extensive documentation out there presented in a much more engaging way. It also felt a little unintuitive as the best way to learn how to use an engine is not to read pages of documentation but to simply boot it up and start experimenting with it. With this in mind I’ve pivoted the blog post to focus more on the basics of Brush Geometry and helping first time users get used to the editor so as to get you started and walking (you’ll be running in no time).

I’ll be ignoring a lot of the nuances of the engine (partly as I am still learning myself, but also to avoid cognitive overload of features that might not be needed for a new user). Dumptruck_ds’ tutorial playlist provides short tutorial videos that go into more detail on each of the tools of Trenchbroom which I highly recommend watching if you want a deeper understanding of specifics. And of course the Trenchbroom 2026.1-RC3’s reference manual should cover almost anything else you could possibly want to know about the engine.

So, lets get started.

Navigating your way around the editor

Lets start by learning our way around the editor and the viewports. By default Trenchbroom loads up with a single 3D perspective view; For a brush-based map that’s built to a grid, this feels clunky as I prefer to do a lot of work on the orthographic views. So my first suggestion would be to select “view -> preferences”, and in the View tab, adjust the layout configuration to “Four Panes”. This will give you the 3 orthographic views; front, top and side. Whilst you’re here, you should also set your Theme to “Dark” mode because you’re not a barbarian. There are other accessibility settings you can play around with in this mode, and this Preferences window is where you can also edit hotkey shortcuts (which might be applicable to your workflow). I’ve edited some of my hotkeys to closer align with other more standard engines, but in this blog post, I will always refer to their default hotkeys.

Some icons in the UI are context sensitive. You will see this with the tools icons at the top that are currently greyed out. To enable those icons, select the default brush in the scene and notice the icons become selectable. You can select the icon to switch tool mode or hover over the icons to see their name and associated hotkey (you don’t need to memorise the hotkeys now as that will come with time and experience within the engine, but the sooner you learn them the quicker your mapping workflow will become). Selecting a tool will sometimes bring up a secondary row of options below (i.e. degrees of rotation snapping on with the Rotate Tool or scale factor with the Scale Tool) and these can further refine your usage of the selected tool.

Down the right hand side of the editor you the Inspector Tabs; Map, Entity and Face.

Within the Map tab you have the Layers window, which is useful for organising your work and aiding in your work flow. It sort of works like a primitive hierarchy you would find in Unity and Unreal. You can create new layers, name them and add objects from your scene into them. These layers can be locked, turned on and off and omitted from your compile entirely should you wish. You can add a new layer by clicking the little + symbol at the bottom of the layers window, and items can be added to the layers by selecting them, right clicking on the layer and selecting “Move Selection To Layer”. There’s also Map Properties and Mods windows below, however I won’t cover those in this post.

To the right of Map there is the Entity tab. This is the library of entities we can work with when making our map. This is also where we can add WAD files, a collection of textures used to texture brushes, to the project (I briefly mention how to add WADs to your project in the Getting Started blog post, so best refer there for more information if you need). The main window we’re concerned with for this blog post is the Entity Browser.

Entities are packaged up pieces of game logic that can be used to turn a map of brushes and geometry into a functioning game level. Basic entities range from weapons and item pickups to enemies, lights and triggers relays. Alone these pieces of game logic will function, but the true creative power comes from how these entities can interact with one another. I will cover entities, the creation of new entities, brush entities and how to use trigger and relays, in much greater detail in a future blog post; but for now, just know that if you want to place a simple enemy spawn, item pickup or point light, you will want to navigate to this window.

Next to the Entity tab there is the Face tab. This contains the Material Browser which holds all of the textures within the WAD files we’ve added to the project. When applying a texture to a face of a brush, we use this Face tab to select the texture we want, and how to scale, align and rotate the material when its applied to the face. Its something which is better observed through practise than text so:

  • Select the the default scene brush with a left click
  • Hold shift and left click the top face (it should be highlighted in yellow)
  • In the Material Browser, select a random texture
  • Notice how the texture has been applied to the selected face of the brush
  • Above the Material Browser there are tools to manipulate the material on the face of the brush
  • Experiment around them and see in the 3D viewport how this directly affects the look of the brush
  • You can Move the texture around the UV, you can scale it on the X and the Y and  you can rotate it

Finally along the bottom of the editor is the console. This will output in Realtime a log of what is going on inside the editor along with any errors that might occur during your mapping experience. I won’t go into much detail here about the Console, but just know if you see a stream of red error text, it might be worth stopping and investigating what the issue is.

Controlling the Viewports

Lets get used to some basic controls in the viewports as Trenchbroom has slightly different controls from more standard engines like Unity and Unreal. Simply reading these instructions is an awkward way of learning, so I would highly recommend messing around in the editor yourself to learn the quirks of Trenchbroom and also referring to the Trenchbroom 2026.1-RC3’s reference manual for a reference on everything you can do (as there is a lot of stuff that I will be missing here).

Moving

  • To move around the 3D viewport, hold down the right mouse button and pan around with W,A,S,D
  • To speed up or down the pace at which camera moves, hold down the right mouse button and scroll the mouse wheel either towards you (to slow it down) or away (to speed it up)
  • Scroll the mouse wheel by itself to zoom in and out
  • Holding Q or X can be used to pan the viewport up or down

When working in the 2D orthographic viewports:

  • Panning is instead done by holding down the right mouse button or the mouse wheel and moving the mouse around
  • Zooming in and out uses the mouse wheel, just like the 3D viewport

Selecting

  • To select a brush or an entity, simply click the left mouse button on the object you wish to select
  • Move the selected object around by clicking and holding down the left mouse button on the object and then moving the mouse
    • You’ll notice if you do this in the 3D viewport, the object is locked to the X and Y axis
    • If you want to move the brush up and down along the Z axis you’ll need to hold down the alt key whilst you drag
    • For this reason alone I find myself predominantly using the 2D orthographic viewports for brush creation and manipulation (perhaps its just my years of experience within Source but it just feels more natural and less clunky – your mileage may vary)
  • To select multiple objects hold the ctrl key down and click the left mouse button on each object you wish to select
  • You can also hold the ctrl key down and then click and drag left mouse button over multiple brushes to select them
    • Make sure you have ctrl held down before you click and drag else you’ll duplicate the brush
  • To select the face of a brush hold down the shift key and select a face by clicking the left mouse button.
    • Like with objects you can select multiple faces by also holding down the ctrl key
  • Select all objects within the scene by holding down ctrl pressing A
    • Note: Only objects that aren’t hidden or locked will be selected
  • To deselect everything hold down ctrl + shift whilst pressing A

Creating and manipulating Brushes

The core geometry of the level is built using CSG (or BSP brushes as they are more commonly referred as). There’s no need to go into huge detail about what the brushes are, just know that they are the building blocks of your level. They can be placed, scaled, rotated. You can manipulate each of their vertexes, you can add additional vertexes. You can apply materials to each individual face, and you can even turn them into entities that can have game logic applied to them. This is what 80% of your time in Trenchbroom will be spent working with so its best to get used to them. I’ll go over some of the very basic controls and tools you need to get started:

Brush Tool (B)

Pressing B selects the Brush tool. To create a simple brush:

  • Ensure no other object is selected by deselecting everything either by holding Ctrl+Shift+A  or pressing Esc
  • Hold down the Left Mouse Button anywhere in any of the viewports and drag out the shape
  • Whilst still holding down the Left Mouse Button, hold Alt and drag up to give the brush a bit of height (this will only work if you’re creating the brush in the 3D Perspective Viewport
  • Release the Left Mouse Button to create the brush

 

To manipulate the shape and the size of the brush we can move the individual faces in the same way:

  • Hold Shift + Left Click on the face of the brush you wish to move
  • Click and drag the face in the desired direction (Notice that the face is locked to its oriented axis)
  • Release the Left Mouse Button to finalise the edit

The Scale Tool (T) can also be used to achieve the same effect as above, however I personally find this to be a little more awkward than simply holding shift (but maybe you might find it a better method).

Brush Shapes

Underneath the Brush Tool icon, you’ll see a little orange cube. This can actually be clicked to reveal a drop down menu of the brush shape you can build. I won’t get into every single shape in this post as there’s a few to explore and they each have their own settings, but explore and experiment with using different shapes to see what interesting geometry you can create.

Rotate Tool (R)

This tool is pretty self explanatory, it allows you to rotate a selected brush or entity:

  • Select the object you wish to rotate
  • Select the Rotate Tool or press R
  • To rotate the object either:
    • Click and drag the widget on the desired axis or
    • Hold alt and use the arrow keys to rotate around the X and Y and Page Up / Down to rotate around the Z

Notice that some additional options have appeared below the tools bar, and these can be changed to give you more control over the rotate options:

  • The first is the pivot point around which you want to rotate the object
    • The initial value is the centre of the brush
    • 0 0 0 is the origin of the map
    • or you can put your own 3 values in if there is a specific point you wish to rotate around (just hit Return when you have entered your 3 values)
  • In most cases however you’ll like just want to rotate around the centre pivot of the brush, and if the pivot has been placed in a position you don’t want you can click the reset button to return it to the centre
  • The second option is the degree of snapping you want when rotating an object
  • I personally would ignore the third and fourth option, but this is if you just want to have the rotation be applied a single time around a certain axis by a click of a button

Clip Tool (C)

The Clipping tool allows for the slicing up of brushes (again something better demonstrated than explained):

  • Create a new brush
  • Select the Clipping Tool by pressing C
  • Notice how a little orange dot has appeared and snaps to various points on the grid
  • Select the first point anywhere on the mesh to set the anchor point. This will determine where the slice will start
  • Select a second point on the mesh to specify where you want the slice to finish
    • This might get a little awkward in the 3D perspective viewport, so I typically use the orthographic viewports for this

You’ll notice that one side of the slice has now turned translucent (see above). If we were to complete the clip right now, the Opaque side of the brush will remain, whilst the translucent side of the brush will be removed.

  • We can switch which side of the brush we want to remove by holding ctrl and pressing Return to cycle between all 3 options
    • Remove Side 1, Keep Side 2
    • Remove Side 2, Keep Side 1
    • Remove neither side but add a new edge where the slice would be made creating two separate brushes
  • Once you’re happy with what slice you want to make press Return to complete the action

Vertex Tool (V)

The Vertex Tool gives us the freedom to manipulate the brushes into more interesting shapes by moving individual points of the brush. When combined with the clipping Tool this can very interesting geometry:

  • Select the Vertex Tool by pressing V
  • Notice that individual vertexes you can manipulate appear in yellow
  • Select one of the vertexes by pressing and holding the left mouse button
  • Drag the vertex in the direction you want to skew the brush
    • Notice that if this is done in the 2D Orthographic Viewport, it will select all vertexes on that specific point irrelevant to their depth
    • If you wish to move a specific vertex on that specific point, it must be done in the 3D Perspective Viewport

  • You can add a new vertex to any edge of a brush by holding Shift and then clicking and dragging the left mouse button from a point along the edge of a brush

If you wish to merge two vertexes together:

  • Select the first vertext
  • Hold Shift + Alt and click on the vertex you wish to merge it to
  • Notice how it merges the first vertex to the second’s location
  • Its important to note, that if at any point vertexes overlap with one another, they are automatically merged into one single Vertex

Edge (E) and Face (F) Tools

I won’t go into much detail about these specific tools, as they are relatively self explanatory but they allow you to manipulate either an entire edge or face of a brush. Selecting these tools will highlight a yellow point that you can click and drag.

Useful functions

Finally here are some useful little functions and hot keys that might help in your map making flow:

Isolating and Hiding Brushes

This function can be very useful when you want to focus on a small section of a much larger map as it cleans up the orthographic viewports making them easier to use:

  • You can isolate an individual/group of brushes by holding shift and pressing I
  • This will hide all other brushes allowing you to just focus on the brush(es) that you had selected
  • You can hide an individual/group of brushes by holding ctrl + alt and pressing A
  • This will hide the brush(es) you had selected
  • If you want to unhide all other brushes from either command hold ctrl + shift and press I

Grouping Brushes

This combines numerous brushes into a single group of brushes. To add multiple brushes to a group:

  • Select all the brushes you wish to add to the group
  • Hold ctrl and press G
  • Give the group a helpful name (it doesn’t have to be unique)
  • Notice how a purple bounding box now surrounds the group
  • Clicking on a single object within the group will select the whole group
  • If you wish to edit the group, double click the left mouse button on any brush within the group
  • You are now editing only the brushes present within that group
  • To exit a group, press esc

To remove a group:

  • Select the group you wish to remove
  • Hold ctrl + shift and press G
  • This doesn’t delete the contents of the group, just the group itself

To add/remove brushes to/from a group:

  • First select the brush you want to add to an already existing group
  • Right click on a brush within the group you wish to add it to
  • Select “Add objects to group [groupname]”
  • To remove an object from a group, first double click on a brush in the group
  • Select the brush you wish to remove
  • Right click on the brush and selected “Remove objects from group [groupname]”

Centring The Camera

This is the equivalent of the F key in Unreal and Unity and is very useful for re-orientating yourself when your map begins to balloon in size:

  • You can centre the camera on a selected object by selecting the object you wish to focus on
  • Hold ctrl and press U
  • This will focus the camera on the selected object

Hiding UI Elements

Lets say you want to purely work on geometry and want to maximise your screen space. You may want to remove unneeded UI elements:

  • To remove the inspectors on the right, hold ctrl and press 5
  • To remove the console at the bottom, hold ctrl and press 4

Conclusion

OK, I think that’s enough for now. I was very conscious about getting this blog post out before the start of the mapping jam, so there’s likely a whole handful of useful tips and tricks I’ve forgotten to write about. But the ultimate goal of this guide was to get mappers started with exploring the engine and building brushes.

Next time I’ll explore entities and turning the basic geometry of you map into something that is actually playable. Ciao

Trenchbroom – Getting Started

In order to start building a map for Quake, we’re going to need to install Trenchbroom and get it all set up. There are countless tutorials and guides out there that you can follow, but I figured there was no harm in me adding yet another one to the internet. Most of the information here has been compiled from dumptruck_ds’ quickstart tutorial video and from the Trenchbroom 2026.1-RC3’s reference manual, and whilst this can be a somewhat awkward and cumbersome task at first, once you’ve done it, you’ll never have to do it again. For the game jam and for this installation guide, I plan on using the latest released version of Trenchbroom which is v2026.1-RC3 on a Windows 64bit OS. For those who plan on using MacOX or Linux, I’m sure installation and set up instructions can be found online with a quick google search.

Preparation

Before we get started we will need to do a little prep work:

  • We start by making a folder in the Root of our main Drive (it doesn’t matter what you call it, but the important thing is that it is in the root of the drive)
  • For me, this is my C: drive, and I’m going to name the folder QuakeDev
  • Inside of that QuakeDev folder we’re going to add 5 more folders:
    • id1
    • tools
    • Trenchbroom (I name this the version of Trenchbroom I’m using)
    • wads
    • working

 

  • Within the id1 folder, create another folder called maps

Setting Up Trenchbroom

As mentioned in the introduction, I’m going to be using Trenchbroom v2026.1-RC3. This is (at the date of writing) the most recent version of Trenchbroom. You are free to use whatever version of Trenchbroom you desire however:

 

The changelog also suggests Window users download and install Microsoft Visual C++ Redistributable for Visual Studios (a link to which can also be found in the change log). I already had it installed previously from my work in Unreal and Unity, so I can’t verify if this is 100% necessary for our Quake mapping purposes, but there’s no harm in installing it just in case.

  • Extract the Trenchbroom files into the trenchbroom folder you created.

 

Next we’re going to need to populate Trenchbroom with Quake content. This comes in the form of PAK files. Simply put, a PAK file is used to store data that will be extracted and loaded by the Quake engine (this is typically game data, entity definitions, maps, sounds etc). In order to find these PAK files, you will need to obtain a legitimate version of Quake. I personally recommend the Bethesda remaster on steam. Not only is it relatively cheap and comes with all of the official expansions but there’s a whole host of QOL changes to graphics and input options that make the game far friendlier to play in 2026).

Pak0.pak is necessary for all Quake games to run, and pak1.pak appears to be needed too if you want the full library of Quake content to work with.

  • Navigate to the Id1 folder in your game directory (mine is C:/ProgramFiles(x86)/Steam/streamapps/common/Quake/Id1)
  • Copy the following files:
    • config (if this file is missing, don’t worry – config.cfg will generate the first time you compile and test a map).
    • PAK0.PAK
    • PAK1.PAK

 

  • Return to the QuakeDev folder you created in the previous section and paste these files into the Id1 file you created

 

Textures are stored on WAD files, and we’ll need these as well. Unfortunately these aren’t directly available in the Quake game directory like the PAK files, so we’ll have to source them externally. Quaddicted is a great source for all things Quake related and the WADs can be found here easily to download. Just to get things working, find and download the start WAD and put it into the WADs folder in QuakeDev.

Downloading Compiling Tools

Once we’ve made a map, we’re going to need to compile it. Ericw-Tools is the standard compiling tools for many Quake mappers and they can downloaded directly from the website. I personally went with the stable branch, however I have no reason to believe the alpha branch is any less usable (and its probably better in many regards).

  • Go to Ericw-Tools
  • Download the either the Alpha or Stable version of the compiler tools
  • Add a folder in your QuakeDev/Tools folder with the same version number of the compilers (mine is ericw-tools-v0.18.1-win64)
  • Extract the files into that folder

 

At this point in other older tutorials, they will suggest you download Necros compiling GUI. This offers a developer friendly GUI to run the Ericw-Tools compilers we just downloaded, however newer versions of Trenchbroom have an integrated GUI that can handle that task instead, so it makes more sense to use the internal tools rather than adding another third party software to the workflow. If you still wish to install and use Necros Compiling GUI however, dumptruck_ds’ video has a link and all the information needed to set it up). For this tutorial however I will show you the configuration of the compiler using Trenchbrooms integrated GUI.

Downloading Quakespasm

The final stage of preparation is to set up the game files that will run our map when we’re mapping and testing. Most guides (including dumptruck_ds’ quick start guide) suggest using Quakespasm. Quakespasm is a cross platform Quake engine based on the SDL port of Fitzquake. I tried to dig up some reasoning as to why you should use this over the remaster on Steam as a way of playing your maps, and the only real answer I could get is that the load times are quicker and its less prone to bugs. I might experiment with this more, but for now let just download Quakespasm.

Final Setup

Now that all of the files are downloaded and placed, lets check Trenchbroom to ensure everything is working properly and get a very basic box room made up and compiled.

  • Open Trenchbroom via the Trenchbroom.exe in your QuakeDev/Trenchbroom folder
  • Click “New Map”
  • Click “Open Preference” and select Quake from the list on the left
  • Click “Configure Engines” and make a new profile by clicking the little + button on the left
  • Name the Profile something useful (I called mine “Quakespasm”)

 

  • Ensure the “Game Path” points to your C:/QuakeDev folder (as that’s where we extracted Quakespasm to)
  • For each of the compilation tools, assign their path to the C:/QuakeDev/tools/ericw-tools/bin folder
  • Each compilation (qbsp, vis and light) will be in the bin folder

 

Whilst here you can also change the theme from system to dark in the view tab (very important) as well as adjust the layout, grid thickness, brightness, FOV (as well as a whole load of other editor options to play around with). I personally work on a four panes layout with everything else set to default.

  • Click OK to apply the changes close the window.
  • Select Quake from the list (ensure Map Format is “Valve”) and click “OK”

This will open the editor ready for you to start mapping! To ensure everything has been set up correctly, you can check the “Entity tab” in the right. Entities are game pieces we can work with in map making and they are extracted from the PAK files we added to the id1 folder in QuakeDev. If all previous steps have been followed correctly then the Entity Browser should be full of entities. If not then something has gone wrong and you should go back and retrace your steps through the installation process.

 

Whilst you still have the entity tab selected, we can add the START.WAD file we downloaded to give us some basic textures to work with.

  • From the list in the Entity tab, select the Key “wad” (this menu is context sensitive and clicking wad should display “Wad Files” in the section below the list).
  • Click the + arrow and navigate to your START.WAD file in QuakeDev/wads
  • Select “Absolute” and click “Ok”
  • The WAD and the directory path will appear in the box

 

  • You can see contents of the WAD file by selecting the Face tab at the top right
  • If you don’t see any textures, click the title “Material Browser”
  • Select Start.WAD from “available” and click the + icon to move it to “enabled”
  • Click the title “Material Browser” again to see the textures

Compiler Setup

Its now time to set up the compiler for Trenchbroom. What we’re going to do is set up a bunch of sequenced tasks to successfully compile any map we make. You don’t need to know every single detail about a Quake Map compiling process, but it does help to know the basics. Compiling is the act of taking a working map file in Trenchbroom and converting it to a file that is readable by the Quake engine (a bsp file). This typically consists of three stages, QBSP, Vis and lighting.

QBSP is the first stage and is the process that builds and calculates all of the geometry and collision data, as well as extracting needed textures from the WAD file and repackaging them into the bsp file. A map is actually fully playable with just this step, however you’ll be missing lighting and and optimisation if you were to stop here. That said; if you’re wanting to quickly test logic or geometry changes and don’t want to go through a full compiling process (which on larger maps can take some time on lower end PCs) then setting up a profile just to run a QBSP compile might be worth it to save some time.

VIS is the stage of compilation that calculates PVS (Potential Visible Set) data for the level (If you’ve ever built a map in Source, this is essentially VisLeaf) and its used by the engine to calculate which parts of the map should be visible to the player based on their location. In its simplest form, its optimising the map for the player by breaking it into chunks and calculating which chunk should be rendered at that time. This is the part of the compiling process that can take the longest depending on your CPU.

Light is often the last stage of the compiling process and it calculates lightmaps for the level using each light entity found in the bsp file.

With that out of the way, lets set up the Compiler:

  • Click “Run” from the top bar in Trenchbroom and select “Compile Map”
  • Add a new Compiler Profile and call it “FullCompile” (leave the working directory set to its default value of ${WORK_DIR_PATH})
  • Add the following tasks:
    • Export Map
    • Run Tool (this one is for QBSP)
    • Run Tool (this one is for Vis)
    • Run Tool (this one is for Lighting)
    • Copy Files

 

Parameters for each task are separated by a space, expressions are prefixed with a $. Additional information on compiler parameters can be found in the ericw-tools documentation and Trenchbroom Documentation. I will explain each task of the compile process and what each parameters mean, but if you just want to set the compiler up and get started, you can simply ignore the explanation and paste the parameters directly into the text box under each task.

Export Map

File Path: ${WORK_DIR_PATH}/${MAP_BASE_NAME}-compile.map

This task exports the map file to the File Path provided. If our map is called Map1, what this will do is write a copy of the Map file called “Map1-compile.map” to our working directory, which in our case is “QuakeDev/id1/maps”. Its not immediately clear as to why the documentation suggests we do this, I can only assume its to backup and protect the main map file during compilation, as this new “-compile” version of the map is the one that is read by the compiler in subsequent tasks.

  • ${WORK_DIR_PATH}/ – is a reference to the Working Directory of the map set in the Compiler profile. We left this as its default value which simply points to the folder which our map is saved in.
  • ${MAP_BASE_NAME}-compile.map – is what the new map will be called. In this case it references the name of our map and appends a suffix “-compile” to the end

Run Tool (QBSP)

Tool Path: C:/QuakeDev/tools/ericw-tools-v0.18.1-win64/bin/qbsp.exe

Parameters: ${MAP_BASE_NAME}-compile.map ${MAP_BASE_NAME}.bsp

This task runs the QBSP executable file in the ericw-tools folder, and writes the bsp data to a .bsp file. The two parameters needed for this task are:

  • ${MAP_BASE_NAME}-compile.map – the map file which will be read by the QBSP.exe
  • ${MAP_BASE_NAME}.bsp – the name of the bsp file that will the bsp data will be written to. In this case it’s just the name of the map

Run Tool (Vis)

Tool Path: C:/QuakeDev/tools/ericw-tools-v0.18.1-win64/bin/vis.exe

Parameters: -threads ${CPU_COUNT -1} ${MAP_BASE_NAME}.bsp

This task runs the Vis executable file in the ericw-tools folder, and writes the PVS data to a .bsp file. The two parameters needed for this task are:

  • -threads ${CPU_COUNT -1} – this parameter goes over my head as my knowledge of CPU cores and threads is almost non existent, but my understanding is that this is explicitly telling the CPU to use the maximum number, minus 1, of threads available during the vis compile.
  • ${MAP_BASE_NAME}.bsp – the name of the bsp file to write the PVS data to

Run Tool (Light)

Tool Path: C:/QuakeDev/tools/ericw-tools-v0.18.1-win64/bin/light.exe

Parameters: -threads ${CPU_COUNT -1} ${MAP_BASE_NAME}.bsp

This task runs the Light executable file in the ericw-tools folder, and writes the lightmap data to a .bsp file. The two parameters needed for this task are:

  • -threads ${CPU_COUNT -1} – see above
  • ${MAP_BASE_NAME}.bsp – the name of the bsp file to write the Lightmap data to

Copy Files

Source File Path ${WORK_DIR_PATH}/${MAP_BASE_NAME}.bsp

Target Directory Path: ${GAME_DIR_PATH}/${MODS[-1]}/maps

This task copies the bsp in the working directory to the maps directory within the last enabled mod. This is the file that will be read by Quakespasm to play the map. I actually am not entirely sure why this is needed (and why we can’t just run the bsp file from the working directory, but without this stage, you won’t be able to play your map from Trenchbroom, so its best to add it and not ask too many questions.

  • ${WORK_DIR_PATH}/${MAP_BASE_NAME}.bsp – the working directory of the map file
  • ${GAME_DIR_PATH}/${MODS[-1]}/maps – the maps folder in the last enabled mod of our game directory (in this case QuakeDev/id1/maps). $MODS[] is an array containing all enabled mods for the current map. I’m not entire sure I understand what’s going on here however.

 

And that’s it, the compiler is set up. If you want to test and make sure everything works; save the current scene as something like “testMap” and click the Test button. A console log should be printed displaying the following:

Lets See It All Working

You’re done! Trenchbroom is ready to be used. It would be a shame however, not to end this post without seeing it all working and ensure our setup is correct. So lets make a very quick room, with some geometry, a player start, and a point light. Don’t worry about understanding any of this for now, as in the next post, I will walk you through the basics of mapping in Trenchbroom, including UI navigation, brush manipulation, texturing etc.

  • In the perspective 3D view, click on the cube and Hold the SHIFT key – this will enable brush manipulation
  • Hover over the sides and extend them out to make the brush a bit bigger (we will use this as a floor piece)

 

  • With the brush still selected, press CTRL+D to duplicate it
  • In an orthographic view, click and drag the new brush to the side
  • Resize the brush to create a wall

 

  • Duplicate the wall brush 3 more times to create 4 walls surrounding the floor piece
  • Duplicate the Floor and move it up to create a roof piece and seal the room (its important that the whole room is sealed, as gaps into the void will create leaks and the map won’t compile correctly)

 

  • Inside of the room we have just created, select the four walls
  • Navigate to the “Face Tab” in the top right and select a texture to apply to them (I went with city1_4)
  • Apply a different texture to the floor brush and a third texture to the ceiling

 

  • Navigate back to the “Entity Tab” and using the Entity Browser search bar in the bottom right; search for “info_player_start”
  • Click and drag the entity into the world (this will be the spawn point for the player)

 

  • Search the Entity Browser for “light” and drag it into the scene

  • Save the map, Select Run from the top bar and then select Compile
  • Compile the map
  • Select “Launch”
  • Select your QuakeSpasm launch profile and in the “Parameters” add “+map ${MAP_BASE_NAME}”

This will load the map you have just compiled by default. Press launch and see your very basic room in engine!

And there you have it! A functioning Trenchbroom to start mapping in! Next post I will be going into more detail as to how to use Trenchbroom and become more proficient with the tools.