L4D Level Design/Visibility

Jump to: navigation, search

[edit] Visibility

The file extension for the maps that are compiled is .bsp. BSP stands for Binary Space Partitioning. Basically, the engine only needs to draw areas of the level that the player can see. This helps with the performance of the level (how fast the frame rate is). To do this, the engine cuts up the level into chunks called leafs. If the player is standing in a leaf that sees into another leaf, then that leaf is drawn. Regular brushes determine where the leaf cuts get made. Brush entities, such as the func_ladder that we created in Part 2, do not determine where cuts are made.

So why would you not want brushes to cut up the level into more leafs? If you have more brushes that cut up the level, the engine has to do more work to calculate visibility.

In short, any brush that you create that will not block visibility effectively should be a brush entity called a func_detail.

[edit] Creating a Platform

Sticking with our level called tutorial02, let's create a platform that extends the upper floor where we created our ladder.

Duplicate the back wall brush that we extended out to create the upper story in the last tutorial and reshape it to be a platform that extends out from the upper story on one side.

It should be 368 units wide, 176 units long, and 16 units deep.

Duplicating a wall brush to make a platform.
Duplicating a wall brush to make a platform.

Feel free to retexture the bottom of the platform so that it matches the ceiling and floor.

Texturing the bottom of the platform.
Texturing the bottom of the platform.

Now, go to Tools > Tie to Entity or you can press Ctr+T.

Selecting Tie to Entity from the Tools menu.
Selecting Tie to Entity from the Tools menu.

The default Class for a brush entity is func_detail.

Creating a brush entity with the default Class.
Creating a brush entity with the default Class.

If you see something else under the Class drop-down menu, you will need to change a setting in Tools > Options

Selecting Options from the Tools menu.
Selecting Options from the Tools menu.

Make sure the Default SolidEntity Class field is set to "func_detail".

Setting func_detail as the Default SolidEntity Class.
Setting func_detail as the Default SolidEntity Class.

That's it. You're done! You just created a brush that will not cut up the bsp into more leafs.

Save the file as "tutorial03.vmf", press F9 and click on the OK Button to run it in the game.

Image:note.png Note: Make sure you have the file "tutorial03.nav" in your left4dead\maps directory. This file is located currently here: \pages\downloads\tutorial03.nav

[edit] Good Candidates for func_detail Brushes

So how do you know to make a brush a func_detail or not?

Details such as:

  • Columns and Beams
  • Trim
  • Frames
  • Small Platforms
  • Posts
  • Furniture
  • Trusses
Image:note.png Note: Remember that your level has to be completely enclosed to compile correctly and to make use of the visibility work the engine does. Therefore, no brush that seals the level should be a func_detail. This will create a hole to the outside.