Thred v0.7b Tutorial Jim Lowell - jlowell@visi.com November 4, 1996 INDEX ----- 1 Introduction 1.1 Acknowledgments 2 Requirements 3 Thred conventions 3.1 Basic views 3.2 Buttons 3.3 Menus 3.4 The default brush 3.5 Keyboard Shortcuts ** NEW ** 4 Building your first map 4.1 Setting up 4.2 Walls 4.3 Structures 4.4 Lights 4.5 Water 4.6 Wads 5 GROUPING 5.1 Defining groups 5.2 Visible groups 5.3 Exporting partial maps 5.4 Group Editing ** NEW ** 6 Advanced operations 6.1 Brush Subtraction 6.2 Associating brushes 6.3 Doors 6.4 Platforms 6.5 Teleporters 6.6 Buttons & Triggers 6.7 Walking monsters 6.8 Trains 7 Texture alignment 8 Don't do this 9 Other sources of information 1.0 INTRODUCTION ---------------- Welcome to Thred! Thred is a 3D editor that has been designed to create Quake maps. Thred supports many advanced features to make your editing as easy as possible. Thred is written and owned by Jonathan Mavor (ah289@freenet.carleton.ca). The Thred webpage can be found at http://www.visi.com/~jlowell/thred and is maintained by Jim Lowell (jlowell@visi.com). This tutorial is intended for people who are getting started with Thred. It is not the Thred manual and does not cover all aspects of editing Quake with Thred. When you are done you will have built a simple level and loaded it into Quake. It is assumed that you know something about Quake (you've played it a lot, right?). It also helps to know something about brushes and how they work together, but it is not necessary to use Thred. You should unzip the Thred zip file into one directory (I use Quake\Thred) and save all your files to this directory as well. 1.1 ACKNOWLEDGMENTS Thanks to Marc Fontaine and Jasper van der Neut for their excellent artwork on the Thred buttonbars. 2.0 REQUIREMENTS ---------------- This entire document applies to Thred v0.7b only. The version of QBSP that is included with Thred has been modified to support a larger number of brush faces. Because Thred generates brushes with many faces it is highly recommended that you use the QBSP.EXE that comes with Thred. Maps generated with QBSP will run in registered Quake only. You must run Thred in Windows 95 or Windows NT and you must have a mouse. (note that Quake doesn't run under Windows NT, so it is really only practical to run Thred under Windows 95 at this time). 3.0 THRED CONVENTIONS --------------------- 3.1 Basic Views Most of the editing in Thred takes place right in a window. Moving, scaling, rotating, and shearing can all be done in a Thred window. There are a lot more things that you can do in the Thred windows, so it is important to understand how they work. There are 5 different views of your map in Thred. Solid Gons (or Solid Render), Wireframe, front, side, and top. Thred is a MDI application, so you can have as many windows open as you like with any combination of these views in any of the windows. In the solid render and wireframe views, the mouse can be used to move and pan around much the same way you would move in Quake. To walk around, hold the left mouse button and move the mouse. To look around (same as mlook in Quake) hold the right mouse button and move the mouse. To strafe up, down, left, and right hold both buttons down and move the mouse. The middle button switches you between your current tool and camera mode, then back again (very handy if you have a 3-button mouse). You must be in camera mode for these to work. There is one other view that you can have in a windows: The texture map. This is done by selecting "Texture Browser" from the view menu. This shows all of the textures in the current wad (use of wads is explained later in the document). 3.2 Buttons There are two button bars along the top of Thred. The top bar has 22 buttons, the bottom one has 19 buttons. All of the buttons have hints on them that you can read when you pass the mouse over them. Their function should be obvious from that hint help. There is a webpage that explains most of the buttons in detail. It is at http://www.visi.com/~jlowell/thred/buttons.html 3.3 Menus All of the actions that can be done with the button bar can also be done with the menus. Of particular importance is the Tools menu which holds the BSP Manager option. The BSP manager will be used a lot to redraw your map from time to time. With the "Quick BSP" button, this menu shouldn't get used very much, but it is still important to know where it is. The BSP manager gives you all of the options for rebuilding the BSP preview in the solid render and wireframe windows. Another important menu is the Map Settings option under the file menu. From here you can select wad and palette files to use with Thred. 3.4 The default brush Of all the brushes in your maps, one will always be the 'default' brush. It will be displayed as a blue wireframe brush with red nodes. This is the brush that is modified when you move, skew, rotate, etc. The default brush may or may not be a brush that is part of the 'world' ("the world" is a term that means "everything in the Quake map"). Until you add a brush to the world, it doesn't really exist and won't be visible in Quake when you build the map. If you move or change a brush that is part of the world, the changes won't be visible in the wireframe or solid render windows until you do a BSP rebuild. This is easily done by clicking the button with a red B on it (top bar, 7th from the left). 3.5 Keyboard Shortcuts Spacebar switches between camera and brush movement. Z,X, and Y toggle locks on their respective axis's. G toggles between group operations and single brush operations. 4.0 BUILDING YOUR FIRST MAP --------------------------- 4.1 Setting up Start Thred from scratch. You should have a view of the default brush and nothing else. Maximize Thred and select "4 views" from the view menu. You should now have four windows with a solid render window in the top left. Make sure that camera mode is selected. This is the 1st button in the bottom buttonbar (just to the right of the group dropdown list) and has a hint of "Camera" and looks like an eye. 4.2 Walls Let's create a quick room. To do this, we need 6 walls. The easiest way to get that is to click the cube button and change some settings in the dialog that comes up. The cube button is 8th from the right in the bottom buttonbar and has a hint of "Cube". The dialog that comes up has many options, but we'll just adjust a few. Set the top X size and Z size to 512 each. Set the bottom X size and Z size to 1024. Now set the height to 256. The wall thickness should be 16. Click the "hollow" radio button and click ok. You should now have a default brush that looks like a tapered square. The view in the solid render window may be too big for the window, so you can back up by holding the left mouse button and dragging down in that window (make sure you're still in camera mode or you may move or change the brush). Now is a good time to play around with the views in the other 3 windows and see how they work too. We're sure that we want this brush as the walls of our room, so let's add it to the world. To do this, click the add brush button. This button is 10th from the left and has a big yellow cube on it with a "+" on it. The hint on the button is "Add Brush". When you click it, you should see the default brush fill in. What really happened is that you added the brush to the world (this made it shade solid) and then Thred created a new default brush that is a duplicate of the brush you were just using. This is very handy if you are adding repetitive objects to areas (stairs or bars or something). You can move or edit the default brush now without changing the brush that you just added. Let's place an starting point in the room and view the map in Quake now. To do that, open the entity editor. This is the 5th button from the right on the top toolbar. It looks like a light with a wrench over it and has a hint of "Entity Dialog". Select New Entity, then pick "info_player_start" from the list. Leave it at the default and select close. You should see a cross appear on the map (it will look like a dot if you're back far enough). Entities appear as yellow crosses. A red cross is the currently selected entity. Now that you've done that, select 'save' from the file menu and save this map as 'test1', then select 'Export to Quake' from the file menu and export the map to a Quake map file. Now go to a DOS box and change to the directory that you have Thred installed in. Type the following: QBSP TEST1 After a bit of number crunching, QBSP will create a new file calls TEST1.BSP in the same directory that you ran it in. Copy this file to the quake\id1\maps directory (create it if necessary) and start Quake. From the quake console, type "map test1" and hit enter. Congratulations, you just created your first Quake map. ** NOTE: There are several batch files included with Thred. If you installed Thred in a subdirectory below Quake, you can use them. They will process the map and then copy the map and any pointfile into the quake\id1\maps directory so you can play it. BATCH FILE FUNCTION ================================================================ q.bat Runs just QBSP. No lighting or vising ql.bat Runs QBSP & LIGHT. No vising qle.bat Runs QBSP & LIGHT with the -extra option. No vising -extra on light eliminates the visible blocks on the lightmap. qv.bat Runs QBSP & LIGHT & VIS with the -fast option. Very good for developing large maps. qfinal Runs QBSP & LIGHT -extra and VIS -level 4. You should always run your map through this before releasing it. 4.3 Structures This is pretty dull, so let's add some structures to the room and add a few new textures. Go back to Thred (it is assumed that you left it running while Quake was up) and select the cube button again. Now type in 16 for all four X & Z values and put in 300 for the Y value. Make sure that solid is selected and hit Ok. You should see your brush change shape. Let's change the texture of the brush now. To do that, select 'Texture Browser' from the view menu. You should see a new window full of textures. Just click the one you want and it will be automatically applied to the default brush. Go ahead and pick a texture from the window, then minimize it (the texture windows that is). To see what texture is applied to the brush, click the brush attributes button (7th button from the left on the bottom buttonbar. It's a green brush with a wrench over it and has a hint of "Attributes Dialog"). The name of the brush is the name of the texture that will be applied to it. When you selected a texture from the texture dialog, you were changing the name of the brush to match the texture that you wanted. What we have right now is a vertical pole that is in the room. If you switch to 'move/rotate' mode (2nd button from the left on the bottom buttonbar) you can move the brush around with the left mouse button. Play around with this and add a few brushes to the world. I recommend that you move them in the 'top view' window because that will keep you from accidentally moving them above or below the room. Don't forget that it's easy to add several brushes of the same kind in a row by just clicking the 'add brush' button, then moving to a new location and repeating. You should be aware that Thred is quite capable of creating objects that are too complex for Quake to handle. An example of this is a sphere with too many stripes. It will work just fine in Thred but will fail in QBSP. Be careful of this. Once you've done this, walk around in the solid render view. You should be able to see the 'poles' that you just added to your room. 4.4 Lights Let's add a few lights to the map now. This will add quite a bit of depth to the map when we see it in Quake next. To do that, you can click the 'add light' button. It looks just like a light bulb and is the 4th button from the right on the top buttonbar. This will add a new light to the world at 0,0,0 (same spot the player start is at). Now click the 'move entity' button. It's 8th from the right on the top buttonbar and looks like a yellow dot with blue arrow pointing away from it. When you're in this mode you can move the currently selected entity with the left mouse button or select a new entity with the right mouse button. In the top view move your light around in the room. Don't get too close to the walls or it may fall outside the room. You can see and tweak the entity in any of the four windows. Be aware that you need to switch from entity mode to camera mode and back to change your views while performing this process. I recommend that you add 5 lights to this map. Place them at random where you think they cast some interesting shadows. Check the lights in the front and side views to make sure that they are inside your room. Move them if they aren't. Now save your map and export it to Quake. Go back to your DOS box and get to Thred directory. Type these commands in: QBSP TEST1 LIGHT TEST1 The new light command will add the lighting to your map. Now copy test1.bsp to the quake\id1\maps directory and start up Quake again. If your lights were placed well, you should have a somewhat dark room with areas of light and lots of shadows. 4.5 Water To add water to a Quake level, simply change the texture of a brush to *water1 and everything inside the brush will become water. Let's do this to our level. Click the cube box and create a cube brush that has x=1200 and z=1200 (both top and bottom) and 128 tall. Now in the Top view drag this big brush so the room fits entirely inside of it. Now go to the side or front view and drag the brush so that it sticks just below the room, but most of it is inside the room itself. Click the brush attributes dialog and change the name of this brush to *water1. Now add the brush to the world. Export and rebuild the map and load it into Quake. You should be swimming around in water now. 4.6 Wads The file 'mywad.wad' that comes with Thred contains some basic textures. You can use any wad as a texture source if you like. Simply put the wad in your Thred directory and select it from the 'map settings' menu option in the file menu. You can use other palette files the same way. ** NOTE ** When you select a new texture wad, you must close the current map and load a new map or start a new map before the texture change will take effect. If you don't, you will still see the old textures in the texture browser until you do. 5.0 GROUPING ------------ 5.1 DEFINING GROUPS Grouping is one of the most powerful features of Thred. This is the feature that makes it possible to work on huge maps with Thred with relative ease. There are four buttons and a drop-down list dedicated to working with groups in Thred. The buttons are on the bottom buttonbar all the way to the right. The drop-down list is also on the bottom buttonbar all the way to the right. The drop-down list shows all of the groups for the current map. The group selected in the box is the current group. The left group button is used to put Thred into group select mode. Once you are in group select mode, you can highlight groups of brushes and entities in any 2D window. To do this, you use the left mouse button to drag a box around the brushes and entities you want in your group. You can use the right mouse button to de-select brushes that you don't want. When you have selected a group of brushes, you can either add it to the current group (as shown by the drop-down list) or create a new group with it. Adding a brush to the current group is the way you move brushes from one group to another. To add the brushes to the current group, click the 3rd button from the left (Add to current group). To create a new group, click the 2nd button from the left (Create group). If you create a new group, you will be presented with the Group Attributes Dialog. From here you can type in the name of the group and assign it a color (click the solid colored box to change colors). 5.2 VISIBLE GROUPS The rightmost button on the bottom buttonbar is the Group Attributes button. The Group Attributes dialog shows all of the groups in the current map. You can select any group and change it's color or rename it from here. Next to each group in the list is a set of brackets []. If you double-click the name in the list you will toggle an [X] in those brackets. All groups with an [X] are visible. Groups without it [] are non-visible. The visible attribute is only used when you put Thred into Show Visible Groups mode. You can do this by clicking the 2nd button from the left on the top buttonbar. When Thred is in this mode, only visible groups will appear in Thred. By rebuilding the BSP (click the red 'B' button) you can see a solid preview of just the visible groups. This is very handy for working on large maps because it keeps the amount of data down to a manageable amount. If you were to show all of a map all the time, it would quickly get very hard to work on parts of the map simply because of the number of lines being drawn on the screen all the time. 5.3 EXPORTING PARTIAL MAPS There is a major advantage to being able to export just part of your map. It will run through QBSP much faster and you typically don't have to VIS the map. Thred will only export whatever you can see in the editor. If you have just one room visible and you export to a .map file, then that room is all that will be in the .map file. Be sure you include whatever group has the info_player_start or you won't be able to start your map! 5.4 GROUP EDITING If the 'G' button is pushed in, movement, rotation, shearing, etc will be performed on the current group instead of the current brush. There is no way to copy a group yet. 6.0 ADVANCED OPERATIONS ----------------------- 6.1 BRUSH SUBTRACTION In Thred, you can add a brush to the world by clicking on the Brush Add button (yellow box with a plus sign on it). You can also subtract a brush from the world by placing it over another brush and clicking on the minus button. When you do this, it will create a hole in the world where the default brush is. This hole applies only for the brushes that were down before you subtracted the brush. If you want to add a new brush that goes through the hole, you can do that. The brush that you subtracted from the world stays visible in Thred and can be selected and modified. If you move a subtraction brush, it moves the hole around in the world. Subtraction in Thred is not working 100% of the time right now. It is possible to create something in Thred that doesn't work right. This is being worked on. When you subtract from a brush, you have to be careful to overlap the subtraction brush so that it doesn't line up exactly with the faces that are there. For example, if you want to put a hole in a wall, this is what the view would look like from the top: SSSSSSSS +----S------S--+ | S S | | S S | +----S------S--+ SSSSSSSS To subtract in this example, the subtracted brush overlaps the edges of the brush you are subtracting from. This is what you don't want to do: +----SSSSSSSS--+ | S S | | S S | +----SSSSSSSS--+ This will create an infinitely thin plane in the edges of the brush you're subtracting from and will look wrong in the game. 6.2 ASSOCIATING BRUSHES Quake has several entities that allow special behavior within the Quake world. To use these special entities, you associate them with brushes. These brushes define the area of effect (like a trigger), or the thing to move (like a door). To associate a brush with an entity, follow these steps: 1) Select the brush or brushes to associate with the group selector tool 2) Go into the entity manager (button with a light-bulb under a wrench) 3) Add the entity that you want to associate these brushes with 4) Click Associate Selected Brushes (NOTE: Only click the associate button ONCE. If you click it more than once, you will effectively associate the entity with nothing because the brush is no longer selected after the first time you click that button). You can associate several brushes with one entity. This is useful for making complex objects that move like one thing (like a boat). 6.3 DOORS To make a door, you use a func_door entity. Put the brush down that you want to be the door. Now associate it with a func_door entity and set some of key values to make your door behave the way you want it to: KEY MEANING ================================================================ Angle Which direction does the door move Speed How fast does the door open (100 is a medium speed) Sounds 1-5 I think. Wait How long (in seconds) does the door stay open before closing. I use 2 a lot. The angle is set in degrees. Looking from the top, this is the angle that it points to: 90 ^ | 180 <----+----> 0 | V 270 You can also assign an angle of -1 to go up and -2 to go down. *** IMPORTANT NOTE *** If you have two doors touching each other, Quake will link them together so that when one door opens, the other one does too. This is almost always what you want, but there are times when you don't want this to happen, and it can produce unexpected results. There is a way to unlink them, but I don't know what it is right now. The only thing I can recommend at this time is that you don't make the doors touch each other if you don't want Quake to link them together. 6.4 PLATFORMS A platform is very similar to a door. You place a brush (or group of brushes) in the world that you want to be the lift. You must create the lift in the up position. Next, you associate it with a func_plat entity and set the different keys to make it behave the way you want. KEY MEANING ================================================================ Height How high the lift is. When the game starts, the lift brush will be lowered by this amount to rest on the floor. This must be precise or the lift will rest above or below the floor. Speed How fast does the plat moves (150 is the default) Sounds 1 - hydraulic lift 2 - chain lift Wait How long (in seconds) does the lift drops back to the lowered position. As far as I know, the only behavior allowed for a lift for it to start in the down position and then rise up when someone walks on it. You can use func_doors to make other behaviors. 6.5 TELEPORTERS Teleporters are triggers that move the player from one spot to another. You add a brush to the world and assign it to a trigger_teleport. The brush that you added will become invisible in the game, but when the player walks into it they will activate the teleport trigger. To set the player's destination, you need to add a info_teleport_destination entity to the world and link it to the trigger_teleport entity. You do this with a combination of target and targetname keys. Add a "target" key to the trigger_teleport entity and give it a unique value (like t1). Then add a "targetname" key to the info_teleport_destination entity and give it the EXACT SAME VALUE. You must be careful to match them up. Quake is case sensitive, so if you capitalize a letter in one and not the other, your teleporter won't work. Once you've done that, position the info_teleport_destination where you want the player to land. You can add an "angle" key to the destination entity to indicate which direction you want the player to face after teleporting. 6.6 BUTTONS & TRIGGERS Triggers are used to make things happen. The example I will give is a button that opens a door. This action is very similar to the teleport example as you will soon see. To do this, create the door that you want to open. Add a "targetname" key to the func_door entity and give it a unique value. Now, create a brush that will be the button. Associate it with a func_button and add a "target" key to the button. Give it the same value as the door. Now when that button is pressed, you will trigger the doors and open them. As another example, you can place a brush in the world and associate it with a trigger_once or trigger_multiple. Giving it a "target" key with the same value as the door will cause the door to open when the player walks through the brush. If you used a trigger_multiple, it will open every time. If you use a trigger_once, it will only open the first time the player enters the trigger brush. After the first time, the trigger is ignored by Quake. 6.7 WALKING MONSTERS Making the monsters walk around in Quake is one of those little touches which I feel sets one map apart from another. This is a fairly simple thing to do, but does require some explanation to implement in Thred. The idea is to create several path_corner entities that define a path for the monster to walk. Link them together with "target" and "targetname" keys. Each entity should have both a target and targetname key. The targetname is the name of the path corner and the target should point to the next path_corner that the monster is to walk to. If you link the last path_corner to the first one, the monster will walk around the path endlessly until he attacks a player or another monster. This is what the path_corner's would look like: Corner targetname target --------------------------------------- 1 mw1 mw2 2 mw2 mw3 3 mw3 mw4 4 mw4 mw1 Now if you add a target key to the monster that you want to make walk and give it a value of the first path_corner ("mw1" in this case) the monster will walk to the first corner, then walk around the loop until he attacks. 6.8 TRAINS Trains work just like making monsters walk, except you can make a combination of brushes follow the path. func_trains will move exactly from path_corner to path_corner and will move through walls if necessary in order to get to the next path_corner. To do this, associate a brush with a func_train. Then add the path_corner entities and place them in the map to define the corners that you want the train to follow. Now by adding a target key to the func_train and giving it the same value as the first path_corner, you can make the brush move around. The top left front corner (bottom left from the top view) of the brush will move to *exactly* the position of each path_corner. The brush will start at the first path corner when the game starts, it will not start where you place it. You can use this to create a neat effect. You can put a train in a dark room, but place the starting brush next to a bright light. The train will be bright even though everything else in the room is dark. 7.0 TEXTURE ALIGNMENT --------------------- Quake performs natural texture alignment. This means that everything aligns to the grid in Quake. This is good because it tends to make things look better. Quake also allows for texture alignment, but Thred does not implement that yet. Therefore, to align door, light, button, and other textures, you have to place the brush exactly on the grid that the texture is going to align to. This is further complicated by the fact that Thred doesn't tell you the exact size of the textures. You'll have to guess (sorry bout that!). Anyhow, let's say you want to use a texture that is 64x64. Create a brush that is 64x64 on the side that you want the texture to appear on. (don't forget that all sides of a brush get the same texture). Now set the grid size to 64 and zoom so you can see the gridlines. Move the brush so that it is close to where you want it. Your goal is to make the edges of the brush line up exactly with the grid lines. You cannot do this with the grid set to the same size as the brush, so drop the grid down to 32, move the brush kiddy-corner to it's current position, then bump the grid back up again. You should be able to line the brush up exactly this way. 8.0 DON'T DO THIS ----------------- There are some things you should not do in Thred. There may be more, I'm not sure. 1) Don't delete the first brush in the map. Thred keeps the brushes in a linked list and removing the first brush causes it to crash. 2) Don't delete the first entity in the map (same reason) 3) Don't try the texture preview. It doesn't work yet. 4) Don't copy a brush that is associated with an entity. The new brush and all subsequent brushes will also be associated with the same entity (I once got a whole room to act as a door because of this :) 5) Don't try to select objects in any 3D window. You can only select objects in the 2D windows. 6) Don't worry if you can't find your group in the drop-down list, use the arrow keys to scroll up and down in the list 7) Don't click the associate selected brushes more than once. 8) Don't release any maps that won't VIS. You're a loser if you do. 9) Don't cross against a green light. 10) Don't freak out if your map doesn't look the same in Quake as it does in Thred. You've made something too complex for Thred and you need to go back and simplify it. 9.0 OTHER SOURCES OF INFORMATION -------------------------------- All these sources are on the web. ------------------------------------------------------------------------------ The Thred homepage: Find all the latest news on Thred here http://www.visi.com/~jlowell/thred ------------------------------------------------------------------------------ The Thred Tips & Tricks page: Includes a full-graphics version of this tutorial as well as new tutorials on making doors and hallways. This site is an excellent supplement to this tutorial. http://www.visi.com/~neckro/quake/thred.html ------------------------------------------------------------------------------ The Quake Map Specs: I learned a lot from this page http://www.infi.net/~nichd/qmapspec.html ------------------------------------------------------------------------------ Quake texture wads: Use new textures! http://www.wf.net/~stephenc/ ------------------------------------------------------------------------------ Information on Quake Editors: Get the scoop on other Quake editors http://www.planetquake.com/qlen/index.html ------------------------------------------------------------------------------ That's it for now! -= Jim Lowell =-