How-To: Make a Left 4 Dead Map Using Google Sketchup


Left 4 Dead 2 is great fun, but there are only so many maps that actually come with the game. And until Valve releases any additional map packs, community-created maps are your best bet for fresh content. But why not learn how to make your own custom maps? With Valve's Hammer World Editor and Google's free SketchUp program, it's actually much easier than you think.

Valve's Hammer is the game map editor that comes with the Left 4 Dead Software Development Kit (SDK). Google SketchUp is a free 3D design application that has myriad uses . Using both tools, you can design and make custom shapes and objects that would be impossible to generate with Hammer alone.

We're going to show you, step-by-step, how to use these tools to make a single Survival map for Left 4 Dead. We'll cover the basics of Hammer, the art of designing a building from a reference photo, and crafting simple objects to use in-game. The techniques we introduce apply to both Left 4 Dead and Left 4 Dead 2. They'll also help you make maps for other Source engine games, like Counter-Strike, Half-Life 2, Portal, and Team Fortress 2.

Grab and seat and dive in. Making a Left 4 Dead map is a perfect D-I-Y project for the Holiday weekend!

Part 1: Making a Left 4 Dead Map in 30 minutes

Install the L4D SDK, SketchUp, and Valve plugins

Before you can make game maps you need to first get the right tools. To install Hammer, simply goto the tools tab inside Steam, and install "Left 4 Dead Authoring Tools" or "Left 4 Dead 2 Authoring tools" depending on which game you want to work with. When you launch the Left 4 Dead authoring tools you are given access to a variety of programs, the most important being Hammer.

For Google SketchUp, just download and install the package from its homepage . SketchUp comes with many built-in guides and links to tutorial videos on using the interface. We highly suggest watching the videos to get a quick primer on basic SketchUp functions.

Finally, in order to export brush work and models from SketchUp into Hammer, you will need to install the SketchUp Plugins from Valve. First, you should open a Windows folder and navigate to the SketchUp plugins directory. This is located at: " C:\Program Files\Google\Google SketchUp 7\Plugins ".

Then launch the Left 4 Dead Authoring tools, then double click on " SketchUp Plugins ". This will open a windows folder that contains a folder called "Plugins" Open this folder, then open the "SketchUp" folder. You should now have a window showing you a list of .RBS and other files. Select all these files and copy them to the "SketchUp 7\Plugins" folder you opened earlier. The plugins should now show up automatically the next time you run SketchUp.

Introduction to Hammer

Before you can start using SketchUp to advance your map-making skills, you must first learn to use the Hammer editor. We're not going to be able to show you all of Hammer's features, but we'll give you enough to make a simple Survival map.

First you need to know the rules for making a map in Hammer, and how to duplicate those rules inside of SketchUp. Hammer uses a game map technique known as BSP, or Binary Space Partitioning . The easiest way to think of how BSP work is to imagine your own house as a 3D game map.

Inside your house, you have rooms separated by walls, doors and other partitions. When making your game map, all you really are doing is making individual rooms that the game can determine are connected together. The game engine uses this BSP map in order to calculate the what the player can see, where the AI can travel, and the fastest way to render the game world.

There are many online guides on how to form a optimized and efficient BSP-based map. We suggest you seek these out once you are ready to make larger maps. For now we will be building a single basic outdoor world, which requires just one room.

A Word about Brushes

In order to make the walls, ceilings and floors that make up your map, you use the "Brush" tool built into Hammer. A brush is a solid convex object. The simplest type of brush is a cube with six sides. An example of a more complex brush object is a cylinder. However, there is one rule to keep in mind when making brushes in both Hammer and SketchUp: all brushes must be convex in shape .

Convex means that if you were to draw a line though the shape it would never intersect with more then two points on the object. If you want to make a concave shape, such as an arch, you would need to make the arch out of smaller convex blocks. This works in almost in the same way as if you were building the arch up brick by brick. For now, we will be simply working with basic blocks and making the outdoor portion of our game map.

Your Very First Map

To make your first basic map you will need to make your first room.

Launch Hammer from the Left 4 Dead Authoring Tools. From the control bar, go to "File" then "New". You should now have a black window with four smaller windows inside, three of which show a grid. Moving clockwise from the top right, these windows by default are: 3D view, Top 2D View, Side 2D View, and Front 2D View.

Inside the 2D views there should be two aqua-colored lines that intersect. These lines point to the origin or coordinates: 0,0,0 of the map. This origin is important for aligning objects between SketchUp and Hammer, and also for more advanced features you may use later. You should strive to make your map centered around this origin.

Building the Outside World

I n order to make our basic "cabin in the woods" map we first need to make an outdoor world. Since we will have a larger world on all sides of our cabin, we can start by making a basic hallow cube shape. Before we make our first cube we first need to select a default texture.

Open the "Texture Application" by pressing SHIFT+A . Then press "Browse". In the "Filter" area type: " nodraw " and select the yellow texture that shows up. Close the texture application. The NoDraw material is a very special texture in Hammer. Any surface you put it on will virtually disappear inside the map, becoming invisible.

You can use this texture to cover surfaces that you know the player will never see such as the tops of large buildings. This saves compile time when saving your map to the game. The engine doesn't have to compute any lighting on NoDraw surfaces. For now though we will be using it as our default material so that any surfaces we choose not to apply textures will remain NoDraw.

Hammer has an easy way to make a hollow cube without making each of the six walls individually, by first making a large solid cube. Start by enabling the brush tool by pressing SHIFT+B . Next, inside the top 2D view, click and drag out a square.

Make this square 2048x2048 in size, and try to keep the center of the square located around the map origin. Inside either the front or side 2D views, drag the top and bottom of the cube so that it ends up being 2048 tall, but with the bottom of the cube sitting on the map origin. Then press ENTER to build the new object.

You now should have a solid outlined square inside your 2D views. And in your 3D view you should see a yellow 3D Cube. You may need to zoom out to the large cube in the 3D view.

Now switch to the default selection mode by pressing SHIFT+S. Select your cube inside the 3D window. Inside one of the 2D windows right click on the cube and select " Make Hollow " or press CTRL+H . A window will pop up asking how thick you want the walls on this hollow object. We will change the number to negative thirty two ( -32 ). Press enter and this will give you a cube that is 2048x2048x2048 units big on the inside with walls that are 32 units thick.

We will use this cube as the basis for the outside world of our map. You should note that the cube in the 2D views now has some extra thickness. This hollow cube is also a grouped object. If you want you can un-group it bu pressing CTRL+U . Pressing CTRL+G will group objects back together. Grouping is a great way to keep similar objects together to move them around. Now if you zoom into your cube in the 3D window you should end up inside a large cube with the NoDraw textures on all the walls.

This cube is now a sealed and "leak"-free map. A leak is caused by a gap somewhere in your map that is open to the black void surrounding your map, or between two otherwise sealed rooms. The easiest way to think about preventing leaks is to make your map as if you were building a pressurized space station. Any opening into the black void outside your space station would leak air into space.

The best way to prevent leaks is to be diligent in building your maps. All outside walls in your map should be sealed edge to edge with no gaps between walls. If your making a sealed room inside a building, the outside walls of the sealed rooms should also be treated in the same way with only AreaPortals acting as doors and windows. AreaPortals will be covered in later.

Apply the First Materials

We now have our large 3D Cube, but it has no textures. A good practice when making your map is to use development textures. You can find these easily by opening the Texture Application and typing: " dev " in the filter. We are going to apply: " dev/graygrid " to the floor of our cube. Press SHIFT+A to open the texture application. Select the floor of the cube. Then press Browse and find " graygrid " and double click on it. Then press "Apply". The bottom of your map should now be a large gray plane.

Make a Skybox

Now wouldn't it be great if our game map could look like it was surrounded by a large sky, rather then feeling like an enclosed cube? Source Enging games use what is called a Skybox to simulate a large expansive world. But you don't have to actually build a massive sky or dome to get this effect. All you have to do is simply tell the game which surfaces you want to see into the far away sky. You do this by using another special texture called Skybox .

Open the texture application, and then select all the surfaces you want to be sky. In the case of our map we will select the top and sides or our cube by pressing CTRL and clicking on each face. Then press browse and search for " Tools Skybox ." Double Click on either of the two textures that show up and press apply. You should now have a cube with a gray floor and blue walls. You can change which Skybox image the game renders by selecting "Map" > "Map Properties" from the toolbar, and changing the " Skybox Texture Name ". For now we will just leave it at the default: " sky_l4d_urban01_hdr ".

Adding Required Entities

Before we can test our our basic cube in the game we need to first place a few required entities. An entity is any object in the game world that is not a brush. There are two types of entities: Brush Entities , and Point Entities . A brush entity is created when you convert a solid brush object in the game world into something else. An example of a brush entity is breakable sheet of glass. A point entity is an object that is centered around a single point, such as light, a game function, or a 3D model.

Let There Be Sunlight

The first point entity we will place is related to the Skybox and is called " light_environment ". This entity will tell the game how to light our outdoor environment. This light will actually come from any Skybox texture and is designed to simulate sunlight.

To place this object first select the Entity Tool by pressing SHIFT+E . Before clicking in the game world you need to change the type of entity we want to place. You do this by changing the " Objects " field in the lower right window. You can search dynamically by just typing a portion of the entity name into this box. Once you have " light_environment " selected you can click inside the 3D game world to place your point entity. We recommend keeping this and other required special entities in one area of your map that you can easily find later. We prefer to place them near the origin of my map, often floating a few dozen units above the ground. The light_enviroment entity has many settings to change to tweak the sunlight in your game, but for now we will just leave it on the default settings.

Set Player Start Position

We now need to tell the game where to place the player when they load the map. This is done using another point entity named "info_player_start". Place this entity in the same manner as the one above. Ensure that the player start position is always a few units above the ground or the player may actually fall though the floor of the map upon game start.

Compile Your First Map!

Believe it or not you now have all the elements needed to export the map to the game and run around your first map. But before you can compile the map you need to save it somewhere. Press CTRL+S to save the map. We recommend saving it into a new folder inside your " Left4Dead\sdk_content\mapsrc " folder. In this case we will name the map: "My_First_map\l4d_sv_cabin.VMF". Most map makers name their maps with "L4D_" at the start to ensure that people know the map belongs to Left 4 Dead, and not, say, Counter-Strike. They then add the map type such as "vs" for Versus, "sv" for Survival.

In the Left 4 Dead 2 SDK you can detect the game type upon map load, and may not need to use separate map files for each type of game.

To compile your map select "File" > "Run Map" from the tool bar, or press "F9". A window will open up giving you various options. Select the following settings: " Run BSP - Normal ", " Run Vis - Fast ", " Run RAD - Fast ". Under " additional parameters " you can add console commands to do things such as running cheats upon map launch, or running the game in a window. For now just leave the settings on default. Press Ok.

A new window pops up letting you know the status of the compiler. It should only take seconds for our very basic map to compile, but be aware that compile times can last up to an hour for large complex maps, or sloppily made maps. The compiler window is your source for errors in your maps such as leaks, bad geometry or missing objects. Each time you compile a log file is written to in the same folder as your map VMF file.

Left 4 Dead should automatically launch and start loading your new map. Once in the game you will get an error stating: " NAV ERRORS, Map unplayable " You can ignore this for now. What it means is that the artificial intelligence does not yet know how to travel in your map. We will fix this later. For now you can run around your large flat plane and look at the sky. It is not much, but it does validate that your compile worked. Close Left 4 Dead and go back into Hammer.

Pave Some Terrain

Right no0,w our map hardly looks like a "Small cabin in the woods." So we now need to add some terrain to our map. Select the NoDraw texture , and then make a new brush, that is 2048x2048x32 in size, and lay this brush just above the floor of the map. Enter the Texture Application tool and select the top side of your new box. Re-paint just this side of the box with the GrayGrid texture . This textures helps you see the shape of your terrain. Then select the " Displacement " tab, and then press " Create ". Change the power setting to " 4 ". Your new brush object should change into a flat plane with triangles throughout the surface. These triangle are what allow you to sculpt terrain. The power setting allows you to create more detailed terrain.

We will be creating a simple hill, so we won't need much detail in our terrain. To start sculpting the terrain select the " Paint Geometry " button. We are going to make a flat hill at a set height above our floor that we can then put a cabin on top of. To create the hill select " Raise to " and change the distance to 64 and the radius to 64 . Near your map origin, raise up a few areas of the terrain such that you have a small hill to put our cabin onto. You can use the smooth tool to smooth out the edges of the hill. You can also compile the map and get a sense of the shape of your hill in the game.

To paint the hill with something that looks more natural, select the material tab, then browse, and search for: " nature " in the filter. We are going to select: " nature/blenddrygrassdirt " as our material and apply it to the face of the terrain. This is a special material that actually spawns grass automatically, and has a second portion that is dirt without grass. In order for grass to show up properly, you need to change the " Detail Material File " setting in the " Map properties " window to " detail/ruraldetailsprites ". Once you do this, you can go to the Texture Application tool, displacement tab, and then select " Paint Alpha ".

Under effect select " Raise/Lower " and then start clicking on the terrain in the 3D window. You should start to see grass pop-up on the terrain. You can right click to remove grass from areas you don't want. You must be careful to only put grass into places that you really need it as the game has a limit in the number of grass objects it can compile. In this case we are just putting grass around the slopes of the hill. This is all we will be doing with the terrain for now.

It should be noted that terrain will NOT seal the map, as it is not a convex brush object. Complex terrain will also extend the compile time as the engine has to compute the lighting for each of the triangular surfaces.

Plant Some Trees

In order to complete the look of our "Small cabin in the woods", we need some woods, or more specifically, some trees and bushes. Trees are grouped in one static model. This means they don't move, but can still collide with players and bullets. Inside Hammer they are a point entity named " prop_static ".

To place a tree: open the entity tool by pressing SHIFT+E . Change the " Objects " setting in the bottom right to " prop_static " and then click inside the 3D window. You should end up with a little red cube. This little red cube doesn't yet have a model assigned to it. Go back to the selection tool, and then right click on the cube in a 2D window and select "Properties" or press ALT+ENTER . In the properties window select " World Model " then press " Browse ". The model browse window pops up. This window is your link to all the props inside Left 4 Dead. It has a similar filter search window to the material browser. For this model type in "tree". We are going to select " props_foliage\trees_cluster02.mdl ".

This object is going to setup the outermost ring of trees on the edges of my map. Click "OK", then "Apply". You should now have a set of trees visible in your 3D window. They may or may not have leaves rendered depending on your graphics settings. You can now make copies of this model by simply copying and pasting. We use the keyboard shortcut CTRL+C and CTRL+V . All you do is aim your mouse as a new spot in the 3D window and paste a new tree. We suggest changing the rotation of each new tree to get a bit more variety in your forest.

Keep in mind that the more unique models you have in your level the slower the game will run, as each new model has to load a new texture and geometry into memory, and the more objects you have the longer your compile time will take. If you study the maps made by Valve you will see that they have carefully planned out each map. They place detail only in places the players can go. And the further aware from the main path the players travels the less detail you should add.

Expanding your Map Horizons

If you have been following along, then you may notice that our map is actually too small for a proper forest. In fact you really only have room for one row of trees, and not room for hordes of zombies to spawn. Making a map to the proper scale is an issue that you will run into when making your own maps. So we will now expand our map to that it is twice as wide and long-- 4092x4092 units. The easy way to do this is to un-group the six sides that make up your skybox. And move and re-size them until they cover a larger area. Making this change is good practice for learning how to seal leaks. You have to ensure that all the outside blocks that make up your skybox meet up perfectly in the corners so that there are no gaps.

Using the same steps as above we have expanded the example map, and added more terrain to simulate far off hills. We can then add more of the tree into the background areas. This extra space may still not feel large enough, but in reality it is plenty of space for zombies to spawn into our survival map.

Fog of Horror

Fog is a very important part of your Left 4 Dead map. Fog can set the mood of the map, give it depth, and also help to make it so your map doesn't have to be massive. To get fog into a map all you need is to add is the point entity: " env_fog_controller ". Getting fog to look "correct" can be tricky. A good method for making the fog look seamless is to set the color to a to a shade similar to your skybox texture. To determine what color to use I took a screenshot of my current map in game, and then used a color picker in a photo editing program to determine the color of the skybox image. In this case we chose a color close to the top of the skybox where the sky is dark. Our number ended up being "10 15 18 ". Ensure that " Fog Enable " is set to "Yes".

Set the fog start distance to a low number such as 128 , and set the fog end distance to a number around 900 . This should ensure that all the trees near the edge of the map look dark and silhouetted against the skybox. Silhouettes are an useful design feature in Left 4 Dead. Using them you can help guide the player, give the look of far off buildings or hills, and generally set a scary mood in your map.

Final Environment Touches

You now have a larger forest and fog that helps darken the trees in the distance. But you still can see a very hard edge where the terrain meets the edge of the skybox. Since we will never let the player anywhere close to this area, there is no need to use complex 3D trees to try and blanket the edge of the map. Instead you can use a 2D texture to simulate a larger forest beyond. Select the NoDraw texture , and then make a new brush object along the edge of the map. Set the length and height of the brush to 1024 , and the depth to a lower number such as 32 .

Open the Texture application and search for " Trees ". You will find a few different tree textures. Select the inside face of the brush and apply the new texture. Under " Justify " press the " Fit " button to make the new texture fit the brush. The texture scale should end up a exactly " 1.00 ". This will ensure the trees don't end up squashed or stretched to the point that they look bad in the game. Move the brush up and down until it looks like it naturally intersects the terrain. Inside the 2D view you can copy the brush easily by selecting it, and holding SHIFT while dragging the brush over to a new position. In this way you can create the look of more woods fully surrounding your map.

Func_detail Explained

Up until now our map has been one massively large single room with just six sides. The problem is that the new surrounding tree textured brushes will cut our single room into multiple pieces. This is due to the way Binary Space Partitioning works. In order to restore out large single room, we need to tell Hammer what objects in the world do not need to block the rendering of objects behind them. Any brush in the map that can block the players view and cut the map into more pieces is called a " World brush ". Since the trees we added have a partially transparent texture we can assume that they don't need to block the view of the player. These types of world brushes can be converted in to a func_detail . To convert them, select each of the tree textures brushes and then press CTRL+T . The default entity that shows up is " Func_detail ".

Using Func_Detail brushes properly can make or break the performance in a large map. Func_Detail should used anywhere there is a brush that is used to make a small detail, highly complex object, or does not significantly block the players view. For example: trim on a building, a pillar in the middle of a room, or a distant building. Func_detail brushes can also be misused. For example they will not seal a map from leaks. Since it doesn't block the rendering of objects beyond the func_detail if you were to use it for walls inside a building, the entire building might end up being rendered by the game engine no matter where you were inside of it.

Visible and Invisible Barriers

In order to prevent the player from running beyond the trees and off to the edges of the map you need to block the player from traveling into these areas. You can do this by placing both visual barriers, and invisible barriers. For our visible barrier we will start by placing a " prop_static " near the edge of the forest. Then change the model to a fence. We selected: " models/props/de_inferno/wood_fence.mdl ". We then copied the prop_static and rotated it until it surrounds my whole map. This gives the player a visual aid telling them they can't move past a certain point in the map. You should always strive to use a visual barrier of some sort when blocking a player in. An "invisible wall" alone is often frustrating for players who are suddenly stopped for no reason.

To place our invisible barrier we will use a special material called " Player Clip ". Player clip is a material that blocks the travel of any human-controllable players in the game. It doesn't block zombies, bullets, or physical objects. Select the Player Clip material and then make a new brush object that is the same thickness as your fence. Place the brush such that it covers the whole fence model. I make sure that my player clips run all the way to the top of the skybox. This way there is no way for a player to jump over the invisible barrier.

Clip brushes do not have to be converted to Func_detail. These and some other special materials are automatically converted by the compiler.

Load Up with Weapons

In order for your players to fight off the hordes of zombies they will need some weapons. Weapons are a point entity, and can easily be found by searching for the entity class: " weapon ". Place a few weapons near the player spawn. In the weapon properties set the count to 5 . This ensures the weapon will never disappear if all the players pick up the same gun.

Cube maps

A cube map is an important part of making a map look good. A cube map is a point entity that takes a 3D image of the world around it, and then maps this image onto reflective objects nearby. You typically place in the middle of a room, or near reflective objects such as glass or water. You should use them carefully as each cube map adds to the memory load of your map. A map requires a least one cube map. In our map we need only one for now, as we have only a single area, and light to worry about.

We have placed a cube map in the center of the map, about 200 units above the ground. Once you compile your map you enter the game console and type: " build_cube_maps " into the console. This will then take a series of screenshots and then exit the map. The cube maps are saved into the map file, and you only need to rebuild them if you make major changes to the map or lighting.

Unleash the AI Director

The Director in Left 4 Dead is a key component to making the game work. The Director is effectively the player's enemy in Left 4 Dead. It controls the zombies, panic events and special infected. It also is responsible for adding variation to each game. Adding the director to your map is simple, just place a new point entity with " info_director " assigned as the type. In the properties of this entity give the director a name. We simply gave it the name "Director". The "Name" of an entity is what allows the entity to be addressable object in the game world. This means that this object can be given input from another entity using the built-in "Input/Output" scripting system inside Hammer. In this case we will use another special object to tell the director to start the panic effect that sends hordes of zombies towards the survivors.

Triggering an Event

In order to trigger our game finale we need to place a object for the player to interact with. The simplest way to do this is to place a " trigger_finale " point entity. You can choose any model for this trigger, in this case we chose the commonly used ham radio model: " models/props/terror/hamradio.mdl ". But using this radio alone won't trigger a finale. You need to have the trigger_finale object tell the director to start the finale.

To do this, open the Object properties for the trigger_finale and select the " Outputs " tab. Press " Add ", then under "My output named" select: " FirstUseStart ". Then under "Targets entities named" select " Director ". Under "Via this input" select " PanicEvent ". Check " Fire once only " to ensure the panic event doesn't happen twice. If you want you can add a delay of a certain amount to this output. For example you could play a 5 second sound clip that tells the players to get ready. But for our basic map we will simply make it start instantly.

Force the Game Mode

By default, compiled maps are made to run in single-player campaign mode. But in order to test our survival map we need to tell the game our map is actually a survival map. We can do this by using another point entity that forces a console command on the server. Place a " point_servercommand " entity in your map. Give it a name, such as " Survival_activator ". Now you need to pass this entity actual console command. You do this by placing another entity called " Logic_auto ". A logic_auto entity can send out a command the instant a map is launched. In this case add an output with the following settings: My Output name: - " OnMapSpawn ", Target Entities: - " Survival_activator ", Via input - " Command ". Refer to the screenshot below.

Finally, inside the box labeled "With a parameter override of" enter the following console command: " mp_gamemode survival ". And again select " Fire Once only ". This will now force the game to run in survival mode any time you load this map. The director will detect this game mode and automatically convert the panic event into a "survival panic event" which sends our players a never-ending horde of zombies.

At this point compile the map and test that the survival clock shows up at the top of the game screen. You can also run around and test that the player can't leave the middle of the game map.

Zombie Navigation

If you activate the Ham Radio you may note that the survival timer at the top of the screen starts running, but no zombies actually spawn and start attacking you. This is because your map is missing a key ingredient: A navigation mesh . A navigation mesh is a grid that covers all the walkable areas of your map. It tells the game where the survivors, zombies, and special infected can travel. Because a survival map doesn't require the players to travel to a safe room, or any rescue points, the navigation mesh for a survival map is pretty simple.

To generate a navigation mesh you need to load your map in Left 4 Dead rather then in Hammer. Rather then re-compile your map, you can do this by simply opening Left 4 Dead to the main menu. Press "~" on your keyboard to bring up the console. In this console type: "map" and then press space, then start typing the name or your map. You can search for console commands in a similar fashion to the material browser. In our case the command is "map l4d_sv_cabin"

Now that you have your map loaded we need to generate the navigation mesh. To do this you first need to enable game cheats by entering: " Sv_cheats 1 " into the console. Then, enter navigation editing mode by typing in: " nav_edit 1 " into the console. You now need to tell the game where to start generating zombies from. Aim your gun at the ground beneath your feet, then open the console, and type in the command: " nav_mark_walkable ". A small purple pyramid should show up where you aimed. You can place multiple walkable points to tell the game that zombies can spawn on say the top of a cliff, but for now one spawn point will do.

From here, all you have to do is enter the console command: " Nav_generate ". The survivors and any zombies will be removed and the game will start a progress bar. Generating the navigation mesh can take a very long time depending on the complexity of your map. In our case the terrain can greatly complicate and break up the navigation mesh into many pieces. You don't have to generate a new navigation mesh each time you change your map, but there isn't enough room in this guide to cover all the various navigation mesh commands. We will be covering only a few basic commands here.

Once the navigation mesh finishes generating the game will reload your map, but the map will still tell you there are Nav Errors upon load. That is because the director is missing a few key navigation elements.

Basic Navigation Commands

The game director relies on the navigation mesh in order to determine where to spawn zombies, and where the survivors may potentially be located during an event. To pass this information onto the director you apply labels to areas inside your navigation mesh. Because our map is a survival map and is very basic, we need only a few commands to tell the director that our entire map is a "finale" area. Open the console and enter navigation edit mode. Then enter the command " z_debug 1 " into the console. This command shows you the labels of each area in the map.

To apply a label to all areas of your map: aim at a navigation area type in: " nav_flood_select ". This should select all the connected navigation areas in your whole map. Then enter: " mark finale ". This will mark each and every box with the "Finale" label. This tells the game that the survivors and zombies need to be in theses areas during the final event. In our case it happens to be the whole map. We need to add one more command to the whole nav mesh, so again enter: " nav_flood_select ", and then enter " mark battlefield ". This label is similar to finale and required for all of the survival map.

There is one last command we need to add in order to make our map work well. That is to tell the survivors that are not under human control, where to best hunker down for the fight. To do this we can mark the middle of our map with " mark BATTLESTATION ". The survivor bots will automatically be attracted to stand on these navigation areas if a human player is also near the same area. You should also make the area where the players start the game with " mark PLAYER_START ".

Visibility and Zombie Hordes

Zombies are spawned into Left 4 Dead using a few different basic rules. Don't spawn zombies if the players can potentially see the area the zombie spawn in. This prevents zombies from appearing to pop-up out of no where. Spawn zombies in areas that have more then one way in. For example, it doesn't make sense to spawn a horde of 50 zombies inside a bathroom right next to the survivors. Although that still sometimes happens. So the game often prefers to spawn zombies in areas that are either open to the skybox, or connected to other rooms in order to simulate that the zombies came from some other location beyond. The game also attempts to space zombies apart from each other, so larger rooms typically spawn more zombies then smaller rooms.

Because out map is a single large outdoor world the survivors can potentially see the entire map from any point near the middle. This causes a problem for the director as it doesn't take game fog into account when determining if the players can see a certain area. It only calculates line of sight. But our current fog settings are such that we can spawn zombies near the edges of the map without worrying if the players can see these zombies. In order to tell the game that it can spawn zombies inside an area, even if the player can potentially see this area, you can mark a navigation area with the command " mark OBSCURED ". In the case of our map you can move out to the far edges of the map and mark the larger navigation areas as obscured. If you can't move past your player-blocking Clip Brushes, you can enter the console command: " noclip " in order to fly across the map.

Analyze Navigation Paths

The last step before the director can start spawning zombies into the map it needs to analyze all the various labels and changes you have made to your map. To do this enter the command: " nav_analyze " into the console. You need to do this command after making any changes to your map or navigation mesh. This step should be shorter then the nav_generate, but can still take some time on complex navigation meshes. Once the analyze program finishes, exit nav edit mode by typing in: " nav_edit 0 " and " z_debug 0 " into the console. Exit cheats mode by typing in " sv_cheats 0 " into the console. Then exit the map by going to the main menu.

Run Your Map!

Your map is now 100% playable. You should be able to load it from the console, start the finale trigger, and start fighting off zombie hordes.

The next two parts of this guide will show you how to use SketchUp to build and import a realistic looking cabin and a wooden barrel into Hammer, completing your "cabin in the woods" map.

Part 2: Make Google SketchUp Compatible with Hammer

Now that you know how to make a basic Left 4 Dead map, we will cover how to properly setup SketchUp so that you can quickly model and export to Hammer. Most of the steps in this section need to be done only once. We will also cover how to import your first basic 3D model built in SketchUp.

SketchUp versus Hammer Modeling

While an experienced Hammer user could easily make a wooden cabin inside Hammer using brush entities, there are some big advantages to using SketchUp to make your building models. The following is a list of just some of the advantages of using SketchUp to augment your maps:

• Ability to match real world buildings, objects and locations with 1:1 scale.
• Build complex shapes which are impossible to model in Hammer alone.
• Seamlessly join custom static models with world brushes.
• Use components to create re-usable, re-editable copies of game geometry.
• Use groups, components and layers to more easily manage a complex map.
• Create angles that are impossible with the Hammer vertex edit tool.

Introduction to Google SketchUp

SketchUp is a freely available 3D-modeling program from Google. SketchUp was originally designed as a program for quickly modeling building architecture. SketchUp is a fairly unique 3D modeling program, in that in order to draw 3D objects  you simply draw 2D shapes using lines, squares, and circles, and then extrude or cut into these shapes to make 3D objects. For that reason, it is a quick and easy to learn program, compared to professional modeling tools.

The SketchUp help system has links to getting started tutorials and video tutorials on more advanced methods. The tutorials on making building models for Google Earth particularly apply to making game ready models. We highly recommend reading and watching these tutorials before diving right into game modeling. For the sake of this article we will assume you know how to draw basic shapes and use the extrude and cut tools.

Pairing SketchUp with Hammer's Scale

When you first launch SketchUp, it will ask you to choose a template to use as a default. We will be making our own default template so that when you make a new file in SketchUp it will always be ready to import into Hammer. For now choose: " Engineering - Feet ".

SketchUp starts with single basic tool set, this can often limit users to thinking that this is all SketchUp has to offer. We recommend setting your toolbars up with at least the following toolbars enabled: " Large Tool Set ", " Face Style ", " Standard ", and " Views ".

You should now have a windows similar to the image below. With a two dimensional man standing near the axis of three lines. These three lines show you the origin of the SketchUp world. This origin is similar to the one used inside of Hammer. It becomes even more important when making models. But for now let's continue setting up our template. Delete the 2D man from the SketchUp world, as we will not need him.

We now need to setup the units we want to use inside SketchUp. When you export a model from SketchUp to Hammer 1 inch in SketchUp ends up becoming 1 unit long in Hammer. So it makes sense to use inches as our default units in SketchUp. To setup your units open the " Model info " window. Then select " Units ". Set the following settings: Format: " Decimal, Inches ", Precision: " 0.00 ", Enable length snapping: " 2.00 ". The length snapping setting is a critical setting in making models line up in Hammer.

You should always strive to make your models accurate to the inch without any fractional dimensions. This will ensure a model you make in SketchUp can line up in Hammer with out leaving gaps or overlap. The length snapping setting is similar to the "snap to grid" setting in Hammer. You may want to change often when working on large or small models. Before you close the model info window select " Statistics " then press " Purge Unused ". The purge unused function helps to eliminate components and materials that are not in your active model, but still associated with the file. (like the 2D man you just deleted.)

Every 2D face in SketchUp has two sides, a " Front " side and a " Reverse " side. When exporting VMF brushes into Hammer only the "Front" faces are valid. In fact, if any reversed face has a texture, or is visible from the outside the export operation will fail. By default SketchUp gives reversed faces a light blue color, this can make it hard to spot reversed faces and correct them before you export your model. So we need to tell SketchUp to use a more prominent color. To do this open the " Styles " window. Change the style list to " Default styles ". Select the " Engineering " style. Then select the " Edit " tab. Press the second small cube button labeled " Face ". Then change the " Back Color " to a bright Magenta color. We chose this color as it is not often used, and is also similar to the texture error color used in Hammer.

Now give this style a new name such as "Left4Dead Editing". Then press the " Make new Style button " to save your changes.

Our basic template is now complete. In order to save our template select "File" then " Save as Template " from the main menu. Give it a name such as "Left 4 Dead Template". Check the " Set as default template " box to make this our default working template on new SketchUp files.

If you want you can add more to this template such as basic shapes, texture references, or other objects you may commonly use.

Making Basic Shapes in SketchUp

We can now make a very basic cabin in SketchUp. This first cabin will be just a prototype for our more complex cabin. Using a prototype allows you to quickly block out basic objects without having to commit lots of time into modeling a more complex object. It can also give you a better sense of the scale of your final building inside the game. We will model this prototype cabin in both Hammer and SketchUp at the same time. This will give you a better sense of how groups in SketchUp and Brushes in Hammer interact. You should end up with two identical cabins in the end, one made in Hammer, and another made in SketchUp.

Start by opening the map you made earlier in Hammer. Choose " dev/dev_measuregeneric01b " as your default texture. Then make a brush that is 256 x 512 x 64 units big, centered around your origin, and sitting about 12 units above your terrain.

Now to duplicate this brush in SketchUp we simply draw a face that is 256 x 512 inches big, and then pull it up by 64 inches. Then select all the faces of the block, then right click and select " Make Group ". A group of faces in SketchUp works out to be a single brush inside Hammer.

You can make very complex shapes inside SketchUp, but when exporting to VMF brushes in Hammer, they must still follow the same rules that brushes in Hammer do. That is they need to be solid with no gaps, and convex in shape. Since this is a simple block, we have no problem.

Jump back into Hammer and we will make the body of our cabin. Do this by making a copy of the foundation and changing it such that it is 128 units tall. We then re-textured the block using " dev/dev_measuregeneric01 " to give is a different color than the foundation block.

To duplicate this in SketchUp: select your first group, press " M " to enable the move command, then press " CTRL " to enable the copy command. Now click on a starting point, such as the corner of the block, and drag the mouse up such that the block sits on top of the first.

Now double-click on the new block to enter the group and start editing the faces inside. Select the pull tool and start pulling on the top most face, before you click to place the face, type " 64 " into the keyboard and press enter. This makes the block 64 inches taller. Since it was 64 inches before we started we can just add 64 more inches to the block. You could also make this new block by drawing a new block from scratch and grouping it similar to the way you made the first one. Press Escape to exit editing the group.

Now back inside Hammer lets make the roof of our cabin. Again copy the block from the bottom of the cabin. Then enter the vertex edit tool by pressing " SHIFT+V ". The block should change to show a set of control points. Inside the " Front X/Y " 2D View, click on the control point in the upper left hand corner.

Then drag this control point until it is centered along the top line. Repeat this for the control at the upper right. Hammer should prompt you to merge the vertexes. This means that it removes the top face, as the sides have not met to make a triangular brush. Exit the vertex edit tool. You should end up with a sloped roof over your basic building shape.

To duplicate this in SketchUp: Draw a new rectangle over the top block. If the face is drawn as "reversed" then right click on it and select " Reverse face " to correct it. Then draw a line that runs from the mid-point on the face to the other mid-point across the face. Select this line, and then select move tool, and start dragging the line upwards.

The line may start to move in a direction you don't want. We want this line to simply move directly upwards by 64 units. You can force the line to move in only one direction by pressing an arrow key on the keyboard. So in this case we will press the UP arrow on the keyboard in order to lock the move direction. Click to set the line in its upward direction, and type " 64 " and press enter to set the height to 64 units.

Since you moved the center of what was a two-dimensional face, the bottom of the face is no longer there. This ends up looking like a tent rather then a solid block. To make it a solid block simply draw two lines between the ends of the sloped roof to complete the shape.

SketchUp automatically fills in faces as you draw lines. Using this method you can quickly make complex shapes. In order to more easily group our faces you can triple mouse click on any of the connected faces. This will select every other connected face. The right click and select " Make Group " to make these into a block.

Since the cabin is a single building in our game we can group the three smaller groups in SketchUp into a single larger block. To do this select the first block, press and hold CTRL and select the other two block. Then right click and select " Make Group ".

This is all we will be doing for the actual geometry or our prototype cabin.

Importing the Model into Hammer

Before we worry about texturing this cabin lets import the geometry into Hammer just to test that everything is working. Select your group. Then select " Plugins " from the main tool bar, and then " Export VMF ". Save this VMF file to a new folder and inside your " Left4Dead\sdk_content\mapsrc\My_First_map " folder. We named ours "prototypes\Prototype_cabin.vmf". If you receive errors, see the "Errors and Fixes" section later in this guide. If successful you should hear a short ping sound.

Switch over to Hammer. Open your new VMF file the same as if you were opening another map. You should end up with a map that has your prototype cabin, along with a few basic object such as player start and a environment. Since the cabin was grouped before export you can select it and copy it into your "cabin in the woods" map. You do this by simply pressing CTRL+C to copy, CTRL+TAB to switch to your main map window, and CTRL+V to paste the cabin. You may need to rotate it and tweak its overall position, but you should end up with two identically sized cabins in your map, one made in Hammer and another made in SketchUp.

The geometry for this example was very basic, and may have taken you a longer amount of time to make in SketchUp then in Hammer, however when making complex geometry SketchUp can work much faster then Hammer alone.

You can apply a bit of texture to your imported cabin and compile the map to get a sense of the scale of the building.

Errors and Fixes

If you receive errors double check that your model doesn't have any missing, reversed faces or concave geometry. Because the Hammer exporter expects a VMF file to be nothing but solid convex groups of faces, it will spit out errors under a few different conditions:

• If a reversed face is exposed on the outside of a group you will either get an error, or the face will show up as invisible in the game.
• If you have a material applied to any reverse face you will get an error.
• If a line is left unconnected, or doesn't connect at a corner with at least two other lines then you may get an error.
• If a shape is concave in shape you may get an error.
• You cannot apply materials to a whole group, you can only apply materials to faces inside a group.
• Finally once you start making very complex brush work you may get errors that are hard to find. In those cases we recommend exporting your brushwork in smaller chunks.

Error-Correcting Plugins

With the help of some users from I have written some automatic error correcting plugins. The plug-in has a single command " Clean-up model ". But this plug-in does a whole host of functions across your entire SketchUp model.

• Attempt to find and correct single reversed faces.
• Remove stray lines.
• Remove co-planer lines.
• Merge any split lines that can be replaced by a single line.
• Remove any materials applied to reversed faces.

You can download the plug-in from here.

Install the plugins into the SketchUp plugins folder in the same was you installed the Valve SketchUp Plugins. Restart SketchUp so that the new plugins will be enabled.

In-Game Textures and SketchUp Textures

Both Hammer and SketchUp can apply textures and images to a 3D model. The difference is how they handle these textures. This article is not long enough to cover how to convert new textures to work in Hammer, so instead we will actually be using textures that are already inside of Hammer. Currently our prototype cabin has just two textures:

" dev/dev_measuregeneric01b " and " dev/dev_measuregeneric01 ".

If you want to simply refer a surface in SketchUp to a material inside Hammer, all you need to do is give the material in SketchUp the same name you would in Hammer.

For example if you make a new material in SketchUp and name it " dev/dev_measuregeneric01b ", when you export it to Hammer that texture will be applied to the surface rather then the default gray grid. However wouldn't it be great to simply have the whole library of materials from Left 4 Dead already in SketchUp and easy to apply? Importing all the textures can take some leg work, but will save you lots of time as you make new models.

This part of the guide is a bit more advanced then what you have done so far, but keep in mind that the ability to manipulate files and run scripts is going to be necessary as you start making more complex maps.

All the Left4Dead game textures are locked inside the compressed file: " pak01_dir.vpk " inside your Left 4 Dead directory. In order to extract them you need a program called " VPK extraction tool ".

Download the VPK extraction tool from here.

The VPK that contains all the textures is very large once extracted, to make sure you have enough room on your harddrive.

Run the VPK Extraction tool, press " Extract ", then navigate to your " Steam\steamapps\common\left 4 dead\left4dead " directory and select: " Pak01_dir.vpk ".

Next it will ask you where to save the extracted files. We recommend saving these to a new folder somewhere on your harddrive. We saved ours to "C:\Left4Dead_VPK"

It should take a few minutes to extract all the files.

Once you extract all the files you should have three folders inside your "C:\Left4Dead_VPK" folder. The only folder you need to keep is " materials ".

If you would like to preview the materials inside of windows you can install the program: " VTF Shell extension " available from t his site .

There are a lot of images used in Left4Dead that are useless to you in SketchUp. Specifically images used to generate normal maps and spectral maps. You can easily delete those by writing a small batch file. A batch file is a simply program that run though a set of command prompt instructions. In order to make this batch file open windows Notepad, and paste the following into a new file:

del /s /q *ssbump.*
del /s /q *_normal.*
del /s /q *_ref.*
rd /s /q console
rd /s /q decals
rd /s /q detail
rd /s /q editor
rd /s /q effects
rd /s /q engine
rd /s /q fx
rd /s /q graffiti
rd /s /q hlmv
rd /s /q liquids
rd /s /q overlays
rd /s /q particle
rd /s /q shadertest
rd /s /q skybox
rd /s /q sprites
rd /s /q sun
rd /s /q vgui
rd /s /q voice

Save this file as " C:\Left4Dead_VPK\materials\CleanupFiles.bat ". Ensure that you select " Save as type: All Files (*.*) " so that Notepad doesn't tack on a ".TXT" extension. Now run this file from your "Left4Dead_VPK\materials" folder. This will eliminate all the various materials and files that we do not want to import into SketchUp.

Once you extract the textures, each will be in their own induvidual "*.VTF" file. To convert the texture to a format usable in SketchUp you use another program called " VTFEdit ". VTFEdit can be downloaded from here .

Launch VTFEDit and select " Tools " then " Convert folder ". Select your "\Left4Dead_VPK\materials" folder as both the input and output folder. Choose " .TGA " as the output format. Check " Recursive ", then " Convert ".

It can take a very long time to convert all the files, and the program may show up as "not responding", however let it run until it shows up as complete. As it runs you can actually start checking inside various folders inside of "\materials" and you should see new .TGA files showing up.

Once complete, every .VTF inside the materials folder should have a .TGA file associated with it.

Note that some valve made textures have special Alpha (transparency) maps that you may have to remove in order to have the material show up correctly in SketchUp. Most of the brick textures use this special Alpha map. You can remove the special alpha map in a program such as Photoshop or GIMP.

In GIMP: Open the .TGA file, then select "Layer", then "Transparency", then " Remove Alpha Channel ". We recommend doing this step for most of the brick textures. Also note that most VTF files has a VMT file with the same name. The a VMT file, or " Valve Material Type " is simply a small text file that tells the game engine the properties of the material, such as its base texture, normal map, and spectral map.

In order to make importing materials from Left4Dead into SketchUp we have written a special SketchUp plugin just for the job. This can save you hours importing single materials and getting them named and scaled properly.

You can download the plug-in from here.

Install the plugins into the SketchUp plugins folder in the same was you installed the Valve SketchUp Plugins. Restart SketchUp so that the new plugins will be enabled.

Before you start importing materials you need to make a new SketchUp file that is 100% empty. Run the " purge unused " command again if you want to ensure that no models or materials are associated with the new empty file.

Now open the materials window by selecting " Window " then " Materials ". Change the material set to " In model ". There should be no materials currently associated with your model. This gives us a nice blank canvas to start using to import all those Left 4 Dead materials into SketchUp.

To import a folder of materials from your "C:\Left4Dead_VPK\materials\" folder select " Plugins " then " Source SU Tools " then " L4D Import Textures ". The first time you run this plugin it will prompt you for your root materials folder. Navigate to your "C:\Left4Dead_VPK\materials\" folder and select any file inside, such as your cleanup.bat file. This sets the "Root" folder that the script will use when naming imported materials. If you mess up or want to select a new root folder then run the " L4D -Reset Root Folder " command.

Next the script will prompt you for a folder to import. In this case we are going to select a file inside " C:\Left4Dead_VPK\materials\wood ". The script will take a few seconds to run.

Once complete you should see a whole list of materials inside your material window. If you select one you should note that the material name is the same as the name inside of Hammer. For example " wood/barn01 " in both SketchUp and Hammer should now look identical.

These new materials are currently only associated with the empty SketchUp file we made, so we now need to save this folder of materials as a new re-usable library. To do this press the small arrow at the right of the material window. Then select "Save collection as". A window will prompt you where to save this library.

In order to make this library accessable with any new SketchUp file we need to save it inside the default SketchUp library folder. By default this is located at: " C:\program files\google\google sketchup 7\materials ". In here make a new folder called " Left4Dead " and then another called " Wood " and saved the library there.

Repeat this for each of the Left 4 Dead materials folders and you should have a whole library of easily accessible materials that work in both SketchUp and Hammer. It should be noted that the materials you just imported are copyrighted property of Valve software. You should not share the library with anyone who does not own Left 4 Dead, and you should not use these materials in files you upload to the Google 3D Warehouse.

There is plugin function we should at least note here: " Apply current material ". This function will apply what ever material you have currently selected to any left over default or blank faces you have in your model. The primary purpose of this plugin is to apply " NoDraw " to any textures surfaces.

Part 3: Making Buildings in SketchUp and Exporting to Hammer

The three images above are an example of what you can do once you learn how to use SketchUp and Hammer together. The first image is photo of a real-world movie theater. The second is an image of the theater model in SketchUp after only about a day of modeling. The last image is the completed Left 4 Dead map. It took about six weeks to model the entire theater inside and out and tweak all the gameplay elements. It would have taken much longer without SketchUp.

Now, we are going to show you how to make a more complex building. We will be making the wooden cabin for our "Cabin in the Woods" map.

Collecting Reference Photos

We wanted to base our cabin of a real world building. We wanted the cabin to be about the size of the prototype built earlier, with room inside for at few different rooms. In order to get reference images to use we can search Google Images or Flickr. We then download and collect images that feature things we want to have in the cabin, such as a particular type of window, arch, or roof. In this case we want my cabin to look a run down. So we searched for both "wooden shack" and "wooden cabin".

Photo credit:

The cabin we chose to model isn't too complex. But since there are images from multiple angles, we can use it as an example on how to use the match photo tool in SketchUp to make models based on real world locations.

Importing from Google Earth

If your real-world location is large enough you can use import a satellite photo from Google Earth directly into SketchUp. This can give you the scale of a building, and the rough outline. We can't use this for our cabin as we are going to instead use the reference photos as a starting point, and edit the model from there.

Game Scale Compared to Real-World Scale

Keep in mind that while 1 inch in SketchUp works out to be 1 unit in Hammer, the reality of the scale of the characters and other objects in the game isn't exactly 1:1. In all actuality the game world is about 30% bigger then the real-world. This means that 16 Units in Hammer work out to be about 12 inches in the real world. A simple way to model in SketchUp is simply to set your grid to factors of four. Such as four, eight, sixteeen, thirtytwo. Keeping in mind that sixteen inches in SketchUp works out to about a foot in Hammer. Making prototypes and testing is really the best way to ensure that your SketchUp models are the proper scale for your game.

Using the SketchUp Match Photo Tool

Since we have a few reference photos of the cabin we can use the SketchUp match photo Tool to help model it. To start using the tool you need to first make a basic block, something you think it about the right size for your building. In this case we are going to try 256x512 , the same as our prototype building. This time we are leaving the corner of the block at the origin in SketchUp. This is going to become my point of reference to compare against the photo.

Next we pull the plane into a tall block.

Turn on the match photo tool by going to "Window" then " Match Photo ". Next hit the plug (+) button to add a new photo to match. We are going to select a primary photo that shows most of the building. Your photo should end up sitting behind your model, along with two red and two green lines, and a larger origin marker. Turn off the model view by pressing the " Model " check mark in the Match Photo window.

Move the origin to the corner of the building where it meets the ground.

Then move the green and red lines such that they line up with some straight line on the building. Setting these up tells SketchUp the how the perspective of the photo maps to the model.

Now turn the model view back on. You model should be now be much closer to the perspective of the photo. In order to set the scale of the model to match the photo you simply grab the vertical blue axis and drag up and down until the box you made closely matches the size in the photo. In our case we made it so the width of the building matched the width of my block.

The photomatch tool has a great feature that actually projects the photo your using onto your 3D model. Once you setup the scale of the block just press the " Project textures from photo " button in the Match Photo window. Then press " Done ".

If you rotate the model the photos should stay on the sides of the block. They may be a bit skewed, but should work well for our needs.

Now use the push/pull tool to lower the top of the block until it reaches the top of the roof line in the photo. Do the same with the back of the building. Ensure that the final dimension you settle on is on the grid. If SketchUp says something like " Offset Limit " this is because it put hidden lines at the edges of the photo. You can see these lines by selecting: "View" then " Hidden geometry ". Then using the paint tool and ALT+Click on the photo and paste it above the line, such that both sides have the same material. Then erase the hidden line.

Fix the Roof Line

The roof line in our reference photo is off-center compared to my model. This is because the roof covers a small balcony. We return to the "photo match" view by pressing the tab at the top of my SketchUp window. We then draw a line at the balcony bottom and then pull it out to meet the depth of the balcony. The roof line should now be much closer to center. Then using the draw and pull tools we cut away the top of the roof.

Doors in Left 4 Dead

Doors are one of the best ways to get a sense of scale. In Left 4 Dead, all door openings are 104 units high x 56 units wide. So on the front of my cabin where the door is we can simply draw a rectangle of that size, starting at the corner of the door.

As you can see the door in the real-world is a bit taller, but just about as wide as a Left 4 Dead door. Then push the door inwards by eight inches . This is the thickness we will use for our building walls.

Open Up a Window

There are many different ways to make windows in Hammer. You could use a 2D Decal for distant or high windows. You could make the glass and trim using VMF brushes. You can also use a static model. We are going to use a combination of Brush work and a static model.

Left 4 Dead has a 3D Model called: " models/props_windows/window_urban_apt.mdl " which looks very similar to the windows in our reference photo. By placing this window into Hammer as a static prop We can get the overall size of the window cutout We need in our cabin. This works out to 57 x 75 inches. Again, starting at the corner of our in-photo window We draw a rectangle that is 57 x75 inches, which again works out to pretty close to the real-world window. Using the offset tool in SketchUp we make a border around this window. We again push the window in by 8 units.

Add The Balcony

Since the balcony uses a bunch of nearly identical boards we choose to use a component in this area. A component allows you to edit one group and have all other copies of the same type of component edited at the same time. This can be a huge time saver rather the copying a unique group each time. You can even mirror components to make a symmetrical model.

The balcony is then finished using a series of groups that are each just simple blocks. You have to balance your modeling speed alone with trying to create VMF style groups of brushes at the same time. Using nothing but simple blocks, we are able to model the balcony in just a few minutes.

Painting Textures

Once you have the major features of your photo mapped out in rough form you can now apply existing Left 4 Dead materials to areas. For example the walls, roof and balcony.

Here is our model after applying textures that are already in Left 4 Dead to the surfaces. The model even looks like you could export it to the game right now, but actually it is not game-ready yet.

Converting Non-VMF models

Some part of our model, such as the roof and balcony are made using solid convex groups. But most of our model is currently in a state where it won't export because the walls don't conform to the rules of a VMF brush. To start converting blocks we are going to first look at our model and decide the best way to cut it up into blocks. For example, each window will have four blocks surround it such that the window is left as a opening in the wall. Because the building will be hallow we know that each side of the building will be its own wall.

If we make the non-VMF ready geometry a group we can isolate and work on just this section of our model. To do this select " View " then " Component " then " Hide rest of model ". This will help us to focus on just one area at a time.

What is left of our model is just a shell with two dimensional walls and cutouts where the windows should be. We are going to select the two faces that make up the side wall and group them so we can again isolate just them.

We then look at the 2D surface and determine the best way to cut this up into the smallest number of 3D brushes. We draw lines between various points until we are left with nothing but convex 2D shapes. We then group each individual face on their own by double-clicking on the face and then right clicking and selecting " Make Group ". It should be noted that when you use this method you can end up with a lot of left over lines that can split up face when you pull them out. At this point we run our " CleanUp Model " plugin in order to remove these lines before they cause trouble.

We then pull each of the two dimension groups into a three dimensional shape. Again using 8 inches as that is the thickness of our walls. You may loose your textures depending on whether your push or pull on the surface. These textures actually can end up on the reverse sides of the 3D block. Again the clean-up plug-in can remove these automatically. In our image we have re-applied the materials to the blocks. Our once two-dimenional cut up wall now conforms to the rules that a VMF brush in Hammer requires.

We do the same for all the other walls and components in our model, such that every group is made from convex blocks. Running the clean-up plugin liberally to keep things in order as we work. Once you get the method down a model can be converted pretty quickly. It took us only a few minutes to convert the rest of the model and make it ready for export.

We now have a basic cabin shape that can be exported and tested in the game. If you get errors saying something like "5 Solids did not load due to errors in the map", look at the model in Hammer and look for any missing pieces. Then, go back to SketchUp and try and figure out why that particular group failed. The most common reasons are a missing face , reversed face , or stray line .

Touching Up the Textures

When you apply materials in SketchUp the material position is references on a per-group basis. But since you have multiple groups making up walls you sometimes have to correct the position of some textures. We prefer to do this in the exported VMF file rather then our master map. This is easily done by just selecting the material tool, ALT+Right-Clicking on a one face, and then Alt+Left-Clicking on each mis-aligned face.

Func_detail Entity Brushes

We are going to leave the outside walls of our building as world brushes , but convert most of the rest of the building into Func_detail entity brushes . This is because out building is tiny with lots of windows. If it were larger we would seal off the building and use AreaPortals at the windows and doors.

Import the Cabin into your Master Map

With the model complete we can import the cabin as a single-grouped object into our map. From here you can add lights, props, ladders, anything that sells the theme of the map. Make sure and re-generate your navigation in order to take into account the new building.

Part 4: Crafting Custom Objects in SketchUp

So far you have been making VMF Brushes in SketchUp, but SketchUp can also make static models. These are props, scenery, and other objects you can import into the game. You can make static, breakable objects, and physical props easily in SketchUp. In order to fit the theme of our "cabin in the woods" map, we will be making a large wooden barrel that can be given physical properties and thrown around in the game.

Model Objects vs VMF Brushes

Making a model for export to Hammer is a bit different then making VMF Brushes . For one, you are not restricted to using just convex blocks. You can actually use any geometry you want to make in SketchUp.

This includes single faces, two dimensional geometry, and concave geometry. This gives you a lot of freedom, but you should strive to make the best looking model you can while keeping the number of faces in your mode and texture count to a minimum.

Gather Reference Photos

If is tempting to start simply making your barrel from scratch, but we encourage anyone making a model a of a real-world object to always first search for reference photos and dimensions. This is often easily done with a simple search of the internet. Search Google and Flickr for reference photos and dimensions. It usually only takes minutes to collect a few photos and start modeling. We did a google search for Oak Barrel and found a good profile image of a barrel. This basically all we need to know is where to put the metal bands and how curved they are.

Box-Method for Making 3D Models

If you're lucky enough to find reference photos that are from a single facing, such as the front or side of an object, you can apply these photos to a box and start modeling simply by applying those photos to a scaled box and then tracing and cutting into that box. You can also use the SketchUp photo-match tool to help match reference photos to a model. we have a nice side-view image so all we need is the rough dimensions of a wood barrel. Which works out to be between 24 and 28 inches at the widest. Since we want to scale them up a bit we will use 32 inches.

Also since we are modeling a round object, we are going to draw a single profile for the side and lathe it around into a circle.

Model Your Object

Since a wooden barrel is made using curved planks of wood, we can make our model using a series of components places in a circle. However because this object is going into a game we need to ensure that we don't use too many faces and edges to make our model. So lets start by placing a curve that will setup our first curved plank. Before you start drawing the curve in SketchUp you can enter the number of lines in the curve . This will set the complexity of your curve. Since the barrel is supposed to be gently curves we will use the default of 12 lines with a depth of 4 inches .

We then draw some tiny triangles into the curve to setup the metal bands.

Since the barrel is symmetrical we can we then erase the other three quarters of the barrel, and draw a circle below the center of the barrel.

We select this circle, and then click on the " Follow me " tool. Then click on the face of the barrel to lathe it into a circle. And finally copy that down to make the bottom.

Add Texture to the Object

Since our barrel is mostly made from wood we can re-use an existing in-game materials. However Left 4 Dead uses different materials for models then for VMF Brushes. You can find these materials under the model folder . Since SketchUp does not have a material search tool, we will often find a material inside hammer, and then look for or import that material into SketchUp. For the wood we found a good material named " models/props_exteriors/wood_railing001 ". And for the metal we used: " models/props_exteriors/wood_railing001 "

We then make this model a component with the name "Oak Barrel". In order to set the center axis of the model we need to first find the center of the barrel. This is easily done by drawing a line across the bottom from one side to the other. We then right-click on the component and select " Change Axes ". We use the line we drew as a reference to the center of the prop. The axis of the component in SketchUp is what sets the rotation axis and placement of the prop in Hammer.

Make a Collision Model

Models used in Left 4 Dead have at least two components: A visual model , and a collision model . The collision model is an invisible part of the model that determines how the physics engine int he game will interact with the model in game. There are a few requirements for any collision model:

• Every group inside the collision model must be convex in shape, the same as for a VMF export.
• 100% of the collision model must have the same material applied to it.
• The collision model must be 100% smooth.
• Finally the model can't have any two dimensional faces, un-connected lines, or split lines.

A collision model is made in the same manner as a VMF model, in that any component of the collision model must be made from a convex group. You can group together multiple convex objects to make a more complex physics model. Keep in mind though that the more complex your physics model the slower the object will perform in game. For our barrel we will use a physics model that is just complex enough to ensure that the barrel can roll on its side. In the case of the barrel we can do this with a single convex group of faces, but this time we will use only 6 lines to make the curve, and only 12 lines to set the circular shape.

We then select all the faces and right click and select " Soften/Smooth Edges ". A new window opens up to set the angle to soften. Because we need the model 100% smoothed all you have to do is move the slider to the maximum setting. Keep in mind your collision model and visual model need to have the same relative axis for the component.

The collision model, not the visual model, casts the shadows for an object when the map is compiled. Real-time shadows such as the flashlight are cast from the visual model.

Compile Your Model

Using the Valve plugin you can export your model to SMD. we chose to save ours to " \Steam\steamapps\common\left 4 dead\left4dead\modelsrc\Oak_Barrel.smd ". Then do the same for the collision model. We named the collision model " Oak_Barrel_COL.SMD "

Make a .QC File

A .QC file is a text file that tells the compiler what models to load and some properties of the object. There are too many different commands to cover here. But since our model is simple we need only the following text in the .QC file:

$modelname "ZapWizard\props\Oak_Barrel.mdl"
$body mybody "Oak_Barrel.smd"
$surfaceprop wood
$cdmaterials ""
$sequence idle "Oak_Barrel.smd"
$collisionmodel "Oak_Barrel_COL.smd" { $mass 400 $concave }

The $modelname command tells the compiler where to save your model. In this case it iwll be saved in: "\left 4 dead\left4dead\models\ZapWizard\props\Oak_barrel.mdl"

The $body command is the name of your visual model.

$staticprop is a flag that tells the game this object doesn't have to always have physics applied, it can be a unmovable prop in the game.

$surfaceprop tells the game what type of material this is. This sets the sound bullets make on the surface.

$cdmaterials allows you to change the search folder for the material names. Since we are using default materials we can leave this blank.

$sequence tells the compiler if there is any animation in this model. Ours doesn't so we only have a " Idle " animation.

Finally $collisionmodel i s the physics model that you also made. This command has a few sub-commands in brackets. One sets the mass to 400 , making our barrel nice and heavy for use with the tank. The other tells the compiler that this object could be concave in shape, even though our collision model isn't actually concave.

Save this .QC file to the same " \modelsrc " folder you export the SMD files to.

Use GUIStudioMDL

In order to make compiling easier we highly recommend using a graphics front-end for the Left 4 Dead model compiler.
We will use GUIStudioMDL , which is available here .

Open your .QC file inside GUIStudioMDL and compile your model.

To preview your model: open the Left 4 Dead Authoring tools and select: " Model Viewer ".

You should be able to open your model and see it from all angles. If you get a black and purple checkerboard pattern, that means your material names were not correct. You can preview the collision model by pressing the " Physics model button ".

Load the Model into Your Map

If all is good you can load your model just the same as any other prop in Left 4 Dead. In this case either prop_static if you don't want it to move, or prop_physics if you do want it to move. Inside of prop_physics settings you can even set it up so only the Tank Boss Infected can send the barrel flying.

Note if the props don't show up in prop_physics, try prop_physics_multiplayer .

You now have the skills to build a Left 4 Dead map and populate it with buildings and objects crafted from real-world photos in Google SketchUp. Hopefully this guide wasn't too daunting, and please share links to some of your creations in the comments section below!

Around the web

by CPMStar (Sponsored) Free to play