L4D Level Design/Outdoor Levels

Jump to: navigation, search

In this tutorial, we'll learn how to incorporate the sky into the level so that we can make it feel like the player is outside. We'll also take a look at creating displacements which are kinds of brushes that you can form terrain out of.

Contents

[hide]

[edit] The Sky

Open the file "tutorial05_part2.vmf" in Hammer. We will make this level an outdoor level.

Click on File > Save as and rename the file "tutorial06.vmf"

In the Camera viewport, move to the 2nd room in the level (the one that has the dimensions 512 x 480) and select the ceiling.

Selecting the ceiling brush.
Selecting the ceiling brush.

In the Texture box, click on the Browse Button to bring up the Texture Browser.

Type "tools" in the Filter drop-down field and find the texture called "toolsskybox"

The tools/toolsskybox texture.
The tools/toolsskybox texture.

Double-click on it to set it to the active texture.

With the ceiling brush still selected, click on the Apply current texture to selection icon on the Tool Bar.

Applying the skybox texture to the ceiling.
Applying the skybox texture to the ceiling.

Any face of a brush that is assigned this toolsskybox texture will automatically draw the sky in the game engine.

Image:note.png Note: You can also apply the skybox texture to wall and floor brushes.

Right now, it's going to be a little weird to have the walls abruptly end so close to the where the player can see. So, let's raise the ceiling and add another set of walls to make the sky a little further out.

Doubling the height of the room.
Doubling the height of the room.

Image:note.png Note: Don't forget to expand the wall over the hallway to completely seal the level if you duplicate the walls.

Now, we need to assign the sky that we want seen where the skybox texture is.

Click on Map > Map Properties from the Menu Bar.

Selecting Map Properties from the Map menu.
Selecting Map Properties from the Map menu.

The Map Properties dialog box will appear.

The Map Properties window.
The Map Properties window.

Change the SkyBox Texture Name to "sky_l4d_urban01_hdr".

This is the skybox texture used in No Mercy.

Save your level.

Press F9 and click on OK to see the results in the game.

Image:note.png Note: Make sure you have the file "tutorial06.nav" in your left4dead/maps directory.

Other SkyBox Texture Names you can use:

Death Toll "sky_day01_09_hdr"
Dead Air "urbannightburning_hdr"
Blood Harvest "sky_l4d_rural02_hdr"

[edit] Creating a Displacement

Displacements are special brushes that you can sculpt to form more organic shapes with, such as terrain. The easiest example we can start with is a pile of dirt on the ground. Let's create a displacement in this outdoor room we've just created.

Image:note.png Note: Displacement brushes can't be used to seal the world. Once you've turned a brush into a displacement, you must seal the world with a regular brush.

Save the file "tutorial06.vmf" as "tutorial06a.vmf".

Displacements can be any texture that you normally apply to a brush. There are blend textures, however, that we can use to paint on displacements and they blend between two textures smoothly.

Click on the Browse Button on the Texture Box.

The gravel to dirt blend texture.
The gravel to dirt blend texture.

Type "blend into the Filter drop-down field.

Select the texture "blendgraveldirt001a" and double-click on it to make it the current texture.


Selecting the floor brush.
Selecting the floor brush.

In the Camera viewport, select on the floor brush in the outdoor room.


Duplicating and reshaping the floor brush.
Duplicating and reshaping the floor brush.

In the Side viewport, duplicate the floor by moving your cursor over the Side viewport and pressing Shift + the Up arrow key.

Move the floor up so that the top of the new floor is 16 units above the old floor (if it isn't already that height when you duplicated it).

Now shape the brush so that it is 240 units wide and 240 units long and 16 units high.

Move it so that it covers the bottom left corner of the outdoor room in the Top viewport.


Apply the current texture to the brush by clicking on the 7th icon Image:l4d_hammer_toolbar_07.jpg down on the Tool Bar.

Now, enter the Texture Application Mode by clicking on the 6th icon Image:l4d_hammer_texture_mode.jpg down on the Tool Bar.

The Create button in the Face Edit Sheet.
The Create button in the Face Edit Sheet.

With the Face Edit Sheet dialog box still up, left-click on the top face of the new floor brush.

Click on the Displacement tab.

Click on the Create Button in the Face Edit Sheet dialog box.


The resolution for the displacement.
The resolution for the displacement.

A Displacement Create window will pop up.

Change the Power Field to "1" and click OK.

Image:note.png Note: The Power number you designate here will change the density of vertices in your displacement. You can change the number later if you need to.


The displacement is created.
The displacement is created.

You should now see your new floor brush look like a mesh where the top face was.


[edit] Sculpting a Displacement

The Paint Geometry window.
The Paint Geometry window.

Click on the Paint Geometry Button in the Face Edit Sheet dialog box.

The Displacement Paint Geometry window will appear.

Leave the default settings for now.


The Paint Geometry node.
The Paint Geometry node.

In the Camera view, you can still navigate around with the Displacement Paint Geometry window up.

As you move your cursor around on the displacement, you'll notice a green sphere that snaps to each point on the displacement mesh.

This sphere designates the point where you will be editing your mesh.


Lowering a vertex on the displacement.
Lowering a vertex on the displacement.

Left-clicking with these settings will raise the point. Right-clicking will lower the point.

Try lowering the point in the middle of the entrance to the hallway by right-clicking on it 4 times.


Using the Shift key to lower the vertex.
Using the Shift key to lower the vertex.

You can also raise and lower the points by holding the Shift key down and holding down the left mouse button. Then, move the mouse up and down so that the point doesn't snap to positions. It moves freely.

Move the point to the left of the first point down into the floor using this method.


Making a mound of dirt.
Making a mound of dirt.

Using either method, shape the displacement so that it looks like a mound of dirt on the floor.


[edit] Painting Alpha on a Displacement

Before we test out the displacement in the game, let's paint it so that it blends with a floor texture.

Close the Displacement Paint Geometry window by clicking on the X on the upper right corner.

In the Face Edit Sheet dialog box, click on the Paint Alpha Button.

The Displacement Paint Alpha window will appear.

The Displacement Paint Alpha window.
The Displacement Paint Alpha window.

In the Camera viewport, just like when you painted the positions of the points of the mesh, you can paint the alpha of the blended texture by left-clicking on the points.

Paint the edges of the displacement so that the gravel texture touches the floor and blends up to the dirt.

Painting the alpha blend on the mound.
Painting the alpha blend on the mound.

We now have our dirt mound. Close the Displacement Paint Alpha window by clicking on the X at the top right corner of the window.

With the Face Edit Sheet dialog box still up, click on the Material tab and then select the original floor below the displacement including the hallway floor.

Selecting the floor brush under the mound.
Selecting the floor brush under the mound.

Click on the Browse Button in the Face Edit Sheet dialog box.

Type "gravel" in the Filter drop-down field and select the texture "train_gravel_floor_01" and double-click on it to make it the current texture.

The gravel texture.
The gravel texture.

Click on the Apply Button in the Face Edit Sheet dialog box to apply the gravel texture to the floor.

Texturing the floor with the gravel texture.
Texturing the floor with the gravel texture.

You can close the Face Edit Sheet dialog box by clicking on the X at the top right corner of the window.

Save your level.

Press F9 and click OK to run the level in the game.

Image:note.png Note: Make sure you have the file "tutorial06a.nav" in your left4dead/maps directory.

Your displacement should look something like this:

The mound of dirt on a gravel floor.
The mound of dirt on a gravel floor.

Displacements can be any side of a brush. We just used the top of the brush to make a ground, but sides of brushes can be used to make cliffs or cave walls. You can also have multiple sides of the same brush be displacements.

[edit] Sewing Multiple Displacements Together

Go back to Hammer and save "tutorial06a.vmf" to "tutorial06b.vmf"

We will use this file to make multiple displacement brushes and sew them together along their shared edges.

Duplicating the displacement brush.
Duplicating the displacement brush.

Select the displacement brush.

In the Top viewport, duplicate the displacement by pressing Shift + the Right arrow key.

Move the new displacement to the right so that its left edge lines up with the original displacement's right edge.


More displacement duplications.
More displacement duplications.

Select both the displacement brushes and duplicate them again in the Top viewport by pressing Shift + the Up arrow key.

Move them so that their bottom edge lines up with the original displacements' top edges.


Reshaping the displacement brushes.
Reshaping the displacement brushes.

Shape the brushes so that the top edge in the Top viewport is in the room.


Selecting the displacement brushes.
Selecting the displacement brushes.

In the Camera viewport, select all the displacement brushes.

You'll notice that none of their displacement edges line up currently (even though their brush edges do).


The Sew button on the Face Edit Sheet.
The Sew button on the Face Edit Sheet.

Click on the Texture Application Mode icon Image:l4d_hammer_texture_mode.jpg on the Tool Bar.

In the Face Edit Sheet dialog box, click on the Displacement tab.

Click on the Sew Button to sew all the shared edges together.


Painting multiple displacements simultaneously.
Painting multiple displacements simultaneously.

You can also paint the geometry and the alpha with multiple displacements selected. It will edit shared points.


Save your level.

Press F9 and click on OK to run the level in the game.

Image:note.png Note: Try creating your own nav mesh for this level as in L4D Map Editing Part 4. Instead of marking the starting areas as PLAYER_START, try marking them as CHECKPOINT.

[edit] Rural Template Map

This tutorial also comes with examples and templates for outdoor maps. Open the file "zoo_rural_01.vmf" to see them and copy them into your own levels.