Monday, May 26, 2008

Lesson 5 - displacements - the entity report - player clip

In this lesson we will learn displacements, the entity report, player clip

If this is your first visit to this sight you should start at the beginning.

First, I copied and pasted the doorway. (See p1) then I double-clicked on it, and on the properties dialog box, Select "World Model", select browse, then type "sandbag".

I used
"models/props_fortifications/sandbags_line1_tall.mdl". Click OK. Then click on "collisions", change the pull down menu from "not solid" to "use vPhysics" Click apply. (See p2)

Use select /copy method, and drag/copy them all the way across like in the example. (See p3)

Use your texture tool, and select the nodraw texture. Click the block tool, and draw a brush all the way across the top of the sandbags, just like in my example. (See p4)

Make the brush as long as it needs to be, so that it touches the wall and the house. Make it about six units thick and at least 89 units high from the top of the sandbags. (See p5)

Select the new brush, and from the top view viewport we are going to cut the middle section, about the length of one sandbag. (See p7)
Use two slices to slice the brush into three sections, keeping all sections. (see p6)

Click the texture tool, type fence look for the texture called wood/woodfence001. Apply the texture to the brush. See how the texture did not lineup? (See p8)

Sometimes you can get away with hitting the fit button, to line things up quickly. This doesn't always work. You have to use your judgment. Click on it. (See p9) if it looks OK then texture the rest the fence. If it doesn't look OK, use ctrl-z to undo. And line it up the old-fashioned way.

Be sure and texture both sides. (see p10) select the middle part of the fence and hit Ctrl-m to bring up the transform dialog box. We are going to rotate this brush on the Y-axis.

In the Transform dialog box type 110 in the Y-axis box, press OK. (See p11)

Move the brush, line up the lip of the brush to the top of the sandbag. And paint the newly exposed nodraw textures (See p12)
don't worry if that brush doesn't touch the ground. Trust me.


Draw a huge brush like in my example. Notice how high it is. It comes up to the windowsill. (See p13)
I want to show you a method of selecting a new texture without having to go through the texture dialog box. This speeds up texturing your map, because you can use textures that are already in your map. Also if you need things to match, there is no easier way.
Here it is.
Select the texture tool.
Left click on the texture you want. (we want the grass for this example)
Then right click where you want to apply the selected texture. (see p14 & p15).
Simple as that.
To turn this brush into a Displacement, click on the displacement tab. (see p16)

Under tools it says select. That's for you to select the brush face that you wish to turn into a displacement.
So select the top face of our new brush.

On the displacement tab, press create, press OK. (see p17)

You just created your first displacement. (see p18)

You just want to make sure you select the top face and not the rest of the sides. Hammer will create a displacement out of the sides selected, and will delete the rest of the sides.

Displacements are used in Hammer to create natural looking terrain. It can be used to create hills, Grasslands, cliffs, and caves. Displacements cannot be used to seal your map. Displacements also allow grass to grow with some textures.

To edit displacements, you use the texture tool/displacement tab (see p19)
Paint geometry:
This button allows you to move the displacement up-and-down or back and forth.
(I will explain in detail what all this stuff does later on in the blog. Right now I want to teach you what you need to know so that we can finish this map.)
set your settings like i did below my example in p20. (See p20)

Distance = 9
radius = 116

This means that it will move our displacement up-and-down nine units and the radius, is the amount of space that it will grab and move.

One mouse button moves the displacement down. The other mouse button moves the displacement up. Push the displacement down, in a manner that clears a path from the door to the ramp. Leave the displacements high where they touch the wall, the house, and the sandbags. But push it down where the spawn exit is. Until it looks something like my example. (see p21)

See how I cleared the displacement out from in front of the doorway. You have to at least do that. And notice how bumpy and pointy everything is? We can smooth out those peaks, by selecting smooth in the effects field. (see p22) it is also a good idea to increase the radius when smoothing.

Close that dialog box. Click the "invert alpha."(see p23) Alpha channels allow you to control the look of the textures on a displacement. You can use the alpha tool to create a road or path. Textures with "Blend" in their name have alpha channels in them. And they only work on displacements.

Select the paint alpha button.(see p24) use your mouse buttons to paint the alpha channels the way you want to. I made a path from the door to the sandbag exit.

It looks more natural now.(see p25)

Copy and paste one of the sandbags into the opening in the fence, (See p26) double-click the sandbag, goto properties, go to world model, click browse, type hedge look for "models/props_foliage/hedge_256_128high" select that one, click ok, click apply goto collisions, set the pull down menu to "Not Solid" and click apply. Move it around and line it up until it looks like the example. (see p27)

I want to show you how easy it is to add rooms to existing houses. So let's add a room to the bigger house.

We are going to add a room to the house circled in red in my example.(see p28)

From the inside, facing the window that exits toward spawn. We are going to create a dividing wall. Select the texture tool, click browse, type tools, select the nodraw texture. From the center of the back wall, create a brush out to about half the rooms length. (See p29 )

Texture the wall using the quick select method.(select the texture tool, left click to select the texture you want to use, right click to apply that texture.) Make a copy of the wall we just created, using the drag shift method(select the wall from the TopView viewport, hold down the shift key drag the wall to the position you want, released a mouse button before you released the shift key.) rotate the wall 90 degrees using the transform dialog box, press Ctrl-m to activate the transform dialog box.

Type 90 in the Z: text field, click OK. (see p30)

From the TopView viewport, move the brush to line it up, and use the grips to shrink it to fit. Copy the front door and paste it where we want to cut the door. Cut the door. And double-click on the doorway model, select "world model", click "browse", type "door" in the filter, look for models/props_doors/doorway16_wood.mdl. Select it, click OK, click apply. (See p31)

This room needs a ceiling. You can put a ceiling across the whole room if you want. But in this case I am just going to put a roof over this little room. Select the wall that does not have the doorway cut in it. Slice that wall near the top. About the same thickness of the wall, or if you are using the same texture as I am, slice it just under where the wood at the top ends. This time just select the top part and slice it the same thickness as the wall with the doorway in it. Select the longer piece and drag it across the top part to create our ceiling. (see p32)

Check it out. Listen to Free Music Music room Download mp3s

Apply a texture to the top, and apply a texture to the inside.(see p33). Then copy and paste the light and the light model into the new room.

Now we are going to learn about the clip and the player clip. These are special brushes that are used to prevent a player from getting into areas of the map that you do not want them to. We want to keep these players from getting on the outside roof of this building. Fly to the outside in the camera view.

Select the texture tool, click browse, type tools, select player clip.(the clip texture, and the player clip texture do the same thing. They both block player movement and are invisible in the game.) with the player clip texture selected we are going to draw a brush on top of the roof. Slice that brush in half using the centerline of the roof as a guide. Select one side of the brush, and trim it along the roofline. Then do the same thing to the other side. Now nobody will be able to get on this roof. (See p34)

The clip and player clip can also be used to help a players movement in the game. Let's do an example. Let's go into the house that does not have the clip on the roof. Say for instance you want the players to be able to run out through this window without having to jump. We can use the player clip and create an invisible step to give the player a boost. This time select the clip texture. And draw a little step about 8 units high for the first step and 16 units high for the second step, and place it in front of the window. And that's how that works. (See p35)

They don't have to be the same length as normal stairs, I squished mine down to 12 units. (See p36)

Final for this lesson, I would like to teach you about the entity report. The entity report lists everything in your map. It can be useful to find things. To access the entity report, click on the Map pull down menu. Select entity report. In the dialog box you can see all the entities that you placed in your map. (see p37) let's say you wanted to find your spawn, all you would have to do is look on the list. And if you double-click on what you're looking for (info_player_allies) you can zoom to that object in the map. You can also delete entities through this dialog box by selecting them and clicking the delete button. This dialog box will come in handy later.

That is all for now.

Goto Lesson 6

No comments: