git repos / leveldk_map_tutorial_bak

commit 0aa4cef5

Poul Sander · 2026-05-14 17:15
0aa4cef5ddd0c75bc84a49c63b9ebbb6d1d99796 patch · browse files
parent a1de688747741f0f07dca370c68776ec843eaffe

Minor grammer check.

Changed files

M leveldk.co.uk/tutorial-01.md before
M leveldk.co.uk/tutorial-02.md before
M leveldk.co.uk/tutorial-03.md before
M leveldk.co.uk/tutorial-04.md before
M leveldk.co.uk/tutorial-05.md before
M leveldk.co.uk/tutorial-06.md before
M leveldk.co.uk/tutorial-07.md before
M leveldk.co.uk/tutorial-08.md before
M leveldk.co.uk/tutorial-09.md before
diff --git a/leveldk.co.uk/tutorial-01.md b/leveldk.co.uk/tutorial-01.md index abfcadd..46c5887 100644 --- a/leveldk.co.uk/tutorial-01.md +++ b/leveldk.co.uk/tutorial-01.md
@@ -4,9 +4,9 @@ For the purpose of these tutorials I have used GTKRadiant 1.4
OK let's start with a few fundamentals. As mappers or level designers we are attempting to create visually interesting 3d worlds that are also fun to play in!
-It is important to be aware of some issues relating to the Q3 game engine that will impact upon your building. The 3d world is rendered as triangles (or tris) by Q3. If the number of triangles drawn at any one time starts to get very high, the game will slow down. Although more powerful computers can cope with higher tris numbers it is still advisable to try to keep tris at around 8000 at any one time. More about tris and how to control what is being rendered later. The other important point to consider at the moment is the prevention of 'leaks'. Leaks are when your world has a hole in it through to the void outside. Your level must be completely contained and sealed off from the outside otherwise you will create problems for your self later on. Good brushwork will help prevent leak spots in the first place, but GTK also has a handy feature called pointfile which can be found under the file menu. If during compile it is reported that your map has a leak you can click on pointfile. This draws a red line that shows you where the whole in the outside of the map can be found, making fixing the problem much easier.
+It is important to be aware of some issues relating to the Q3 game engine that will impact upon your building. The 3d world is rendered as triangles (or tris) by Q3. If the number of triangles drawn at any one time starts to get very high, the game will slow down. Although more powerful computers can cope with higher tris numbers it is still advisable to try to keep tris at around 8000 at any one time. More about tris and how to control what is being rendered later. The other important point to consider at the moment is the prevention of 'leaks'. Leaks are when your world has a hole in it through to the void outside. Your level must be completely contained and sealed off from the outside; otherwise, you will create problems for yourself later on. Good brushwork will help prevent leak spots in the first place, but GTK also has a handy feature called pointfile which can be found under the file menu. If during compile it is reported that your map has a leak you can click on pointfile. This draws a red line that shows you where the hole in the outside of the map can be found, making fixing the problem much easier.
-Right, let's do some building! Firstly open up the editor. Then you will need to select a texture to draw with. It is good practice to draw objects in the caulk texture. Caulk is invisible in game, but also solid so it has the effect of not adding to what Quake 3 has to draw on the screen at any one time and also preventing the inside of your world leaking through to the void outside.
+Right, let's do some building! Firstly open up the editor. Then you will need to select a texture to draw with. It is good practice to draw objects in the caulk texture. Caulk is invisible in the game, but also solid, so it has the effect of not adding to what Quake 3 has to draw on the screen at any one time, and also preventing the inside of your world leaking through to the void outside.
![selectcaulk.jpg](images/selectcaulk.jpg)
@@ -14,7 +14,7 @@ If your common texture folder doesn't have all the textures I have in mine, don'
![selectcaulkb.jpg](images/selectcaulkb.jpg)
-Now we're ready. In the 2d window, the large black one in my set up, we are going to create a 'brush'. Brushes are the blocks from which the worlds we create a made.
+Now we're ready. In the 2d window, the large black one in my setup, we are going to create a 'brush'. Brushes are the blocks from which the worlds we create are made.
You will notice the 2d window is covered in grid lines. The grid is your friend. Brushes are measured in 'units'. You can alter grid size by pressing the number keys on your keyboard. 1 equals grid size 1, 4 equals grid size 4, I'm sure you get the idea. The grid size dictates the number of units a brush is drawn out by with each move. As a general rule it's best to keep the grid size as large as possible. For the purpose of this tutorial we are going to use 4, so hit the number 4. To give an idea of scale a player in Q3 is 56 units high.
@@ -28,13 +28,13 @@ Right, let's make a first room:
Notice the blue thick grid lines? That's a block. Don't worry too much about what it's for just now but it is worth pointing out that it is good practice to keep areas aligned to blocks. You can see the blocks from the view menu. Go to view, show, show blocks.
-Draw out a brush in the top down (yx) view 1088 by 1088 units. That's going to be our floor. In the zx or zy view adjust the thickness of the floor to about 24 units.
+Draw out a brush in the top down (yx) view 1088 by 1088 units. That's going to be our floor. In the zx or zy view, adjust the thickness of the floor to about 24 units.
Now for some walls:
![drawwalls.jpg](images/drawwalls.jpg)
-In the top down view draw out a brush that fits exactly along the edge of the floor area. Make sure the brushes are right up againt each other. Use your mouse wheel or insert and delete to zoom in and out and right click and drag in the 2d window to move your work area around. This way you can inspect what you're doing very closely. In the side or front view pull up the wall brush to 192 units. Make sure the bottom edge of the wall sits against the top edge of the floor, no overlapping it at all.
+In the top down view draw out a brush that fits exactly along the edge of the floor area. Make sure the brushes are right up against each other. Use your mouse wheel or insert and delete to zoom in and out and right click and drag in the 2d window to move your work area around. This way you can inspect what you're doing very closely. In the side or front view pull up the wall brush to 192 units. Make sure the bottom edge of the wall sits against the top edge of the floor, no overlapping it at all.
With the brush selected, come back to the top down view and hit the space bar. This clones the brush. At the top of the screen there will be some buttons. Starting from the left move your mouse slowly along until you come to the one that says z axis rotate, now press that one. The selected brush will rotate 90 degrees clockwise. Place your mouse over the centre of the brush and hold the left mouse button. Now move the brush into the position shown above. Note how the corners of the wall do not overlap. Point and press shift left click at the first wall brush and then holding shift point and left click at the second. Both brushes will now be selected. Clone both, rotate as we did before and move into position.
@@ -44,17 +44,17 @@ Now for the ceiling.
In zx or zy view select the floor brush then clone it. Move it into position over the floor brush. Now we can use the handy z-window, the thin window on the left. Place your mouse pointer in the middle of the selected brush and drag upwards. Stop when the ceiling is in place. Deselect. Flip through all views to make sure everything is aligned....then we're almost done!
-As I said before the caulk texture is invisible in the game. Not a lot of point in creating a room we can't see, so the next step is to paint or texture the insides of the area. As rule of thumb, only texture what will be seen by the players in game. This way we can save valuable tris.
+As I said before, the caulk texture is invisible in the game. Not a lot of point in creating a room we can't see, so the next step is to paint or texture the insides of the area. As a rule of thumb, only texture what will be seen by the players in-game. This way we can save valuable tris.
Instead of shift and left click to select sides of a brush press Ctrl shift and left click. Often this is more easily done in the 3d window. To select multiple sides press shift Ctrl Alt and left click. You will discover you can drag your mouse across several brush faces and select them all very quickly.
![selface.jpg](images/selface.jpg)
-Having selected the face we want, lets add a texture
+Having selected the face we want, let's add a texture
![seltex.jpg](images/seltex.jpg)
-From the texture menu load up gothic_floor. Select the face of our floor brush then click on the largerblock3b4 texture. The caulk will change and the brush will now be textured. Now load the gothic_block textures and texture the inside faces with the killblock texture. Now open the skies texture folder. See how some of the textures have white borders. That means these textures have shader scripts. In game these textures will have a special effect (in this case they are skies). Select the inside face of the ceiling brush then texture it with hellskybright. A useful texturing technique is after you have textured one face use Ctrl shift middle click to apply the texture with the same alignment to other faces.
+From the texture menu load up gothic_floor. Select the face of our floor brush then click on the largerblock3b4 texture. The caulk will change and the brush will now be textured. Now load the gothic_block textures and texture the inside faces with the killblock texture. Now open the skies texture folder. See how some of the textures have white borders. That means these textures have shader scripts. In game, these textures will have a special effect (in this case they are skies). Select the inside face of the ceiling brush then texture it with hellskybright. A useful texturing technique is after you have textured one face use Ctrl shift middle click to apply the texture with the same alignment to other faces.
Nearly there!
@@ -68,7 +68,7 @@ With the start point still selected hit n.
![angle.jpg](images/angle.jpg)
-Press the 90 on the little box of squares. This rotates the starting point so that the player begins facing toward that direction. It's not really a problem in a large room but you don't want to spawn in game facing into a wall!
+Press the 90 on the little box of squares. This rotates the starting point so that the player begins facing toward that direction. It's not really a problem in a large room, but you don't want to spawn in-game facing into a wall!
Time to save the map.
diff --git a/leveldk.co.uk/tutorial-02.md b/leveldk.co.uk/tutorial-02.md index b1c0d9f..c3e7576 100644 --- a/leveldk.co.uk/tutorial-02.md +++ b/leveldk.co.uk/tutorial-02.md
@@ -1,8 +1,8 @@
# 2 point clipping, brush work and basic patch work
-To begin we will cover the basics of clipping brushes. Clipping, or cutting brushes is the primary means of shaping geometry available to the level designer and therefore is perhaps the most important tool to get to grips with.
+To begin we will cover the basics of clipping brushes. Clipping, or cutting brushes, is the primary means of shaping geometry available to the level designer and therefore is perhaps the most important tool to get to grips with.
-As with most functions in the editor it is best to keep the grid snap as high as possible, once again keeping thing neatly aligned to the grid will save a lot of frustration. Lets get underway then. As illustrated in fig.1, draw out a brush. Size here isn't really an issue.
+As with most functions in the editor, it is best to keep the grid snap as high as possible. Once again, keeping things neatly aligned to the grid will save a lot of frustration. Let's get underway then. As illustrated in fig.1, draw out a brush. Size here isn't really an issue.
![clip1.jpg](images/clip1.jpg)
@@ -22,9 +22,9 @@ Now you have 2 choices, hit x to cancel the clip or enter to accept. If you hit
*fig.3*
-Easy isn't it! You can clip through multiple brushes stacked on top of each other too. Remember though, keep thing aligned to the grid!
+Easy isn't it! You can clip through multiple brushes stacked on top of each other too. Remember though, keep things aligned to the grid!
-Lets talk about using the clipper tool for building levels tidily and for optimal performance in game. Imagine you want to build a wall with a hole through it. Well you could do it as shown in fig. 4 below
+Let's talk about using the clipper tool for building levels tidily and for optimal performance in game. Imagine you want to build a wall with a hole through it. Well you could do it as shown in fig. 4 below
![hole1.jpg](images/hole1.jpg)
@@ -54,9 +54,9 @@ We will return to the subject of t-junction errors a little later when looking a
*fig.7*
-Lets look at using curves or *patches.*
+Let's look at using curves or *patches.*
-Using curves to good effect can really make your level stand out but there are some things to be aware off. Firstly they are not solid like brushes, this means that you can't seal the world off from the void with them. If the the patch forms part of your outer wall you will need to fit  caulk brushes behind it to stop leaks (see fig.15) Use the caulk texture as it isn't drawn in game, hence eliminating over draw and any chance of z-fighting (where more than 1 texture is drawn in the same place, causing an ugly mess in game). Secondly, patches use up a lot of tris, very quickly. Having a lot of patches can cause your map to run slowly!
+Using curves effectively can really make your level stand out, but there are some things to be aware of. Firstly they are not solid like brushes, this means that you can't seal the world off from the void with them. If the the patch forms part of your outer wall you will need to fit  caulk brushes behind it to stop leaks (see fig.15) Use the caulk texture as it isn't drawn in game, hence eliminating over draw and any chance of z-fighting (where more than 1 texture is drawn in the same place, causing an ugly mess in game). Secondly, patches use up a lot of tris, very quickly. Having a lot of patches can cause your map to run slowly!
Let's begin then.
diff --git a/leveldk.co.uk/tutorial-03.md b/leveldk.co.uk/tutorial-03.md index 7c58ed7..3d8dea2 100644 --- a/leveldk.co.uk/tutorial-03.md +++ b/leveldk.co.uk/tutorial-03.md
@@ -6,39 +6,39 @@ N.B. Since the advent of the skip shader the use of the hint brush has altered s
We will now return to the simple box map we made in the first tutorial.
-Detail and structural brushes, so what exactly are they and how should we use them? Structural brushes are solid, they block vis and seal the world off from the void, detail brushes are solid in game, but as far as the compiler and game are concerned they do not block vis, nor can they seal the world off from the void. To make a brush detail, select it and press Ctrl m, to make a detail brush structural select it the press Ctrl shift s. By default all brushes are structural. Why should we worry about all this? Well, a complicated map could take a long time to compile vis. We can shorten the time it takes by making all the outer brushes that touch the void structural, and everything else that isn't needed for blocking vis into detail. If we make our rooms and corridors out of nicely rectangular structural brushes applying hint brushes is also much easier as the splits created by the hint brushes are not effected by detail brushes.
+Detail and structural brushes, so what exactly are they and how should we use them? Structural brushes are solid, they block vis and seal the world off from the void, Detail brushes are solid in-game, but as far as the compiler and game are concerned, they do not block vis, nor can they seal the world off from the void. To make a brush detail, select it and press Ctrl m, to make a detail brush structural select it the press Ctrl shift s. By default all brushes are structural. Why should we worry about all this? Well, a complicated map could take a long time to compile vis. We can shorten the time it takes by making all the outer brushes that touch the void structural, and everything else that isn't needed for blocking vis into detail. If we make our rooms and corridors out of nicely rectangular structural brushes applying hint brushes is also much easier as the splits created by the hint brushes are not effected by detail brushes.
Below are two images of the room we are going to build, one shows the geometry with detail brushes, models and patches all turned on, the second shows the room with everything but structural brushes filtered off.
-N.B. toggle details on and off Ctrl d
+N.B. Toggle details on and off: Ctrl+D
-toggle structural on and off shift Ctrl d
+Toggle structural on and off: Shift+Ctrl+D
-toggle patches on and off  Ctrl p
+Toggle patches on and off: Ctrl+P
![detail1.jpg](images/detail1.jpg)
![detail2.jpg](images/detail2.jpg)
-Remember how in the first tutorial it was stressed how brushes shouldn't over lap? Well, with detail and structural brushes we can or even must break that rule! Here is another shot of the same room with detail and structural brushes both turned on. See how the caulk structural brushes are drawn on top of the detail brushes in many places? This doesn't matter, caulk isn't drawn in game.
+Remember how in the first tutorial it was stressed how brushes shouldn't over lap? Well, with detail and structural brushes we can or even must break that rule! Here is another shot of the same room with detail and structural brushes both turned on. See how the caulk structural brushes are drawn on top of the detail brushes in many places? This doesn't matter; caulk isn't drawn in-game.
![detail3.jpg](images/detail3.jpg)
-Examine the corridor below. The complex shape is all detail brushes. Buried in the walls and floor are simplified caulk structural brushes brushes. Vis only considers the simplified brushes. Because the caulk brushes are never drawn it is not necessary to worry about t-junction errors either. Structural brushes made from caulk can be slapped down quickly. Only the detail brushes with textured  faces, or structural brushes with textured faces need to be optimised in the way discussed in tutorial 2.
+Examine the corridor below. The complex shape is all detail brushes. Buried in the walls and floor are simplified caulk structural brushes. Vis only considers the simplified brushes. Because the caulk brushes are never drawn, it is not necessary to worry about t-junction errors either. Structural brushes made from caulk can be slapped down quickly. Only the detail brushes with textured faces, or structural brushes with textured faces, need to be optimised in the way discussed in tutorial 2.
![detail4.jpg](images/detail4.jpg)
![detail5.jpg](images/detail5.jpg)
-It is important that the caulk brushes do not stick out into the world, if they do and can be seen in game they may create visual distortion.
+It is important that the caulk brushes do not stick out into the world. If they do and can be seen in-game, they may create visual distortion.
-Having talked about *how* we are going to build now lets talk about *what.* The next stage in the building of our map is to come up with a layout. Deciding a layout depends on many things. In this case theme will not be an issue. In order to make the process as straight forward as possible I'm going for standard id Gothic, although later we will be using some custom textures and shaders. There are certain factors in layout we can not ignore. The level must be built with vis blocking in mind from the out set. The scale must be correct, average corridors would be 192 units in height and width. Let the texture sets be your guide, wall top and bottom trims are 32 or 64 units high, wall textures are 128 units high. The level must be playable for humans *and* bots. The level must be appealing and attractive whilst running smoothly and fun to play. Leading on from fun to play, there must be a high degree of connectivity between areas, with out losing control of vis. The classic Death Match level forms a closed circuit, whilst a CTF map consists of 2 normally identical bases with all routes in and out leading through a central 'choke point'.
+Having discussed *how* we are going to build, let's talk about *what*. The next stage in building our map is coming up with a layout. Deciding a layout depends on many things. In this case theme will not be an issue. To make the process as straightforward as possible, I'm going for standard id Gothic, although later we will be using some custom textures and shaders. There are certain factors in layout we cannot ignore. The level must be built with vis blocking in mind from the outset. The scale must be correct; average corridors would be 192 units in height and width. Let the texture sets be your guide: wall top and bottom trims are 32 or 64 units high, wall textures are 128 units high. The level must be playable for humans *and* bots. The level must be appealing and attractive, whilst running smoothly and being fun to play. Leading on from fun to play, there must be a high degree of connectivity between areas without losing control of vis. The classic Death Match level forms a closed circuit, whilst a CTF map consists of 2 normally identical bases with all routes in and out leading through a central 'choke point'.
-The brief for this level was to design a Death Match level that could easily be turned into a CTF map later. Hmmm. Not exactly mutually compatible, but lets get started!
+The brief for this level was to design a Death Match level that could easily be turned into a CTF map later. Hmm. Not exactly mutually compatible, but let's get started!
To avoid problems later on it is vital to rough out a layout first. This is normally textured, roughly lit and items placed. Then the level is compiled and played. This is known as an alpha build. Problems can be identified and corrected before details have been added and fiddly brush work begun. This is what we are going to do next.
-Lets get to it then! The following are some in game shots from the alpha build. Fig.1 is the room we created in the first tutorial with some slight alteration that we can come to in a moment.
+Let's get to it then! The following are some in-game shots from the alpha build. Fig.1 is the room we created in the first tutorial with some slight alterations that we can discuss in a moment.
![alpha6.jpg](images/alpha6.jpg)
@@ -95,7 +95,7 @@ To alpha layout is included in the sample map .pk3, along with all the custom me
If you open the map file and have a look around you will see many diamond shaped objects floating around in the air. These are point light ents (short for entities). Light ents act as sources of light. In Q3 light can be emitted from surfaces, such as skies, flames or textured brushes through the use of shader scripts (more on that later). The alternative method of  applying light to your level is through light ents. Perhaps *alternative* is the wrong word as in fact in nearly all cases levels are lit with a mix of shader based lighting and light ents. We have already used the entity menu in order to place an info_player_deathmatch in the level. Right click in the 2d window to bring up the entity menu once again. Scroll down to Light and select. A new light ent will appear along with a little box asking you to enter a value. As a rule of thumb lower values tend to be better in enclosed spaces, by lower I mean anything from 10 to 100. Higher numbers are fine but be careful. If lights are too bright textures become washed out and ugly, also if you place lights too close to walls, ceiling or floors this can result in spotting, where an obvious 'pool' of light appears with no apparent source. The value of lights can be adjusted at a latter date by selecting the ent and pressing n to bring up the entity editing window. In the main window look for the word (or *key*) *'light'*. To the right of *light* is a number value. Click on light and you will see the word light appear in the key text box and a number value appears in the value text box. Change the number and enter. GTK 1.4 shows the radius of emitted lights when a light ent is selected. This is quite a useful new tool, although not on a par with the real time lighting of Doom 3 in GTK 1.5. To change the colour of light emitted from a light ent, select it and press k. A colour chart will appear. Click on the colour you want and then OK. The ent should have changed colour. A word of warning, strong, highly coloured lighting looks terrible. Use coloured lights with care, to emphasis light emitted from flame for example, but let *subtlety* be your guide.
-The other points of interest in the alpha build are jump pads, teleporter and the pits of death. Lets look at each in turn.
+The other points of interest in the alpha build are jump pads, teleporters, and the pits of death. Let's look at each in turn.
Firstly Jump Pads. In order to move from a lower level to a higher level quickly in Q3A jump pads are often used instead of stairs. To make a jump pad a trigger is needed to push the player into the air and a target is needed to indicate the direction of the push. Fig.7 shows the trigger. Select the common texture folder, then click on the yellow and white trigger texture. Draw out a brush from the trigger texture that sits on and above the floor, then with the brush still selected drop the entity menu (right click in the 2d window). Scroll down to trigger, then select trigger_push. Deselect. Your brush is now a trigger_push entity. The jump pad now requires a target. Some where in the 2d window, with nothing selected right click above the trigger brush. Scroll down to target and select target_position. Oddly enough, don't use target_push. This entity will still work, but will cause the game to look for a missing sound file. The green cube shown selected in fig.8 should now appear.
@@ -151,7 +151,7 @@ Finally, we need to ensure items don't get left at the bottom of the pit (or spa
*fig.15*
-Lets talk about the changes I've made our original room(fig.16 and figs 1 and 2)
+Let's discuss the changes I've made to our original room (fig.16 and figs 1 and 2)
![oldroom.jpg](images/oldroom.jpg)
@@ -165,7 +165,7 @@ Placing items is something of an art. More powerful items should be placed in su
Our sample map lacks in the layout department. This design fault is intentional as the level needs to be simple, and because of the requirement to be able to convert it to a CTF level fairly easily. Time to move on then!
-Lets start to add some architecture!
+Let's start adding some architecture!
![arch3.jpg](images/arch3.jpg)
@@ -195,7 +195,7 @@ Flat walls are boring. Try to avoid large flat areas, where textures obviously r
Figure 21 above shows how the wall sections can be fitted at the corners. Joints should be mitred to ensure the best results. You can select a group of brushes and clip across them all to ensure uniform cuts. Keep the grid as high as possible to minimise imprecise cutting. Note: if you make a wrong cut, Ctrl and z undoes the action. Some other important clipping shortcuts are Shift and Enter which reverses the cut selection and Ctrl and Enter which selects both sides of the cut.
-Figures 22 and 23 below show how verts should line up between the curved patch that makes the arch and the surrounding brush work. Remember brushes should meet at corners and vertices of patches should meet the vertices of the brushes they touch, otherwise 'sparklies', or t-junction errors will occur in game.
+Figures 22 and 23 below show how verts should line up between the curved patch that makes the arch and the surrounding brush work. Remember vertices of patches should meet the vertices of the brushes they touch; otherwise, 'sparklies' or t-junction errors will occur in-game.
![patchverts.jpg](images/patchverts.jpg)
@@ -215,7 +215,7 @@ Figure 24 below shows how a concentric trim has been added to the bevel cap. Tri
*fig.25*
-Sometimes when you add patch trims even though vertices align perfectly in the editor, in game holes or tears appear when the geometry is rendered. These are known as LOD (Level of Detail) cracks. These errors are caused by the Q3 code itself in the way it calculates the drawing of curves. Small LOD cracks can be stitched by the game, but some will be quite visible. Luckily there is a solution. Through the use of Ydnar's mighty Q3map2 it is possible to convert compiled .map files into .ase model files. As models are rendered differently by Q3, they do not suffer LOD cracking. Fig.26 and Fig.27 show 2 areas where .ase models have been used to solve this problem. Fig.26 shows an endcap with patch mesh trim that cracked, Fig.27 shows a group of vertex edited square cylinders that also exhibited this problem. I should point out that using square cylinders can be expensive in tris. Often other geometry gets embedded inside part of a cylinder or square cylinder, wasting tris. Z-fighting will tend not to occur in game as the player can not see inside the cylinders. Using 4 (or more or less) patch meshes to do the same job as a square cylinder would be much less wasteful in valuable tris, as the patches could be edited so that  no overdraw occurs. In certain places I would choose a square cylinder over patches as in spite of their problems when drawn in game they have a lovely smooth and rounded appearance to their edges, which patches do not have.
+Sometimes when you add patch trims, even though vertices align perfectly in the editor, in-game holes or tears appear when the geometry is rendered. These are known as LOD (Level of Detail) cracks. These errors are caused by the Q3 code itself in the way it calculates the drawing of curves. Small LOD cracks can be stitched by the game, but some will be quite visible. Luckily there is a solution. Through the use of Ydnar's mighty Q3map2 it is possible to convert compiled .map files into .ase model files. As models are rendered differently by Q3, they do not suffer LOD cracking. Fig.26 and Fig.27 show 2 areas where .ase models have been used to solve this problem. Fig.26 shows an endcap with patch mesh trim that cracked, Fig.27 shows a group of vertex edited square cylinders that also exhibited this problem. I should point out that using square cylinders can be expensive in tris. Often other geometry gets embedded inside part of a cylinder or square cylinder, wasting tris. Z-fighting will tend not to occur in-game, as the player cannot see inside the cylinders. Using 4 (or more or less) patch meshes to do the same job as a square cylinder would be much less wasteful in valuable tris, as the patches could be edited so that  no overdraw occurs. In certain places I would choose a square cylinder over patches, as in spite of their problems when drawn in-game, they have a lovely smooth and rounded appearance to their edges, which patches do not have.
![ase1.jpg](images/ase1.jpg)
diff --git a/leveldk.co.uk/tutorial-04.md b/leveldk.co.uk/tutorial-04.md index 78e99af..f298a01 100644 --- a/leveldk.co.uk/tutorial-04.md +++ b/leveldk.co.uk/tutorial-04.md
@@ -1,6 +1,6 @@
# More patch manipulation, Lighting tips, Stairs and Ramps
-In previous tutorials we have covered basic patch manipulation and touched on more advanced techniques. In this section we will look at more approaches to using patches. The merits and draw backs to using square cylinders (draw out a brush, with it highlighted, drop the curve menu, select *more cylinders*, then *square cylinder*) have been discussed previously. In fig.1 a square cylinder is being used to create a flying buttress style of support. A brush has been clipped at an angle to form the top of the buttress. The brush is a few units wider than the square cylinder we are going to manipulate. Create a square cylinder  and rotate using the tool bar buttons and move into roughly the correct position. Engage vertex mode (press v). Click on the verts (or drag a selcction box and select a groups of verts) you want to move and manipulate the cylinder into the position shown below. Make sure the cylinder is a little narrower than the support it ends in and the brush forming the top of the buttress. Don't worry about the cylinder entering the brush, that will not be seen in game. Press shift s to bring up the patch texturing inspector and hit natural to align the texture. Heavily manipulated patches can warp detailed textures, so it is generally better to keep the textures you select for your patches fairly simple.
+In previous tutorials we have covered basic patch manipulation and touched on more advanced techniques. In this section we will look at more approaches to using patches. The merits and draw backs to using square cylinders (draw out a brush, with it highlighted, drop the curve menu, select *more cylinders*, then *square cylinder*) have been discussed previously. In fig.1 a square cylinder is being used to create a flying buttress style of support. A brush has been clipped at an angle to form the top of the buttress. The brush is a few units wider than the square cylinder we are going to manipulate. Create a square cylinder  and rotate using the tool bar buttons and move into roughly the correct position. Engage vertex mode (press v). Click on the verts (or drag a selection box and select a group of verts) you want to move, and manipulate the cylinder into the position shown below. Make sure the cylinder is a little narrower than the support it ends in and the brush forming the top of the buttress. Don't worry about the cylinder entering the brush; that will not be seen in-game. Press shift s to bring up the patch texturing inspector and hit natural to align the texture. Heavily manipulated patches can warp detailed textures, so it is generally better to keep the textures you select for your patches fairly simple.
![patchsquarec.jpg](images/patchsquarec.jpg)
@@ -20,7 +20,7 @@ Let's get more adventurous. We are going to create a hole. We could simply cut a
*fig.4*
-In several places around the level you may have noticed sharp, dramatic shadows being cast upon the surrounding geometry. Unlike newer games, Q3 has a static lightmap. Shadows are not cast in real time, they are pre-calculated during the compile of the level. If you run a level in devmap mode (type `/devmap` *mymapname*) then type `/r_lightmap` 1 at the console, you will see the level's lightmap. The geometry, apart from non-lightmapped shaders, will be white, with the shadows, light and colour burnt into it clearly visible. `/r_lightmap` 0 returns the map to normal. This lightmap is rendered onto the textures you apply to your geometry, so in a way, all textures in Q3 are blended shaders. Just because Q3 doesn't have dynamic (real time) lighting (how to fake dynamic lighting is covered later in this tutorial), doesn't mean that it can not rival the newest games in terms of realism and beauty. So how can sharp shadows be cast? The key is the use and positioning of your light sources, whether that be, shader or entity in origin. Try to shine light through interestingly shaped geometry, where it can be cast on to an appropriate surface. In fig.5 the area under the central archway is shown. I have placed a light ent inside the little lamp brush model I made, so that light is cast through the lamp, falling onto the curved arch ceiling. If you were to compile the map with the arrangement I described, the result would be disappointing. No crisp, clear shadows would be present. So how is it done? The final thing to do is to increase the resolution of the affected geometry's lightmap. Select the geometry, drop the entity menu. First select ungroup entity if patch groups are chosen, the select func_group. Bring up the entity editing window (press n) then add the key _lightmapscale, and a value less than 1. 0.125 is very Hi Res. Be aware that many Hi Res lightmaps will bump up the size of your .bsp considerably.
+In several places around the level you may have noticed sharp, dramatic shadows being cast upon the surrounding geometry. Unlike newer games, Q3 has a static lightmap. Shadows are not cast in real time, they are pre-calculated during the compile of the level. If you run a level in devmap mode (type `/devmap` *mymapname*) then type `/r_lightmap` 1 at the console, you will see the level's lightmap. The geometry, apart from non-lightmapped shaders, will be white, with the shadows, light and colour burnt into it clearly visible. `/r_lightmap` 0 returns the map to normal. This lightmap is rendered onto the textures you apply to your geometry, so in a way, all textures in Q3 are blended shaders. Just because Q3 doesn't have dynamic (real-time) lighting (how to fake dynamic lighting is covered later in this tutorial) doesn't mean that it cannot rival the newest games in terms of realism and beauty. So how can sharp shadows be cast? The key is the use and positioning of your light sources, whether that be, shader or entity in origin. Try to shine light through interestingly shaped geometry, where it can be cast on to an appropriate surface. In fig.5 the area under the central archway is shown. I have placed a light ent inside the little lamp brush model I made, so that light is cast through the lamp, falling onto the curved arch ceiling. If you were to compile the map with the arrangement I described, the result would be disappointing. No crisp, clear shadows would be present. So how is it done? The final thing to do is to increase the resolution of the affected geometry's lightmap. Select the geometry, drop the entity menu. First select ungroup entity if patch groups are chosen, the select func_group. Bring up the entity editing window (press n) then add the key _lightmapscale, and a value less than 1. 0.125 is very Hi Res. Be aware that many Hi Res lightmaps will bump up the size of your .bsp considerably.
![shadow.jpg](images/shadow.jpg)
@@ -28,13 +28,13 @@ In several places around the level you may have noticed sharp, dramatic shadows
A final word on shadows. Q3 isn't that good at rendering curved shadows or angled shadows. You can end up with ugly jagged shadows if the light is emitted from or hits geometry at certain angles. Changing light sources can help, also making affected geometry into func_group entities and assigning keys of _rc or _cs and a value of 0 is a useful trick. The _rc key prevents shadows being cast on to geometry, and _cs prevents it from casting shadows.
-Let's return to more advanced patch work. In the base area ceiling I have constructed a dome with a patch of sky visible at the top (fig.6). It is those little details that perhaps most players wont even notice that set the look and feel of a level. Interesting ceiling work, just as interesting floor details are what sets a map apart from the crowd. So how is the dome created? Select your texture. It is important that texture is not detailed or busy, as some distortion is unavoidable.
+Let's return to more advanced patch work. In the base area ceiling I have constructed a dome with a patch of sky visible at the top (fig.6). It is those little details that perhaps most players won't even notice that set the look and feel of a level. Interesting ceiling work, just as interesting floor details are what sets a map apart from the crowd. So how is the dome created? Select your texture. It is important that texture is not detailed or busy, as some distortion is unavoidable.
![dome1.jpg](images/dome1.jpg)
*fig.6*
-We are going to make a quarter of the dome at a time. Firstly create a bevel. Then naturalise the texture (fig.7). The dimensions of the bevel don't really matter. The important point is to keep things square. In the sample map the quarter section of the edited dome bevel is 184 units wide and long, and 104 units high. It's best to align textures now, as naturalising heavily vertex edited patches can really mess things up. Now bring up vertex edit mode.
+We are going to make a quarter of the dome at a time. Firstly create a bevel. Then naturalise the texture (fig.7). The dimensions of the bevel don't really matter. The important point is to keep things square. In the sample map, the quarter section of the edited dome bevel is 184 units wide and long, and 104 units high. It's best to align textures now, as naturalising heavily vertex edited patches can really mess things up. Now bring up vertex edit mode.
![dome2.jpg](images/dome2.jpg)
@@ -52,7 +52,7 @@ Next create a simple patch mesh textured in a contrasting texture. This can be v
*fig.9*
-Nearly there. Now lets create a square cylinder, arrange it in such away that it sits with the top edge of our dome section halfway through it. Then vertex edit the cylinder to fit around the top of the bevel, as shown in fig.10 below. Naturalise the texture on the cylinder.
+Nearly there. Now let's create a square cylinder, arrange it in such a way that it sits with the top edge of our dome section halfway through it. Then vertex edit the cylinder to fit around the top of the bevel, as shown in fig.10 below. Naturalise the texture on the cylinder.
![dome5.jpg](images/dome5.jpg)
diff --git a/leveldk.co.uk/tutorial-05.md b/leveldk.co.uk/tutorial-05.md index 3f32a9d..02d1008 100644 --- a/leveldk.co.uk/tutorial-05.md +++ b/leveldk.co.uk/tutorial-05.md
@@ -1,6 +1,6 @@
# Stuff with holes in...using nodraw
-As discussed in a previous section of these tutorials, Q3 uses shader scripts to create special effects with textures. In very simple terms textures are blended together or manipulated in some way to create the required results. The Q3 Shader Manual offers the definitive guide to writing shaders, and in a later section of this series we will cover how to add your own custom shaders and textures to maps. Sometimes using a shader to achieve an effect is far easier than creating complicated brushwork. One of the best examples of this is grates or fences. Examine fig.1 below. Shaders are identified in GTK by a white border around the texture and [] around the texture name. Remember the image in the editor is only a representation as far as shaders are concerned. The grate shader used below looks solid in the editor, only in game are the transparent parts visible. Because of this it is necessary to have some idea of what each shader does before you can use them.
+As discussed in a previous section of these tutorials, Q3 uses shader scripts to create special effects with textures. In very simple terms textures are blended together or manipulated in some way to create the required results. The Q3 Shader Manual offers the definitive guide to writing shaders, and in a later section of this series we will cover how to add your own custom shaders and textures to maps. Sometimes using a shader to achieve an effect is far easier than creating complicated brushwork. One of the best examples of this is grates or fences. Examine fig.1 below. Shaders are identified in GTK by a white border around the texture and [] around the texture name. Remember the image in the editor is only a representation as far as shaders are concerned. The grate shader used below looks solid in the editor, but in-game the transparent parts are visible. Because of this it is necessary to have some idea of what each shader does before you can use them.
![holes1.jpg](images/holes1.jpg)
@@ -36,7 +36,7 @@ Just a mention about the lava placed in the floor trench under the grate (fig.5)
Sometimes you may feel it necessary to use your own, or somebody else's textures or shaders in your levels, rather than re-using the standard id texture sets. In order to create the rocky terrain included in the sample map, it is necessary to add new shaders and textures to our collection. Creating textures and shaders is a separate series of tutorials in itself and will not be covered here, but rather how to get your custom content into the game. If you use somebody else's artwork you must remember to give credit in the final build of your .pk3 (how to create a .pk3 is covered later). As individual custom content is not available to all Q3 players, it is necessary to include those files for distribution with your map. A level with a high amount of new textures and shaders can quickly increase the final file size of your .pk3. Balancing the size of your final file with the quest for an original look is something most mappers have to do. One of the most often made mistakes by new mappers is to fail to include custom material. Missing textures in game are rendered as black and white squares.
-So how is it possible to get new textures into Q3? Quite simply, locate the texture folder under the baseq3 folder. Into the texture folder place a new folder. It is good practice to name the folder *mymapname*, where *mymapname* is the name of your level. Into this you place the textures you want to use in the level. The exact details concerning Q3 textures will not be discussed here, other than to state that they must be either .jpg or .tga. By placing all your textures in one folder, you make it less likely that something will be missed out of the .pk3. Inevitably textures are drawn from several folders, but it helps to be organised.
+So how is it possible to get new textures into Q3? Quite simply, locate the texture folder under the baseq3 folder. In the texture folder, place a new folder. It is good practice to name the folder *mymapname*, where *mymapname* is the name of your level. Into this you place the textures you want to use in the level. The exact details concerning Q3 textures will not be discussed here, other than to state that they must be either .jpg or .tga. By placing all your textures in one folder, you make it less likely that something will be missed out of the .pk3. Inevitably textures are drawn from several folders, but it helps to be organised.
New shaders are added to the scripts folder, which can also be located in the baseq3 folder. A shader is a .txt file, renamed so that the file extension reads .*shader* rather than .*txt.* A word of caution about shaders: Do not edit existing shader files, by doing this you will mess things up. If you want to tinker with a shader script, copy and paste it into a new file, and rename it. In order for the new shader to be found by GTK you need to look for a file called *`shaderlist.txt`* in the scripts folder. Open this file and add the name of your shader to the end of it (with out the .*shader* extension), then save the file.
diff --git a/leveldk.co.uk/tutorial-06.md b/leveldk.co.uk/tutorial-06.md index 301be2c..6a62bf5 100644 --- a/leveldk.co.uk/tutorial-06.md +++ b/leveldk.co.uk/tutorial-06.md
@@ -2,11 +2,11 @@
In a previous section using light entities has been discussed. Light can be emitted from entities or from surfaces textured in certain shaders, such as sky, lights, or some lava or fog.
-In order to avoid ugly 'spotting', where strange pools of light appear, do not place light ents too close to geometry. More light ents, with lower light values, generally give better results than single entities with high values. Try to use a sky that suits the look and feel of your level. Experiment with different skies to try to find the correct brightness and sun angle, choose a texture that gives you the required brightness and the most interesting shadows.
+In order to avoid ugly 'spotting', where strange pools of light appear, do not place light ents too close to geometry. More light ents with lower light values generally give better results than single entities with high values. Try to use a sky that suits the look and feel of your level. Experiment with different skies to try to find the correct brightness and sun angle, choose a texture that gives you the required brightness and the most interesting shadows.
Newer games, such as Doom 3, have real time or dynamic lighting. Lights flicker on and off and cast moving shadows that resemble those in the real world. This is not possible in Quake 3, but the remarkable Q3map2 does give us the option of 'faking' dynamic lighting through shader trickery.
-Although the images in fig.1 and 2 can not depict dynamic lighting in a still picture, both these areas use this technique. The flaming torches would emit a flickering light, so it seems reasonable to try to recreate that effect. Be careful in the use of dynamic lighting, as with all shaders, over use impacts upon performance in terms of a loss of frame rate. Also, any one surface must not receive light from any more than 4 dynamic light sources.
+Although the images in fig.1 and 2 can not depict dynamic lighting in a still picture, both these areas use this technique. The flaming torches would emit a flickering light, so it seems reasonable to try to recreate that effect. Be careful in the use of dynamic lighting, as with all shaders, overuse impacts performance in terms of a loss of frame rate. Also, any one surface must not receive light from any more than 4 dynamic light sources.
So how is it done?
@@ -18,15 +18,15 @@ So how is it done?
*fig.2*
-A light ent is created or selected in the normal way. Bring up the entity editing window and add the key *_style* and then a value of your choice, normally somewhere between 1 and 12, in this case 10 was selected, see fig.3 below. Some experimentation is required to achieve the look that is required.
+A light ent is created or selected in the normal way. Bring up the entity editing window and add the key *_style*, then a value of your choice (normally somewhere between 1 and 12; in this case, 10 was selected), as shown in fig.3 below. Some experimentation is required to achieve the look that is required.
![light3.jpg](images/light3.jpg)
*fig.3*
-Fairly simple so far? Things get a little more complicated now. When the map is compiled Q3map2 generates a custom shader and texture folder, used in game to achieve the flickering light and shadow effects. The texture folder, which will have the same name as the map, is placed automatically in the maps folder and the shader, named *`q3map2_mymapname.shader`*, is placed in the scripts folder. Both the texture folder and the shader must be included in the .pk3 for distribution, just like other custom map content. Each time the level is compiled the texture folder and shader are updated, so be careful to include the current versions of the textures and shader with the .bsp (the compiled map).
+Fairly simple so far? Things get a little more complicated now. When the map is compiled, Q3map2 generates a custom shader and texture folder used in-game to achieve the flickering light and shadow effects. The texture folder, which will have the same name as the map, is placed automatically in the maps folder and the shader, named *`q3map2_mymapname.shader`*, is placed in the scripts folder. Both the texture folder and the shader must be included in the .pk3 for distribution, just like other custom map content. Each time the level is compiled the texture folder and shader are updated, so be careful to include the current versions of the textures and shader with the .bsp (the compiled map).
-Sometimes it may be necessary or desirable to have the light source some distance from the area where you require the light to fall. This 'spot light' effect can be achieved by targeting a light entity at a target_position or an info_null entity (fig.4). Create the light ent, then create the info_null (under *info*, in the entity menu). Select the light, then the info_null, next press Ctrl k to connect the entities. Unfortunately GTK can not show lighting effect in real time, so it is necessary to compile the map in order to observe the effect you have created. Sometimes it may take 3 or 4 attempts to achieve the result you want, adjusting the strength of the light source and the distance and angle from the info_null.
+Sometimes it may be necessary or desirable to have the light source some distance from the area where you require the light to fall. This 'spot light' effect can be achieved by targeting a light entity at a target_position or an info_null entity (fig.4). Create the light ent, then create the info_null (under *info*, in the entity menu). Select the light, then the info_null, next press Ctrl k to connect the entities. Unfortunately, GTK cannot show lighting effects in real-time, so it is necessary to compile the map in order to observe the effect you have created. Sometimes it may take 3 or 4 attempts to achieve the result you want, adjusting the strength of the light source and the distance and angle from the info_null.
![null.jpg](images/null.jpg)
@@ -42,7 +42,7 @@ To smooth passage through the level, playerclip is used extensively, encasing ar
*fig.1*
-A good test for where to apply clip brushes is to compile the level as a test, and run around the walls in the map. If you become snagged at any point, that area requires smoothing out with the clip brush. It is perfectly fine to overlap clip brushes. They are not visible in game, so optimising clips in the same way that is required for rendered surfaces is not necessary. In fact, the more simplified clip brushes are kept, the better, in most cases.
+A good test for where to apply clip brushes is to compile the level as a test, and run around the walls in the map. If you become snagged at any point, that area requires smoothing out with the clip brush. It is perfectly fine to overlap clip brushes. They are not visible in-game, so optimising clips in the same way that is required for rendered surfaces is not necessary. In fact, the more simplified clip brushes are kept, the better, in most cases.
![clip2.jpg](images/clip2.jpg)
@@ -50,7 +50,7 @@ A good test for where to apply clip brushes is to compile the level as a test, a
Watch the bots play the level. Examine areas they have trouble with, and add common/botdonotenter  brushes (tells bots not to enter a particular area) or more botclip. Bots tended to get stuck to the right of the little flight of steps shown in fig.3. A simple remedy for this was to place a triangular shaped clip brush next to the stairs, so that as the bots exit the top of the spiral stairs, they are funnelled round to the front of the troublesome stairs.
-Often bots will not act in what would seem like a logical manner at all. Some areas may not be visited or certain jump pads ignored. The solution is tweaking, tweaking and more tweaking (fig.6). Bots do not like to use jump pads where 'air control' is required. Step onto the trigger and see where you end up. The jump pad should place you neatly at your target level, if you need to move in the air, bots will struggle, or ignore the jump pad. If the path connecting the trigger to it's target passes through any solid geometry, this also can cause bots to reject the jump pad. Try adjusting the size of the trigger brush, this can also influence whether or not bots will use the pad. Sometimes bots will refuse to visit a certain area. This can be a result of small clusters, more about that later. Ensure the ignored area is clipped and smoothed, so there is nothing that might be confusing the bots. The items you place in a map will encourage bots to circulate, just as real players. Try to scatter items, like a paper trail, for the bots to follow. Apart from at jump or launch pads, bots will not go for suspended items. Having an understanding of individual bot behaviour can be helpful. One particular bot may handle certain aspects of a map better than others, but this is largely a case of trial and error. Knowing bot preferences for weapons or items is a definate help. Placing a Super Shot Gun in an area in a map where Bones is included as a bot, will almost certainly encourage at least one bot to visit that area! If, despite your best efforts, bots still refuse to enter an area, or use a corridor, try inserting an item_botroam or two (fig.7). Item_botroams are bot only entities, they can be given a key of*weight*, and a numerical value. The higher the value of the key set, the more the attraction to the bot. Much care is needed when using botroams. Play can very easily become unbalanced if you set the value too high, or not alter in the slightest, if you set it too low. Unfortunately item_botroam entities are always on, there is no respawn time after a bot has collected them, this can cause constant revisiting of the entity's location. Placing an item_botroam on a jump pad trigger sometimes causes bot to repeatedly bounce up and down like they were on a trampoline. Setting a high value to begin with is generally the best approach, start with 400. Much recompiling will be required, but then adjust the value until bots act reasonably sensibly. Try to use item_botroams as a last resort, if all else fails, rather than as a first course of action.
+Often bots will not act in what would seem like a logical manner at all. Some areas may not be visited or certain jump pads ignored. The solution is tweaking, tweaking and more tweaking (fig.6). Bots do not like to use jump pads where 'air control' is required. Step onto the trigger and see where you end up. The jump pad should place you neatly at your target level, if you need to move in the air, bots will struggle, or ignore the jump pad. If the path connecting the trigger to it's target passes through any solid geometry, this also can cause bots to reject the jump pad. Try adjusting the size of the trigger brush, this can also influence whether or not bots will use the pad. Sometimes bots will refuse to visit a certain area. This can be a result of small clusters, more about that later. Ensure the ignored area is clipped and smoothed, so there is nothing that might be confusing the bots. The items you place in a map will encourage bots to circulate, just as real players. Try to scatter items, like a paper trail, for the bots to follow. Apart from at jump or launch pads, bots will not go for suspended items. Having an understanding of individual bot behaviour can be helpful. One particular bot may handle certain aspects of a map better than others, but this is largely a case of trial and error. Knowing bot preferences for weapons or items is a definite help. Placing a Super Shot Gun in an area in a map where Bones is included as a bot, will almost certainly encourage at least one bot to visit that area! If, despite your best efforts, bots still refuse to enter an area, or use a corridor, try inserting an item_botroam or two (fig.7). Item_botroams are bot only entities, they can be given a key of*weight*, and a numerical value. The higher the value of the key set, the more the attraction to the bot. Much care is needed when using botroams. Play can very easily become unbalanced if you set the value too high, or not alter in the slightest, if you set it too low. Unfortunately item_botroam entities are always on, there is no respawn time after a bot has collected them, this can cause constant revisiting of the entity's location. Placing an item_botroam on a jump pad trigger sometimes causes bot to repeatedly bounce up and down like they were on a trampoline. Setting a high value to begin with is generally the best approach, start with 400. Much recompiling will be required, but then adjust the value until bots act reasonably sensibly. Try to use item_botroams as a last resort, if all else fails, rather than as a first course of action.
![clip3.jpg](images/clip3.jpg)
@@ -60,7 +60,7 @@ Occasionally very small clusters are formed by the .bspc. These can confuse bots
1. Place a large clusterportal brush, or several touching clusterportal brushes inside the region you want to eliminate the cluster. This can sometimes confuse the .bspc and force it to incorporate the area into another larger cluster.
-2. Use a targeted entity to connect the clusters. If you don't require the entity for game play reasons, then place it in such away as players and bots can not get to it.
+2. Use a targeted entity to connect the clusters. If you don't require the entity for gameplay reasons, then place it in such a way that players and bots cannot get to it.
![cluster.jpg](images/cluster.jpg)
@@ -82,7 +82,7 @@ Finally, remember that optimising the level for bots takes time and practice. Yo
## Tweaking vis control
-Although fairly highly detailed, the sample maps have been built with vis blocking in mind. The main areas are separated by solid vis blocking structures to prevent too much of the entire level being drawn at any one time. In a previous tutorial problems resulting from the 'sky bug' were discussed. If more than one area occurs in the same vis leaf node, it is possible to observe partially rendered geometry from one region through the sky brushes of another. Building with this in mind it should be possible to prevent this from happening, however a small error was made and it was possible to see part of the base area roof from the centre area. Although annoying at the time, it is useful to discuss the solution here as it directly effects vis control. Firstly, however, let us take a look at hint brushes, the reasons we need them in the sample map, and where they are placed.
+Although fairly highly detailed, the sample maps have been built with vis blocking in mind. The main areas are separated by solid vis blocking structures to prevent too much of the entire level being drawn at any one time. In a previous tutorial problems resulting from the 'sky bug' were discussed. If more than one area occurs in the same vis leaf node, it is possible to observe partially rendered geometry from one region through the sky brushes of another. Building with this in mind it should be possible to prevent this from happening, however a small error was made and it was possible to see part of the base area roof from the centre area. Although annoying at the time, it is useful to discuss the solution here as it directly affects vis control. Firstly, however, let us take a look at hint brushes, the reasons we need them in the sample map, and where they are placed.
There are 3 important console commands to use in the relation to vis control. In each case the level must be loaded in */devmap* mode. Type a 1 after the command to toggle on, and the command again followed by 0 to toggle off. The console commands are:
@@ -98,7 +98,7 @@ These commands are essential for deciding where vis control requires a little tw
*fig.1*
-Having identified a problem with vis, how can the situation be improved? If you have read Bill Brook's article then you will already know the answer. We are going to use the hint texture to create artificial splits in the bsp tree. Brushes textured in the hint texture are structural, but invisible and non-solid. A common misconception is that hint brushes block vis themselves. This is incorrect. The job they do is to manipulate the vis calculation process by creating portals that otherwise would not exist. Where the vis process calculates that 2 portals can not see each other, culling will occur in game. This is a simple theory, yet sometimes much harder in practice to achieve. Fig.2 below shows the corridor that needs attention. All the detail brushes are filtered out as they have no effect upon vis. In the 2d window, examine the 2 selected brushes, marked A and B. The faces of the 2 brushes are cut on EXACTLY the same angle and meet at the corner of the corridor where it is intersected by a wall. Both brushes are made out of the common/skip texture, with only the angled faces textured in the common/hint texture. Common/skip is the one advance not covered by Bill Brook's tutorial. Skip informs the compiler to ignore any part of the brush that is textured by it. In this way only the faces textured as hint will cause portals avoiding unnecessary portal creation, as would happen with the original method. The down side of using common/skip is that only GTK 1.5 will filter skip/hint brushes out when you try to filter hint brushes from the map. Renaming the skip shader *hint_skip*, is one way around this. As both skip and hint are compiler only shaders this will cause no problems with missing textures in game. If the angled faces of the 2 hint brushes are not on the EXACT same angle their effect will be lost. Both brushes must end right up against other structural brushes, and they must meet right at the corner of the corridor. The compiler will calculate that the portal created by brush A could not see the portal created by brush B, and vice versa, therefore culling the map beyond.
+Having identified a problem with vis, how can the situation be improved? If you have read Bill Brook's article then you will already know the answer. We are going to use the hint texture to create artificial splits in the bsp tree. Brushes textured in the hint texture are structural, but invisible and non-solid. A common misconception is that hint brushes block vis themselves. This is incorrect. The job they do is to manipulate the vis calculation process by creating portals that otherwise would not exist. Where the vis process calculates that 2 portals cannot see each other, culling will occur in-game. This is a simple theory, yet sometimes much harder in practice to achieve. Fig.2 below shows the corridor that needs attention. All the detail brushes are filtered out as they have no effect upon vis. In the 2d window, examine the 2 selected brushes, marked A and B. The faces of the 2 brushes are cut on EXACTLY the same angle and meet at the corner of the corridor where it is intersected by a wall. Both brushes are made out of the common/skip texture, with only the angled faces textured in the common/hint texture. Common/skip is the one advance not covered by Bill Brook's tutorial. Skip informs the compiler to ignore any part of the brush that is textured by it. In this way only the faces textured as hint will cause portals avoiding unnecessary portal creation, as would happen with the original method. The down side of using common/skip is that only GTK 1.5 will filter skip/hint brushes out when you try to filter hint brushes from the map. Renaming the skip shader *hint_skip*, is one way around this. As both skip and hint are compiler-only shaders, this will cause no problems with missing textures in-game. If the angled faces of the 2 hint brushes are not on the EXACT same angle their effect will be lost. Both brushes must end right up against other structural brushes, and they must meet right at the corner of the corridor. The compiler will calculate that the portal created by brush A could not see the portal created by brush B, and vice versa, therefore culling the map beyond.
![hint.jpg](images/hint.jpg)
diff --git a/leveldk.co.uk/tutorial-07.md b/leveldk.co.uk/tutorial-07.md index cfe2116..a6af75e 100644 --- a/leveldk.co.uk/tutorial-07.md +++ b/leveldk.co.uk/tutorial-07.md
@@ -60,7 +60,7 @@ These folders are added to a zip files and then renamed as a .pk3. As a matter o
Let's discuss what exactly goes in each folder in turn:
-In the *maps* folder are placed the .bsp and .aas files. In the sample .pk3 the .bsp and .aas for both the FFA and CTF versions have been included. The source .map files are not normally required, but because they support this series of tutorials their inclusion is essential in this case. There are also 2 folders containing a number of .tga art files. These folders were generated by Q3map2 as part of its computation of dynamic lighting effects. In order for in game textures effected by dynamic lights to be shown, these folders must be included.
+In the *maps* folder are placed the .bsp and .aas files. In the sample .pk3 the .bsp and .aas for both the FFA and CTF versions have been included. The source .map files are not normally required, but because they support this series of tutorials their inclusion is essential in this case. There are also 2 folders containing a number of .tga art files. These folders were generated by Q3map2 as part of its computation of dynamic lighting effects. In order for in-game textures affected by dynamic lights to be shown, these folders must be included.
The*scripts* folder contains a .txt file, giving information about the levels and thanking those people who have assisted. The folder also contains the shader scripts used by the level or required for custom models. Remember if you pulled the shader from another map or source, you must include the entire script, not just the portion of it that may be applicable to this level. In short, if you use somebody else's shader, DO NOT EDIT IT! When writing shaders to use, cutting and pasting to another shader script is fine as long as credit is given, but changing the content of an existing script will effect the way the shader works in other levels that use the same script. Also contained in the *scripts* folder are 2 .arena files. An .arena file is a renamed .txt file. For the level or levels to appear in the Skirmish Menu in Q3, each must have its own .arena file named *`mymapname.arena`*, where my map name is the EXACT name of the .bsp for that level. The sample text from the `dk_lmtutctf.arena` follows:
@@ -72,13 +72,13 @@ The `dk_lmtutffa.arena` contains the following text:
The .arena files give required information, regarding bots to be loaded, map name, frag or capture limit, and game type to be set.
-Into the *textures* folder go any custom textures used, placed in side their folders. A common mistake is to fail to include textures from the *`mapmedia.pk3`*, which came with GTK and was not distributed with the original game. The confusion arises because the textures in the *`mapmedia.pk3`* will be included in the standard id texture sets. The importance of testing the level in a clean install of Q3 can not be stressed enough.
+Into the *textures* folder, place any custom textures used in their folders. A common mistake is to fail to include textures from the *`mapmedia.pk3`*, which came with GTK and was not distributed with the original game. The confusion arises because the textures in the *`mapmedia.pk3`* will be included in the standard id texture sets. The importance of testing the level in a clean install of Q3 cannot be stressed enough.
The *Models* folder contains any custom model textures, as already mentioned, in a normal .pk3 do not include the .md3 or .ase files. The sample .pk3 does contain the actual models as they are required by the editor. Normally models go inside a *mapobjects* folder inside the *models* folder. Inside the *mapobjects* folder each model or relating texture should be placed into its own folder.
-The image shown as the map loads is placed into the *levelshots* folder. Do not make the image too large. A 512 by 512 pixel .jpg is normal. If the image is excessively big the over all size of the .pk3 increases with little benefit and the skirmish menu can start to lag. A useful trick for taking good screen shots is to turn off the gun and all 2d in game icons, *`/cg_drawgun` 0* and  *`/cg_draw2d` 0* entered in the console will have the desired result. The same commands followed by 1 will restore the gun and icons.
+The image shown as the map loads is placed into the *levelshots* folder. Do not make the image too large. A 512 by 512 pixel .jpg is normal. If the image is excessively big, the overall size of the .pk3 increases with little benefit, and the skirmish menu can start to lag. A useful trick for taking good screen shots is to turn off the gun and all 2D in-game icons. *`/cg_drawgun` 0* and  *`/cg_draw2d` 0* entered in the console will have the desired result. The same commands followed by 1 will restore the gun and icons.
-Most mappers have 2 installs of Q3. One contains all the collected custom content, the other only the original .pk3 files that came with the game and its subsequent updates. Always run the new .pk3 in the clean version of quake. If you have missed any textures or shaders out of the .pk3, this will highlight the problem. The console reports errors. Drop the console and type */condump* *`mymapname.txt`*, locate the *`mymapname.txt`* file in your Q3 directory and open it. The console read out that you have just saved will inform you of what the game can not find. Add the missing files to the .pk3.
+Most mappers have 2 installs of Q3. One contains all the collected custom content, the other only the original .pk3 files that came with the game and its subsequent updates. Always run the new .pk3 in the clean version of quake. If you have missed any textures or shaders out of the .pk3, this will highlight the problem. The console reports errors. Drop the console and type */condump* *`mymapname.txt`*, locate the *`mymapname.txt`* file in your Q3 directory and open it. The console read out that you have just saved will inform you of what the game cannot find. Add the missing files to the .pk3.
In order to distribute the .pk3 it is common practice to place the file inside a zip file. Not only will this help reduce the upload/download times by shrinking the file size a little, but will avoid the problem of some hosts considering the .pk3 a suspect file type.
diff --git a/leveldk.co.uk/tutorial-08.md b/leveldk.co.uk/tutorial-08.md index 1997142..cc81994 100644 --- a/leveldk.co.uk/tutorial-08.md +++ b/leveldk.co.uk/tutorial-08.md
@@ -1,6 +1,6 @@
# Converting the level for CTF
-At several points throughout this series of tutorials it has been mentioned that the map is intended to be converted to a Capture The Flag Level. This section deals with that process.
+Throughout this series of tutorials, it has been mentioned that the map is intended to be converted to a Capture The Flag level. This section deals with that process.
There are some utilities available that are supposed to automate the cloning and rotating of levels in order create the archetypal symmetrical CTF level. This article will discuss how to complete that process by hand. From the outset, the important of saving the map under different names at points throughout the process can not be stressed enough. GTK does not enjoy moving and rotating large sections of a map and might well give up and crash at various points. Fig.1 below, shows the mirrored level we are intending to create.
@@ -8,7 +8,7 @@ There are some utilities available that are supposed to automate the cloning and
*fig.1*
-Make certain you have nothing filter off. Before we make a mass selection, select and hide geometry on the existing base side that already exists in the area we are intending to place the cloned base. Delete the closed door ways that blocked of the un-built routes in the FFA version of the map.Draw out a large brush over the existing base (fig.2), then press the select inside button on the tool bar. Press i to invert the selection, then h to hide. Tidy up the parts of the base we want to select, hiding each brush that we do not want to select. When only the parts of the base we require are left, press i to select all (fig.3) and un-hide the rest of the map. Now for the tricky bit, hit the space bar to clone the base. Switch to top down view, if you haven't already. Rotate the selection 180 degrees. Hopefully GTK will not have crashed at this point.
+Make certain nothing is filtered off. Before we make a mass selection, select and hide geometry on the existing base side that already exists in the area where we intend to place the cloned base. Delete the closed doorways that blocked the un-built routes in the FFA version of the map.Draw out a large brush over the existing base (fig.2), then press the select inside button on the tool bar. Press i to invert the selection, then h to hide. Hide the parts of the base we don't want to select, keeping only the brushes we do want. When only the parts of the base we require are left, press i to select all (fig.3) and un-hide the rest of the map. Now for the tricky bit, hit the space bar to clone the base. Switch to top down view, if you haven't already. Rotate the selection 180 degrees. Hopefully GTK will not have crashed at this point.
![select.jpg](images/select.jpg)
@@ -30,7 +30,7 @@ Having cloned and repositioned the base you will discover that the models, altho
*fig.5*
-Now we have 2 neutral coloured bases. Not much good for red and blue teamed CTF games. Blue and red versions of the textures used, or suitable replacements will need to be applied (fig.6). Again, selecting an area by the select inside button, then using texture find/replace is a fast way of doing this. The only long winded part of the process in the sample map was needing to make 2 new .ase models for the bases as it is not possible to retexture the neutral coloured models like normal brushes. To add to the overall effect, the colour of the base light entities should also be changed to reflect the teams colour. Target_location messages should also be altered.
+Now we have 2 neutral coloured bases. Not much good for red and blue teamed CTF games. Blue and red versions of the textures used, or suitable replacements will need to be applied (fig.6). Again, selecting an area by the select inside button, then using texture find/replace is a fast way of doing this. The only long-winded part of the process in the sample map was needing to make 2 new .ase models for the bases, as it is not possible to retexture the neutral-coloured models like normal brushes. To add to the overall effect, the color of the base light entities should also be changed to reflect the team colors. Target_location messages should also be altered.
![basecolour.jpg](images/basecolour.jpg)
diff --git a/leveldk.co.uk/tutorial-09.md b/leveldk.co.uk/tutorial-09.md index c75194f..f890ac3 100644 --- a/leveldk.co.uk/tutorial-09.md +++ b/leveldk.co.uk/tutorial-09.md
@@ -1,6 +1,6 @@
# Entities not included in the main maps
-After completing the main maps and the supporting tutorials I was aware that a number of entities had not been covered. In this article the entities func_rotating, func_bobbing, func_door (including areaportals), func_train and func_plat will be examined, in addition to using triggers and traps. Open `dk_lmtutmap2.map` for examples of the entities that are going to be discussed. Remember the shortcut Ctrl Alt and left click to select func_ entities.
+After completing the main maps and the supporting tutorials, I was aware that several entities had not been covered. In this article, we will examine the entities func_rotating, func_bobbing, func_door (including areaportals), func_train, and func_plat, in addition to triggers and traps. Open `dk_lmtutmap2.map` to see examples of the entities we will discuss. Remember the shortcut Ctrl Alt and left click to select func_ entities.
Let's begin with func_door entities (fig.1). Doors can be single or multiple brushes, they can open in one direction, or brushes can move in different directions. If you want the doors to open in different directions (classic double doors moving in opposite directions away from each other), they must be separate door entities but teamed together. Create the brushes that you intend to convert into a func_door. Select all the door brushes and drop the entity menu, select func, then func_door. Then bring up the entity editing window and allocate an angle for the door to open. If you so desire you can set the speed for the door, the amount of damage a door takes before it is triggered open, or whether or not it acts as a crusher and inflicts damage. You may want to target a func_button at it or some other trigger to cause the door to open. More on this later, as we discuss other entities. In the small entity map there are two doors, each given the key team and the value 1. As a result the doors open and close together as a single entity.
@@ -36,7 +36,7 @@ Func_bobbing entities can have any number uses. In the example map, 3 little cra
*fig.6*
-Normally jump pads or steps are used for ascending levels in Quake 3. At times, however, it may be useful to use a platform that rises and falls. Platforms can be triggered by another entity (in this case a button), or will work automatically when a player steps aboard. Create and select the brush or brushes you intend to create the entity from and select func_plat. Bots can be rather stupid about running underneath platforms. This can be easily avoided by including as part of the entity a player or bot clip brush that at the platform's highest point completely fills the space below to the ground. Edit the entity's properties. Platforms are drawn in the editor in the highest, raised position, but spawn in game at the lower point. A slow rising platform can be used to reach more powerful items quite effectively. Adjust the *height* key value so that the platform sits neatly on the floor in its lowest position (subtract the thickness of the visible part of the func_plat from the total height from the top of the entity to the ground). The most significant problem with func_plat entities is the absence of sounds in the original distribution of Quake 3. To this end, replacement sounds must always be included with any map that uses this entity. Examine the sample .pk3. It contains a *sound* folder with a *movers* folder within and a *plats* folder inside that. Contained within the *plats* folder are the *pt1_start* and *pt1_end* .wav files looked for by the game.
+Normally jump pads or steps are used for ascending levels in Quake 3. At times, however, it may be useful to use a platform that rises and falls. Platforms can be triggered by another entity (in this case a button), or will work automatically when a player steps aboard. Create and select the brush or brushes you intend to create the entity from and select func_plat. Bots can be rather stupid about running underneath platforms. This can be easily avoided by including as part of the entity a player or bot clip brush that at the platform's highest point completely fills the space below to the ground. Edit the entity's properties. Platforms are drawn in the editor in the highest, raised position, but spawn in-game at the lower point. A slow rising platform can be used to reach more powerful items quite effectively. Adjust the *height* key value so that the platform sits neatly on the floor in its lowest position (subtract the thickness of the visible part of the func_plat from the total height from the top of the entity to the ground). The most significant problem with func_plat entities is the absence of sounds in the original distribution of Quake 3. To this end, replacement sounds must always be included with any map that uses this entity. Examine the sample .pk3. It contains a *sound* folder with a *movers* folder within and a *plats* folder inside that. Contained within the *plats* folder are the *pt1_start* and *pt1_end* .wav files looked for by the game.
![plat.jpg](images/plat.jpg)