User Tools

Site Tools


hpl2:tutorials:level_editor:tutorial_1

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
hpl2:tutorials:level_editor:tutorial_1 [2011/02/15 21:01]
l1ght5h0w [Decals]
hpl2:tutorials:level_editor:tutorial_1 [2011/04/26 23:24] (current)
jacksonemg [The basic objects]
Line 5: Line 5:
  
  
-We will begin with building the floor of the level. Select the primitives tool in the toolbox. In the right tab you can now see that plane is the default selected primitive. This is the primitve ​we will use for our floor. Click the dotted button next to the material field to bring up the texture browser. Enter Static_objects/​castlebase/​ and select castlebase_tiledfloor.mat. Now click & drag an area in the perspective view to create your floor. ​Don not worry if the floor gets to small or too big, this can be changed after creation by selecting the primitive and changing its size values. The size of my floor is: X=25 Y=1 Z=12. It should look something like this:+We will begin with building the floor of the level. Select the primitives tool in the toolbox. In the right tab you can now see that plane is the default selected primitive. This is the primitive ​we will use for our floor. Click the dotted button next to the material field to bring up the texture browser. Enter Static_objects/​castlebase/​ and select castlebase_tiledfloor.mat. Now click & drag an area in the perspective view to create your floor. ​Do not worry if the floor gets to small or too big, this can be changed after creation by selecting the primitive and changing its size values. The size of my floor is: X=25Y=1 Z=12. It should look something like this:
  
  
Line 11: Line 11:
  
  
-Now, once we have a floor its time to add the walls. Click the Static_objects button in the toolbox and select castlebase in the pulldown menu in the top-right side of the GUI. The list under the pulldown menu should now be filled with all the objects in the Castlbase set. Scroll through the list until you find a grey '- wall' tab. These are all the walls in the castlebase set. Select the '​default'​ wall and place it on the floor. Before placing the wall you can turn and scale it as you please. These values can also be changed after you've placed the wall. Look through the list and try to replicate the level you see in the pictures below. If you get stuck or get tired of experimenting with the different pieces you can use my tutorial file: (xxxxx.xxx) to continue.+Now, once we have a floor its time to add the walls. Click the Static_objects button in the toolbox and select castlebase in the pulldown menu in the top-right side of the GUI . The list under the pulldown menu should now be filled with all the objects in the Castlbase set. Scroll through the list until you find a grey '- wall' tab. These are all the walls in the castlebase set. Select the '​default'​ wall and place it on the floor. Before placing the wall you can turn and scale it as you please. These values can also be changed after you've placed the wall. Look through the list and try to replicate the level you see in the pictures below. If you get stuck or get tired of experimenting with the different pieces you can use my tutorial file: (xxxxx.xxx) to continue.
  
  
Line 36: Line 36:
  
  
-Let us start by making a light that comes in from the window. Select the '​Light'​ button in the toolbox and then select the spotlight. Put it outside the window and select the '​Spot'​ tab. Here you can rotate it so its light points towards the room. As you may notice, the light is not filling the whole room. Its radius is too small for this room, so change it to 17.5. It looks a bit strange since it only illuminates a small spot on the floor. We will remedy this by using a custom falloff map. Click on the '​…'​ button next to the spot falloff map field and select '​light_falloff_short_fade.tga'​. ​   Now the room is much brighter. White light may look nice, but in some cases you may want a warmer color. Switch back to the '​General'​ tab and find the box marked '​Diffuse Color'​. Click it to change the color of the light. Choose a nice fitting color (I chose R=0.7 B=0.7 G=0.55). In the check box under the color you can toggle the shadows on/off. In this case we will leave it off since it may give us strange shadow when the light is outside the level.+Let us start by making a light that comes in from the window. Select the '​Light'​ button in the toolbox and then select the spotlight. Put it outside the window and select the '​Spot'​ tab. Here you can rotate it so its light points towards the room. As you may notice, the light is not filling the whole room. Its radius is too small for this room, so change it to 17.5. It looks a bit strange since it only illuminates a small spot on the floor. We will remedy this by using a custom falloff map. Click on the '​…'​ button next to the spot falloff map field and select '​light_falloff_short_fade.tga'​. ​   Now the room is much brighter. White light may look nice, but in some cases you may want a warmer color. Switch back to the '​General'​ tab and find the box marked '​Diffuse Color'​. Click it to change the color of the light. Choose a nice fitting color (I chose R=0.7B=0.7G=0.55). In the check box under the color you can toggle the shadows on/off. In this case we will leave it off since it may give us strange shadow when the light is outside the level.
  
  
-With the light streaming in from the window, you might notice that the unlit parts are still pitch black. This does not look very natural and to remedy this we will place a box light in the middle of the level. Change the size so it encapsulates the whole level and pick a fitting color, preferably a dark color since this will be the only light in the dark corners (I chose R=0.085 B=0.08 G=0.14).+With the light streaming in from the window, you might notice that the unlit parts are still pitch black. This does not look very natural and to remedy this we will place a box light in the middle of the level. Change the size so it encapsulates the whole level and pick a fitting color, preferably a dark color since this will be the only light in the dark corners (I chose R=0.085B=0.08G=0.14).
  
  
-In the final room we will set up a somewhat unatural ambient lighting with a point light. Select the point light and place it in the middle of the second room. Change the radius until the room is lit to your satisfaction. Change the light to a fitting color (I chose R=0.195 B=0.36 G=.59).+In the final room we will set up a somewhat unatural ambient lighting with a point light. Select the point light and place it in the middle of the second room. Change the radius until the room is lit to your satisfaction. Change the light to a fitting color (I chose R=0.195B=0.36G=.59).
  
  
Line 71: Line 71:
 ==== Sound & Areas ==== ==== Sound & Areas ====
  
-Most of the entities have sound files in them if they need it but sometimes you want to add ambient sounds and then you need the soundtool. Just select the soundtool, input a sound file you want to use and place it where you want it. In the sound tab you can set the area where the sound can be heard and the volume of the sound 
  
-Areas are used for a lot of things ​in the gameThey are needed for ladders, AI nodes and the most important one is used for setting the starting position for the playerSelect ​the area tool and select playerstart. Place the area by the bed so the bottom of the cube is sitting on the floor. The blue arrow points ​where the player looks when he spawns in the level. Thats it now you have a working levelTheres more you can do in the editor that isnt written here, open up some of our levels and see how we solved some of the more advanced problems. Good luck and start building levels.+Most of the entities have sound files in them when required, but sometimes you will want to add ambient soundsYou can do this with the '​Sound'​ toolJust select ​the '​Sound' ​tool, input a sound file you want to use, and place it where you want it. In the '​Sound'​ tab you can set the area where the sound can be heard and its volume.
  
  
 +Areas are used for a lot of things in the game. They are needed for ladders, AI nodes, and the most important one is used for setting the starting position of the player. Select the '​Area'​ tool and select '​Playerstart'​. Place the area where you want the player to start so that the bottom of the cube is sitting on the floor. The blue arrow points where the player looks when he spawns in the level. You now have a working level. Theres more you can do in the editor that is not written here, open up some of our levels and see how we solved some of the more advanced problems. Good luck and start building levels.
  
hpl2/tutorials/level_editor/tutorial_1.1297803692.txt.gz · Last modified: 2011/02/15 21:01 by l1ght5h0w