introduction to editing

Building Blocks: foundation of 3D design

Blocks. Wedges. Cylinders. Spikes. These are the solids given to you to work with. You can carve 'em, clip 'em, and manipulate 'em. You can combine these solids to make any shape possible, real or imagined. This is known as constructive solid geometry (CSG) and this is the editing style Worldcraft uses.

When using these objects (also referred to as brushes) it is best to think of them as solid material. A common mistake made by many people new to editing is to place a single cube in a level, and stick a player start point smack dab in the middle of it, and expect that to work. You'd soon find out it doesn't. A cube room has six sides: 4 walls, a floor, and a ceiling. Likewise, it would require six brushes to form this room in Worldcraft.

Entities

So, you say you want more in your game world than inanimate solids? Well then, what you want are entities. Where brushes are "world objects", used to form the basic inanimate structure of your level, entities are the objects that move, have sound, are interactive, and are basically anything that "does something."

Entity Types

There are two types of entities: point based and brush based.

Point based entities exist only at a certain exact point. These are entities like lights (non texture based, of course) and monsters/players. Monsters do have an area, but this is defined by the game code and is not modifiable from within the map. Some point type entities are just that: points. For example, the env_beam entity (controls Half-Life's beam effects) uses two info_target entities as targets.

Brush based entities are entities that depend on a brush for their physical presence (like doors, trains, and other moving entities) or "area" (like triggers, which require an activation field).

Object Creation

Now that the objects themselves are defined, you might be asking "How do I actually make these things?" Brushes are take the least effort. Entities are slightly more complex

brush creation

• select the Block tool

• define the brush properties in the New Object dialog

• drag a box in the 2D windows, being sure to size it appropriately in each of the 2D windows

• press Enter to create the object

entity creation

(point based)

• select the Entity tool

• select the appropriate entity from the list in the New Object dialog.

• click on the 2D window to place the entity position, adjusting in each view as needed.

• press Enter to create the entity

(brush based)

• follow the steps for brush creation (see above)

• switch to the Selection tool

• select the brush

• press the to Entity button on the New Object dialog. A list of brush based entity selections will pop up. Choose the appropriate one.

Note: More than likely, you are going to have to adjust the properties of the entity after you create it. Brush based entities start with their entity properties available for modification. You will have to select a point entity (or previously made brush entity) and press Alt-Enter to access its properties.

Now that the basics are out of the way, there are some simple rules and guidelines that should be kept in mind while designing levels.

"Thy level shall be sealed" This is arguably the most important rule. Your level should have an inside and outside. There should be no holes, not even the tiniest crack, allowing access from one part to the other. The short version of the reason is this: it will prevent the compile tools from fully running on your level, and the level will end up not being optimized for the rendering engine. This will produce slower game play and may cause some objects to flash in and out of existence in your level.

"Know thy limits" ...that is, know the limits of what you're working with. Knowing the engine limits, and more importantly, knowing when you are approaching them or crossing them, is extremely important. There are a number of tools built into the engine to help you with this. They can be accessed by typing the commands in the game console.

r_speeds [1/0] (gl and software modes) this is the first scale of measurement most people turn to and, all things considered, will give you a fairly good estimate of how your level will run on other people's machines.

r_speeds gives you a series of numbers that are dynamically generated as you look around your level. You will get a line something like "60fps 3ms 31 wpoly 0 epoly" ... the important values to watch are the wpoly and epoly values. Wpoly values should be kept under 600, and wpoly values under 3500.

r_drawflat (software mode) although this doesn't give you any hard numbers, it does show you how your brushes have been cut up by the compile tools. Instead of texturing the level, it is drawn flat-shaded, much like Worldcraft's flat-shaded 3D view, except that each polygon face is drawn in a different color. This can help you identify problem areas in your level where the polygon count may be reduced.

r_draworder (software mode) this is another tool that, although it gives you no numbers, does give you valuable information to help you optimize your level. Enabling this will cause the engine to render in reverse order, showing you exactly what the engine is seeing. In some cases, there can be quite a difference between what you see and what the engine is seeing, due to the fact that the engine can see through entities and occasionally around corners.

"Thou shalt keep thy level simple" ..er, to a point, of course. This goes hand in hand with the above rules. Making huge, open areas with lots of obstructions or highly detailed areas tend to drive up the polygon counts. This is not to say that your levels should all be boxes devoid of detail, just that you should be aware of the limits, and try to push them, but avoid going past them.

"Too much of a good thing..." ...is a good thing no more. Things like colored lights and beam effects are extremely cool, but excessive use of special things tends to detract from the level as a whole. When adding things to your level, ask yourself "What is the purpose of this? Why is it here?"

"Know your environment" This isn't strictly related to level design, but it will help you immeasurably if you know the game, the tools, and the editor inside out. Taking the time to familiarize with all the game entities will ensure that you use everything to your full advantage.

Related Topics:

creating solids

texturing

vertex manipulation, clip planes, and carving

creating entities