Eloy Perez

Just random things

Creating circles in Trenchbroom

Posted at — Jun 8, 2023

Trenchbroom is a software to create maps for Quake and other games that inherited its engine. Maps for these kind of games have a very specific structure and Trenchbroom was created for them specifically.

Usually it wouldn’t be used outside the family of games previously cited but because the system is so stable and powerfull there are many tools that integrate maps created with Trenchbroom into other engines. For example for the Godot Engine you can install the Qodot plugin which will allow you to import maps created with Trenchbroom into Godot with a single click (mostly).

One caveat that has is that everything is created with really simple shapes, that means that circles, cilinders, spheres, etc are out of the question. But there are many ways to create them, it’s not perfect but it’s good enough for most cases.

For creating a circle I know two methods. One is to create a square and with the clip tool trim the corners until you have a circle. Then duplicate it and rotate the new “squares” until you form your circle. Finally select all pieces and use “Convex Merge” to join all fours.

But there is a better way. Creating small rhombuses and joining them together. This way you can create a circle with any number of sides. The more sides you have the more similar to a circle it will be.

For this method use the Brush Tool and create your rhombus. Hide everything but your new object with Ctrl+I and clean all the repeatable commands with Ctrl+Shift+R (we are going to make use of the repeat commands feature).

Now, select the rhombus, duplicate with Ctrl+D and use the Rotate Tool to rotate it 15º. Repeat this process with Ctrl+R (ie: repeat commands) until you have a full circle.

Select everything with Ctrl+A and finally join them together with Ctrl+J (Convex Merge).

It seems like many steps but is really simple and fast to do. The only thing you have to “calculate” is how much you need to rotate each rhombus to have the circle with the precision that you desire. I’ve created this table to help you (and me) with that.

Sides Rotation
60 6
45 8
40 9
36 10
30 12
24 15
20 18
18 20
15 24
12 30
10 36
9 40
8 45
6 60

NOTE: These methods have been extracted from videos of dumpstruct_ds and Slipseer go check them out if you are interested in creating maps with Trenchbroom.