Difference between revisions of "Mapping:Create your first room"

From Custom Map Makers Wiki
Jump to: navigation, search
(Texture the ceiling)
m
 
(99 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{WIP}}
+
==Before you start==
 
 
==Introduction==
 
This tutorial aims to help you create your first room and, your first map. The tutorial isn't meant to be "the best way", it's been created to introduce you to good practice, neat brushwork and a consideration of a 10 year old engine (soon to be given a new lease of life).
 
 
 
 
 
==Before we begin==
 
 
{| width="100%" style="padding-left:5%;"
 
{| width="100%" style="padding-left:5%;"
 
|style="padding-right:5%;vertical-align:top"|
 
|style="padding-right:5%;vertical-align:top"|
I'm assuming before this tutorial begins that you have a correctly configured radiant, it doesn't matter which, the principles are pretty similar in all versions.
+
I'm assuming before this tutorial begins that you have a correctly configured Radiant, it doesn't matter which, the principles are pretty similar in all versions.
If it doesn't look slightly similar to this or If you've not yet configured radiant please see one of the sections about installing
+
If it doesn't look slightly similar to this or If you've not yet configured Radiant please see one of the sections about installing
  
*links to installing
+
* [[:Category:Radiant]]
  
If you're happy that your radiant shares similarities with the image above you may now close radiant, it's not required for the next 10 minutes, we have to prepare.
+
If you're happy that your radiant shares similarities with the image above you may now close radiant.
  
  
|
 
[[File:Screenshot.png|500px]]
 
|}
 
  
==First steps==
+
'''Before you begin any mapping project''' you should choose a name for the project and create an empty folder in your textures folder with that name. For the purpose of this tutorial our map is called '''myfirstmap''', it's short and snappy and easy to remember.
Before you begin any mapping project you should choose a name for the project and create an empty folder in your textures folder with that name. For the purpose of this tutorial our map is called '''myfirstmap''', it's short and snappy and easy to remember.
 
  
 
Create a folder in your ''mapping/textures'' folder called ''myfirstmap''
 
Create a folder in your ''mapping/textures'' folder called ''myfirstmap''
Line 37: Line 27:
 
if not, add one. Save the file and close the editor.
 
if not, add one. Save the file and close the editor.
  
In order to know how large things in map world are in urban terror the game it's important to have a reference. Luckily somebody created a set of entities which help.
 
  
Download the file '''measure.def''' [http://www.custommapmakers.org/storage/download/measure.def Right click and save target]
 
  
If anyone knows the name of the person who created this we should give credit.
+
|
 +
[[File:Screenshot.png|500px]]
 +
|}
 +
 
  
Move this file to your ''mapping/scripts'' folder.
+
'''Please note''': This and all other tutorial maps can be loaded from the wiki. This map can be downloaded [[http://www.custommapmakers.org/storage/resources/tutorial1.pk3 Here]]
  
 
==Textures / images==
 
==Textures / images==
Line 58: Line 49:
 
Save these as '''water.jpg''' and '''watercaulk.jpg'''
 
Save these as '''water.jpg''' and '''watercaulk.jpg'''
  
==Create a shaders file==
+
We will not use these textures nor the following shaders for this tutorial but in later if you follow this tutorial, we will.
 +
 
 +
== Create a shader file ==
 
In your mapping/scripts folder create a new file called myfirstmap.shader and open it with a text editor.
 
In your mapping/scripts folder create a new file called myfirstmap.shader and open it with a text editor.
  
 
Paste in the following lines, they're not important at this stage but will be needed in another tutorial later.
 
Paste in the following lines, they're not important at this stage but will be needed in another tutorial later.
 
+
   
  ///////////////////////////////////////////////////////////////
 
 
  textures/myfirstmap/watercaulk
 
  textures/myfirstmap/watercaulk
 
  {
 
  {
Line 76: Line 68:
 
     surfaceparm water
 
     surfaceparm water
 
  }
 
  }
///////////////////////////////////////////////////////////////
+
 
 +
 
 
  textures/myfirstmap/ladder
 
  textures/myfirstmap/ladder
 
  {
 
  {
Line 93: Line 86:
 
Save this file and close the text editor, the preparation work is complete it's now time to open radiant.
 
Save this file and close the text editor, the preparation work is complete it's now time to open radiant.
  
==Open Radiant==
 
{| width="100%" style="padding-left:5%;"
 
|style="padding-right:5%"|
 
Start radiant, after a few moments it will start and have a layout similar to this
 
  
 
+
==Where to start==
It may look slightly different but all of the important windows will be visible.
 
 
 
*2d view
 
*3d view
 
*Textures
 
*Mesages
 
 
 
If not, you've seriously done something wrong and should leave now or read a topic about fixing radiant... needs one
 
 
 
Most work will take place in the''' 2d section'''. To switch beween 3d projections use the CTRL-Tab key. This will cycle between ''Y/X Z/X'' and'' Z/Y'' - basically top, side, other side
 
 
 
For the purpose of this tutorial work in '''units of 8'''. Check that this is your current selection by the '''grid''' menu option or by pressing '''4'''
 
|
 
[[File:Screenshot1.png|500px]]
 
|}
 
 
 
==Create your first brush, the floor==
 
 
{| width="100%" style="padding-left:5%;"
 
{| width="100%" style="padding-left:5%;"
 
|style="padding-right:5%;vertical-align:top"|
 
|style="padding-right:5%;vertical-align:top"|
Brushes, the basic building blocks are created by dragging rectangular blocks.
 
 
Working in the Y/X plane drag out a rectangle to form a floor. For the first 20 minutes or so you'll struggle to find the brush you just created in the 3d view but persevere
 
 
 
Having created your floor you should move this to the center of the map, this isn't really important. As long as you can see your floor in both the 2d and 3d views you can work anywhere.
 
 
Select your floor, Shift and Click in the 2d or 3d window over the brush will do this.
 
|
 
 
 
[[File:Tut1-1.png|500px]]
 
 
|}
 
  
==Make it caulk==
+
Fire up your radiant - if you managed to install a suitable version you should see something similar to the example on the right.
{| width="100%" style="padding-left:5%;"
 
|style="padding-right:5%"|
 
  
Having created your floor and selected it it's now time to open a set of shaders.
+
Right click on your 2d view - the [[Entities:What is an entity|entities]] that you can add to your map will be listed.
  
Depending on how your radiant is configured you may or may not have loaded the common shaders as part of the start up, if not you'll need to load the common shaders.
+
We will add an [[Entities:Info#info_player_start|info_player_start]], so select the '''info''' -> '''info_player_start'''
  
To do this:
+
This will add a small (possibly red) rectangle to your map.
 
*Click '''textures''' on the top menu
 
*Select '''Directory list'''
 
*Choose '''common'''
 
  
If common isn't listed you should add '''common.shader''' to your '''shaderlist.txt''' which is usually in your ''mapping/scripts'' folder.
+
You should now be able to move this item around in the 2d view by dragging with the mouse.
  
The common shaders (caulk, botclip, playerclip, etc) should now be visible in your textures window. Click on the '''caulk''' texture. On my configuration and others I've used this is bright pink.
+
You can change the view between XYZ views using Ctrl+Tab.
  
'''Note:''' Radiant can be configured to always use a specific texture when it starts up. Plain installations can use anything. For the purpose of this tutorial I'll assume you've got
+
Move the info_player_start so it's where you'd like it to be.
  
 
|
 
|
  
[[File:Tut1-2.png|500px]]
+
[[file:tut1.png|500px]]
  
 
|}
 
|}
  
==Sizing the room==
+
==Create your first brush==
 
{| width="100%" style="padding-left:5%;"
 
{| width="100%" style="padding-left:5%;"
 
|style="padding-right:5%;vertical-align:top"|
 
|style="padding-right:5%;vertical-align:top"|
  
Earlier in this tutorial we downloaded the measurement entities and saved them to our mapping/scripts folder. The entities file define a set of useful measures that we can use to make our map feel the right size.
+
Press Esc to deselect all objects, you should really get used to doing this. After every action, press ESC.
 
 
Right click in the '''2d window''',  
 
 
 
A list of all the possible entities that can be added will be listed in the ''context menu.''
 
  
Select '''measure''' to open the ''measurement entities'' and select '''measure_player_stand'''
+
'''Set your grid size'''
  
 +
Initially we'll work with a 8 unit grid. The grid settings are selectable from the main menu (grid -> 8). Initially there is no reason to use any other grid setting, later - when you become more used to mapping you'll choose other grid settings but for now work with 8 units.
  
Move this object around so that it's standing on the floor and is roughly in the center of the brush you created, the brush should be 16 units in the Y plane (2 grid units when viewed with grid 8)
 
  
When you're happy that you have your entity placed correctly and you're happy with the size of your floor, select the measurement entity (shift right click) and press space to copy this.
+
Change the ''2d view'' so that you're looking down on your world, you can tell when you're looking from the top down onto your map by the small indicator in the top right of the 2d plane. '''Y/Z''' is the top down view.
  
Move the copy to stand on top of the first.
+
Working in the Y/Z plane drag out a rectangle to form a floor -- this is your first [[Mapping:What is a brush|brush]]. For the first 20 minutes or so you'll struggle to find the brush you just created in the 3d view but persevere
  
Copy this second entity and place that on top of the 2nd so you have a stack of 3 entities measuring 3 x the player height.
+
You should aim to create a floor roughly the same size as the example. Because you're working with the 8 grid you should work with walls/floors/ceilings 2 blocks (16 units) thick.
  
 
|
 
|
[[File:Tut1-3.png|500px]]
+
[[File:Tut12.png|500px]]
 
 
[[File:Tut1-4.png|500px]]
 
 
 
 
|}
 
|}
  
==Build the walls==
+
==Work with caulk==
 
 
 
{| width="100%" style="padding-left:5%;"
 
{| width="100%" style="padding-left:5%;"
 
|style="padding-right:5%;vertical-align:top"|
 
|style="padding-right:5%;vertical-align:top"|
 +
When radiant first loads it uses (by default) a "texture" called no-draw. It is possible to change this.
  
The next stage requires that we build 4 walls, these walls should be 16 units thick and as high as the 3 measurement entities. Start with any wall you wish, drag the wall brush next to the floor but never overlapping.
+
When constructing your map it is generally better to work with caulk. Caulk is a common [[Mapping:What is a shader|shader]] that is considered special. All non-visible areas of your map should use caulk. For this reason it's best to make all brushes using caulk and then, '''texture only what will be seen'''.
 
 
  
By copying the first brush (space) and by dragging the brush around you will eventually make walls that surround the floor brush.
+
Select your first brush, the floor - Shift+Right Click will select a brush in either the 2d or 3d window.
  
 +
With the brush selected click on the caulk texture (the pink one in the texture window). The entire brush will be textured with the pink caulk.
  
Don't overlap any brushes. Eventually you'll have a scene which looks something like this.
+
Confirm your floor is 16 units (2 blocks high) by changing your 2d view Ctrl+Tab
  
Save the map at this point, Use - '''myfirstmap.map''' as your filename.
+
Check that your floor is just below the info_player_start and you've not embedded the entity inside the floor.
  
 
|
 
|
 +
[[File:Tut13.png|500px]]
  
[[File:Tut1-5.png|500px]]
+
[[File:Tut14.png|500px]]
 
 
[[File:Tut1-6.png|500px]]
 
 
 
[[File:Tut1-7.png|500px]]
 
  
 
|}
 
|}
  
==Add the ceiling==
+
==Add the walls==
 
{| width="100%" style="padding-left:5%;"
 
{| width="100%" style="padding-left:5%;"
 
|style="padding-right:5%;vertical-align:top"|
 
|style="padding-right:5%;vertical-align:top"|
Select the floor, press space and drag the copy of the floor to be the ceiling
 
|
 
[[File:Tut1-8.png|500px]]
 
|}
 
 
==Using mitres==
 
{| width="100%" style="padding-left:5%;"
 
|style="padding-right:5%;vertical-align:top"|
 
Although not strictly necessary this is a tutorial and it's perhaps good practice to sometimes use mitres to reduce the number of brush faces where 2 brushes connect. This method can help reduce light leaks and makes a much neater map.
 
 
There are a couple of different ways to created mitred joints, this tutorial will attempt to explain both methods, you can choose whether to use mitres or not and if you do, which method you prefer.
 
 
For example, these 2 walls.
 
 
|
 
[[File:Tut1-9.png|500px]]
 
|}
 
 
==Using the clipper tool==
 
{| width="100%" style="padding-left:5%;"
 
|style="padding-right:5%;vertical-align:top"|
 
The clipper tool is one of the greatest assets available, it allows you to both split and delete brushes.
 
 
At first the clipper is daunting, you'll make many mistakes - please save your map at this point - just in case.
 
 
Make these 2 brushes over lap, extend the length of each brush so there is an overhang
 
 
 
Press X - you're now in clipper mode.
 
 
Click on the inside point where these brushes overlap
 
 
 
If you look closely at the previous example image you'll notice 2 little numbers - 1 & 2 - this is the order in which I clicked using the clipper tool, the editor has created a line between the points.
 
  
Press Shift and Enter to split these brushes - Please note Pressing Ctrl and Enter would have deleted the red area but for this tutorial we just want to split our brushes.
+
Unselect all items ('''Press Esc''') - remember to do this before you start a new action.
  
 +
With the 2d view in the Z/Y plane create a new brush (drag in 2d view) and align this new brush (your first wall) so that it's aligned with the floor brush we created earlier.
  
 +
'''Remember the following for all brush work'''
  
This has sub-divided the 2 overlapping brushes into 4 brushes, we no longer require the excess brushes, all we wanted to achieve was a mitre between the 2 walls so the excess can be deleted.
+
*Always work with caulk
 +
*Never overlap brushes
 +
*Work with 8 units for all brushwork until you are more advanced
 +
*Drag outside a brush to resize
 +
*Drag inside a brush to move it
  
 +
With a brush selected you can clone it (make a copy) by pressing '''space'''. This will clone the original brush and move it 1 unit in the x/y planes away from the original. It will also be the selected item.
  
 +
Drag this cloned wall brush to the opposite side of the room. Align the brush so it's not overlapping another brush as in the example.
  
Select the excess brushes and press backspace to delete them.
+
In the same manner as you created the second wall, by cloning the first, continue to create the brushes for your walls.  
  
  
 +
[[File:Tut17.png|200px]] [[File:Tut18.png|200px]]
  
You're left with a perfect mitre, no additional brush faces are left.
 
 
|
 
|
[[File:Tut1-11.png|500px]]
+
[[File:Tut15.png|500px]]
 
 
[[File:Tut1-12.png|500px]]
 
 
 
[[File:Tut1-13.png|500px]]
 
  
[[File:Tut1-14.png|500px]]
+
[[File:Tut16.png|500px]]
 
|}
 
|}
  
==Mitre with control points==
+
==Add the roof==
 
{| width="100%" style="padding-left:5%;"
 
{| width="100%" style="padding-left:5%;"
 
|style="padding-right:5%;vertical-align:top"|
 
|style="padding-right:5%;vertical-align:top"|
  
The clipper method is only one way to create mitres, there is another, simpler way using control points.
+
Clone the brush you created for the floor and move this up to form the ceiling
 
 
It's important to always work in the same grid when constructing in this way, it's simple and you quickly remember how many units you must adjust by.
 
 
 
These 2 walls will be mitred in just a few clicks.
 
  
Select the first wall and press E - the control points will be displayed as small rectangles in the corner of your brush.
+
You should now have constructed an enclosed box - no brushes should overlap and all brushes are 2 squares (16 units) thick.
  
By dragging the small blue points it's possible to change the overall shape of a brush.  
+
Review your work and confirm it matches the example image on the right.
  
Move the control points so that the walls connect like this...
+
For the next stage you will need to move inside the box you've created in the 3d view. Navigation in the 3d view is initially complicated, if you find it impossible - try inverting your mouse. This is a radiant option.
  
At this point you should use whichever technique you prefer to mitre all of the other walls.
+
When you've managed to navigate inside the room we'll begin to texture our room.
  
 
|
 
|
 
+
[[File:Tut19.png|500px]]
[[File:Tut1-15.png|500px]]
 
 
 
[[File:Tut1-16.png|500px]]
 
 
 
[[File:Tut1-17.png|500px]]
 
 
 
[[File:Tut1-18.png|500px]]
 
 
 
 
|}
 
|}
  
==Adding textures==
 
With your walls constructed and mitred it's time to consider texturing those portions of the map that the player will see - NEVER use textures on areas that will not be seen. Its for this reason that construction should be using caulk brushes, texture only when construction is complete.
 
  
Select the roof brush and press H to hide it. The hide feature is very useful, several brushes can be hidden at a time by first selecting them and then pressing H
 
  
===Load your textures===
+
==Texturing your room==
 
{| width="100%" style="padding-left:5%;"
 
{| width="100%" style="padding-left:5%;"
 
|style="padding-right:5%;vertical-align:top"|
 
|style="padding-right:5%;vertical-align:top"|
Previously we create a shader file called myfirstmap.shader in the mapping/scripts folder.
 
  
We added that shadername myfirstmap to the shaderlist.txt in the mapping/scripts folder.
+
Textures are applied to '''faces''' - not '''brushes'''. It is possible to texture an entire brush and sometimes you may need to do this but the general rule is to work with faces.
 +
 
 +
When texturing we need to select only the faces that will be seen by the player.
 +
 
 +
In our example room we have 6 faces - 4 walls, the floor and the ceiling.
  
We created a textures folder and saved 4 files to the folder mapping/textures/myfirstmap
+
'''Press Esc to deselect'''
  
It should now be possible to load that texture set into radiant and have them display in the textures window.
+
To select a single face you should Shift+Click in the 3d window with your cursor over the face you wish to select.
  
From the ''main menu'' click '''textures''' then click '''directory list'''
+
The face will show it's been selected by changing colour.
  
Choose '''myfirstmap''' and click ok.
+
You can de-select the face by Shift+Clicking again on the same brush or by pressing Esc.
  
Your textures should display in the textures window.
+
Load your map textures - from the main menu select '''Textures''' and then click '''Directory list'''
|
 
[[File:Tut1-20.png|500px]]
 
|}
 
  
===Texture one wall===
+
From this list select '''myfirstmap''' - this will load all the images in the matching textures folder and any shaders defined for this name.
{| width="100%" style="padding-left:5%;"
 
|style="padding-right:5%;vertical-align:top"|
 
Select ONE face of any of the wall brushes.
 
  
To select ONE face (not the entire brush) you will need to Press Shift and click the face you wish to select in the 3d view.
+
In the '''textures window''' you will see the ''plaster.jpg'' and ''brick.jpg'' images you downloaded earlier and saved to your'' mapping/textures/myfirstmap'' folder.
  
With that face selected find the brick.jpg image in your textures window and click it. The brick texture will be applied to the selected face.
 
|
 
[[File:Tut1-21.png|500px]]
 
|}
 
  
===Texture 3 more walls===
+
Select a wall face - click the brick texture in the textures window and you'll see the brick texture applied to the selected wall.
{| width="100%" style="padding-left:5%;"
 
|style="padding-right:5%;vertical-align:top"|
 
You can select multiple faces at the same time, to do this Press Shift, Ctrl, Alt and Click another face in the 3d view, click again to unselect.
 
  
With the final 3 faces selected click the brick.jpg image once more in the textures window
+
It's possible to select multiple faces - press Ctrl+Shift and click as you select multiple faces.
|
 
[[File:Tut1-22.png|500px]]
 
|}
 
  
===Texture the floor===
+
[[File:Tut112.png|200px]] [[File:Tut114.png|200px]]
Select the floor face and click the plaster.jpg image in the textures window, this will texture the floor of your map.
 
  
===Texture the ceiling===
+
Select all the remaining wall faces (Ctrl+Shift Click in the 3d window) and then click the brick texture to apply this to your walls.
{| width="100%" style="padding-left:5%;"
 
|style="padding-right:5%;vertical-align:top"|
 
You'll need to fly inside your map in the 3d view to add the final texture, before you do this press Shift H to un-hide any previously hidden brushes.
 
  
Once you've found how to move around and you're inside your map, select the ceiling brush face (only the face)
+
To finish texturing, select the floor and ceiling faces and click the ''plaster.jpg'' image in the textures window.
  
Texture this face with the plaster.jpg image in your materials view.
+
You should now have a fully textured map.
  
Congratulations - you've built and textured your first room - almost.
+
[[File:Tut116.png|200px]]
  
 
|
 
|
 +
[[File:Tut110.png|500px]]
  
 +
[[File:Tut111.png|500px]]
  
[[File:Tut1-23.png|500px]]
+
[[File:Tut115.png|500px]]
 
 
[[File:Tut1-24.png|500px]]
 
 
|}
 
|}
  
==Structural brushes and detail brushes==
 
A couple of things to consdier.
 
  
*Structural brushes should not be textured
+
==Let there be light==
*Detail brushes with texture block visability
+
{| width="100%" style="padding-left:5%;"
 +
|style="padding-right:5%;vertical-align:top"|
  
This tutorial is not intended as an in-depth discussion about structural and detail brushes for that you should read the topic [[Mapping:Structural and detail brushes]]
+
Without lights and lighting effects your map will be completely dark. Lights add more than illumination to your map, they also add atmosphere and depth.
  
If you follow the rule "structural brushes should not be textured" then an interesting problem arises with our current map, it's constructed entirely from structural brushes (by default a brush is structural).
+
Right click in the 2d window to ''create a light'' - select the '''light''' entity from the context menu.
  
We've textured our brushes which means we must convert them to detail, there are a few ways to select entire maps, I'll describe only one here.
+
You will be prompted to enter a value for the light. Enter the value of '''200'''
  
Create a brush which totally surrounds your room.
+
Lights can be added with a very low intensity (20-40) to add interest to your map,
  
[[File:Tut1-25.png|800px]]
+
Lights with intensities between 100-300 are good for general lighting.  
  
You might need to flip between 2d views to fully enclose your map
+
It's better in many ways to create a map with many lower intensity lights than 1 or 2 large lights.
  
With your map totally surrounded by this new brush, from the main menu selection, then select -> inside
+
Move your light so it's not too close to the walls, floors or ceiling.
  
This will select everything enclosed by the brush
+
It's possible to set a light colour, most lights in the real world are not white. When sunlight hits grass for example the light reflected from the grass is green, so in places where there is grass it would make sense to add a number of small subtle lights (20-30 intensity) to represent this.
  
[[File:Tut1-27.png|800px]]
+
'''Press K''' to open the colour picker.
  
Press Ctrl M to convert these brushes to detail brushes.
+
Select a colour you like - I chose a slightly yellowish light that might be similar to the light you might get from an old light bulb.
  
==Add structural brushes==
+
With the light still selected (select it if not) we will copy (clone) this light.
  
Your entire map is made from detail brushes, in this state you will not be able to compile your map, it will most likely leak.  
+
Press Space to clone an item or brush, move the new light to the diagonally opposite side of the room.
  
Our next task is to encase your room in a structural caulk hull.
+
Feel free to change the colour of this light, '''press K''' to open the colour picker.
  
To do this we first need to select a will, this will set the default height of the next brush we draw.
+
[[File:Tut120.png|300px]]
  
[[File:Tut1-28.png|800px]]
+
When you're happy with your lights and light colours press Esc to deselect any objects. Your first map is almost complete.
  
Create a new brush touching the wall and the same (16 units, 2x8 units wide)
+
|
 +
[[File:Tut117.png|500px]]
  
[[File:Tut1-29.png|800px]]
+
[[File:Tut121.png|500px]]
 +
|}
  
Make sure this brush is as high as your detail brush walls and floor and ceiling.
+
==Compile your map==
  
By copying and dragging the first brush create a solid wall around your map.
 
  
Press Ctrl Shift D to hide all detail brushes - lol - all your map dissapears!! Don't worry, it's still there, press Ctrl Shift D and it will come back, press again to hide it.
+
==Test your map==
 
 
[[File:Tut1-33.png|800px]]
 
 
 
Create a floor for your new structural box
 
 
 
[[File:Tut1-34.png|800px]]
 
 
 
Copy the floor up to be the top
 
 
 
[[File:Tut1-35.png|800px]]
 
 
 
===Hide the structure===
 
Press Ctrl D to make the rest of your map dissapear for a moment, Ctrl D hides structural brushes and you'll probably use this a lot. I tend to work on either structure or detail so at anyone time I can see either one of the other.
 
 
 
Remember Ctrl D will also flip the state and re-show the hidden structural brushes but for now keep them turned off.
 
 
 
[[File:Tut1-37.png|800px]]
 
 
 
===Show the detail===
 
Ctrl Shift and D will show or hide detail brushes - Press this to show the detail brushes in your map.
 
 
 
We now have to light our map.
 
 
 
==Adding lights==
 
Current trends seem to be moving towards the idea that lots of little lights are better than one big mother f*cker of a light. I subscribe to this theory and we'll add 4 lights to light our room
 
 
 
Right click inside your room and select light from the list of possible entities.
 
 
 
A small type-in may appear insisting that you enter a value. Enter something low between 40 and 70 and click OK. We can change this value from the entity inspector window.
 
 
 
Move the light into a corner of the room, move it half way up the height of the room, not too close to any other brushes.
 
 
 
When you're happy with the placement, and with the light still selected we will inspect this lights properties.
 
 
 
Do this now by pressing N with your light selected. N opens up the entity inspector whenever you have something selected, if you don't have anything selected the worldspawn settings are displayed. For more information about the Worldspawn see the topic [[Entities:World Spawn]]
 
[[File:Tut1-38.png|800px]]
 
  
You can change the light value here to increase or decrease intensity.
 
  
Close the entity inspector window when you've finished reading, adjusting.
 
  
===Pretty colours===
+
The complete map and resources for this map can be downloaded [http://www.custommapmakers.org/storage/resources/tutorial1.pk3 here]
Press K with your light selected, choose a nice colour for your light from the pallette, it's your map, choose what you like.
 
  
[[File:Tut1-39.png|800px]]
+
[[File:Tut122.jpg|800px]]
 
 
Close this box when you've selected the colour.
 
 
 
===Many lights===
 
 
 
With the light selected, make 3 copies (press space to copy an object) and move these lights to each corner of your room. Not too close to a wall.
 
 
 
 
 
[[File:Tut1-41.png|800px]]
 
 
 
==Info Player Start==
 
With your map constructed and lighting added we must now add an entry point into your map. All maps must have at least one of these entities.
 
 
 
Right click inside your map away from walls and lights and select info -> info_player_start
 
 
 
Move this around so it's just above the floor.
 
 
 
[[File:Tut1-42.png|800px]]
 
 
 
 
 
==Compiling your first map==
 
 
 
HELP HELP HELP
 
 
 
Are all radiants the same - do they all come with a compiler of some description?
 
 
 
COMPILE INSTRUCTIONS NEEDED FROM INSIDE RADIANT IF POSSIBLE
 
 
 
==Test your map==
 
  
[[File:Tut1-screenshot.jpg|800px]]
+
[[Category:Mapping]]

Latest revision as of 15:22, 13 September 2011

Before you start

I'm assuming before this tutorial begins that you have a correctly configured Radiant, it doesn't matter which, the principles are pretty similar in all versions. If it doesn't look slightly similar to this or If you've not yet configured Radiant please see one of the sections about installing

If you're happy that your radiant shares similarities with the image above you may now close radiant.


Before you begin any mapping project you should choose a name for the project and create an empty folder in your textures folder with that name. For the purpose of this tutorial our map is called myfirstmap, it's short and snappy and easy to remember.

Create a folder in your mapping/textures folder called myfirstmap

Find your shaderlist.txt file, normally this will be in the mapping/scripts folder. Open this with a text editor.

Somewhere in this file, add the single line

myfirstmap

Confirm that there is a line which reads

common

if not, add one. Save the file and close the editor.


Screenshot.png


Please note: This and all other tutorial maps can be loaded from the wiki. This map can be downloaded [Here]

Textures / images

For the purpose of this tutorial you'll need a couple of images. Download these 2 files and save them to your mapping/textures/myfirstmap folder. You created this earlier if you didn't you've been skipping - go back and do it now.

Plaster.jpg Bricks.jpg

Save these files as plaster.jpg and bricks.jpg -

Additionally download these files and save them to your mapping/textures folder

Watercaulk.jpgWater.jpg

Save these as water.jpg and watercaulk.jpg

We will not use these textures nor the following shaders for this tutorial but in later if you follow this tutorial, we will.

Create a shader file

In your mapping/scripts folder create a new file called myfirstmap.shader and open it with a text editor.

Paste in the following lines, they're not important at this stage but will be needed in another tutorial later.

textures/myfirstmap/watercaulk
{
   qer_nocarve
   qer_trans 0.40
   qer_editorimage textures/watercaulk.tga
   surfaceparm nodraw
   surfaceparm nolightmap
   surfaceparm nonsolid
   surfaceparm trans
   surfaceparm nomarks
   surfaceparm water
}


textures/myfirstmap/ladder
{
   qer_editorimage textures/ladder.jpg
   qer_trans .40
   surfaceparm ladder
   surfaceparm nodraw
   surfaceparm nolightmap
   surfaceparm nonsolid
   surfaceparm trans
   surfaceparm nomarks
   surfaceparm noimpact
   surfaceparm playerclip
}

Save this file and close the text editor, the preparation work is complete it's now time to open radiant.


Where to start

Fire up your radiant - if you managed to install a suitable version you should see something similar to the example on the right.

Right click on your 2d view - the entities that you can add to your map will be listed.

We will add an info_player_start, so select the info -> info_player_start

This will add a small (possibly red) rectangle to your map.

You should now be able to move this item around in the 2d view by dragging with the mouse.

You can change the view between XYZ views using Ctrl+Tab.

Move the info_player_start so it's where you'd like it to be.

Tut1.png

Create your first brush

Press Esc to deselect all objects, you should really get used to doing this. After every action, press ESC.

Set your grid size

Initially we'll work with a 8 unit grid. The grid settings are selectable from the main menu (grid -> 8). Initially there is no reason to use any other grid setting, later - when you become more used to mapping you'll choose other grid settings but for now work with 8 units.


Change the 2d view so that you're looking down on your world, you can tell when you're looking from the top down onto your map by the small indicator in the top right of the 2d plane. Y/Z is the top down view.

Working in the Y/Z plane drag out a rectangle to form a floor -- this is your first brush. For the first 20 minutes or so you'll struggle to find the brush you just created in the 3d view but persevere

You should aim to create a floor roughly the same size as the example. Because you're working with the 8 grid you should work with walls/floors/ceilings 2 blocks (16 units) thick.

Tut12.png

Work with caulk

When radiant first loads it uses (by default) a "texture" called no-draw. It is possible to change this.

When constructing your map it is generally better to work with caulk. Caulk is a common shader that is considered special. All non-visible areas of your map should use caulk. For this reason it's best to make all brushes using caulk and then, texture only what will be seen.

Select your first brush, the floor - Shift+Right Click will select a brush in either the 2d or 3d window.

With the brush selected click on the caulk texture (the pink one in the texture window). The entire brush will be textured with the pink caulk.

Confirm your floor is 16 units (2 blocks high) by changing your 2d view Ctrl+Tab

Check that your floor is just below the info_player_start and you've not embedded the entity inside the floor.

Tut13.png

Tut14.png

Add the walls

Unselect all items (Press Esc) - remember to do this before you start a new action.

With the 2d view in the Z/Y plane create a new brush (drag in 2d view) and align this new brush (your first wall) so that it's aligned with the floor brush we created earlier.

Remember the following for all brush work

  • Always work with caulk
  • Never overlap brushes
  • Work with 8 units for all brushwork until you are more advanced
  • Drag outside a brush to resize
  • Drag inside a brush to move it

With a brush selected you can clone it (make a copy) by pressing space. This will clone the original brush and move it 1 unit in the x/y planes away from the original. It will also be the selected item.

Drag this cloned wall brush to the opposite side of the room. Align the brush so it's not overlapping another brush as in the example.

In the same manner as you created the second wall, by cloning the first, continue to create the brushes for your walls.


Tut17.png Tut18.png

Tut15.png

Tut16.png

Add the roof

Clone the brush you created for the floor and move this up to form the ceiling

You should now have constructed an enclosed box - no brushes should overlap and all brushes are 2 squares (16 units) thick.

Review your work and confirm it matches the example image on the right.

For the next stage you will need to move inside the box you've created in the 3d view. Navigation in the 3d view is initially complicated, if you find it impossible - try inverting your mouse. This is a radiant option.

When you've managed to navigate inside the room we'll begin to texture our room.

Tut19.png


Texturing your room

Textures are applied to faces - not brushes. It is possible to texture an entire brush and sometimes you may need to do this but the general rule is to work with faces.

When texturing we need to select only the faces that will be seen by the player.

In our example room we have 6 faces - 4 walls, the floor and the ceiling.

Press Esc to deselect

To select a single face you should Shift+Click in the 3d window with your cursor over the face you wish to select.

The face will show it's been selected by changing colour.

You can de-select the face by Shift+Clicking again on the same brush or by pressing Esc.

Load your map textures - from the main menu select Textures and then click Directory list

From this list select myfirstmap - this will load all the images in the matching textures folder and any shaders defined for this name.

In the textures window you will see the plaster.jpg and brick.jpg images you downloaded earlier and saved to your mapping/textures/myfirstmap folder.


Select a wall face - click the brick texture in the textures window and you'll see the brick texture applied to the selected wall.

It's possible to select multiple faces - press Ctrl+Shift and click as you select multiple faces.

Tut112.png Tut114.png

Select all the remaining wall faces (Ctrl+Shift Click in the 3d window) and then click the brick texture to apply this to your walls.

To finish texturing, select the floor and ceiling faces and click the plaster.jpg image in the textures window.

You should now have a fully textured map.

Tut116.png

Tut110.png

Tut111.png

Tut115.png


Let there be light

Without lights and lighting effects your map will be completely dark. Lights add more than illumination to your map, they also add atmosphere and depth.

Right click in the 2d window to create a light - select the light entity from the context menu.

You will be prompted to enter a value for the light. Enter the value of 200

Lights can be added with a very low intensity (20-40) to add interest to your map,

Lights with intensities between 100-300 are good for general lighting.

It's better in many ways to create a map with many lower intensity lights than 1 or 2 large lights.

Move your light so it's not too close to the walls, floors or ceiling.

It's possible to set a light colour, most lights in the real world are not white. When sunlight hits grass for example the light reflected from the grass is green, so in places where there is grass it would make sense to add a number of small subtle lights (20-30 intensity) to represent this.

Press K to open the colour picker.

Select a colour you like - I chose a slightly yellowish light that might be similar to the light you might get from an old light bulb.

With the light still selected (select it if not) we will copy (clone) this light.

Press Space to clone an item or brush, move the new light to the diagonally opposite side of the room.

Feel free to change the colour of this light, press K to open the colour picker.

Tut120.png

When you're happy with your lights and light colours press Esc to deselect any objects. Your first map is almost complete.

Tut117.png

Tut121.png

Compile your map

Test your map

The complete map and resources for this map can be downloaded here

Tut122.jpg