Hammer Cordon Usage: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(minor formatting, clarification)
Line 53: Line 53:
[[Image:Cordon4.gif|thumb|caption|200px|right|Changing the texture used for the cordon.]]
[[Image:Cordon4.gif|thumb|caption|200px|right|Changing the texture used for the cordon.]]


One downside of the cordon tool is the annoying black and purple texture that represents the cordon boundary in the 3D view. It can make you sick after moving around a lot. Fortunately, it can easily be changed to a different texture by changing the cordon material.
If the cordon boundary is showing incorrectly in-game (as a black and white checkerboard), this means an invalid material is chosen as the cordon texture. This texture can easily be changed by choosing a different material for the cordon:


# Go to '''[[Hammer Tools Menu|Tools]] > [[:Category:Hammer Options Dialog|Options...]] > [[Hammer Game Configurations|Game Configurations]]''' tab.
# Go to '''[[Hammer Tools Menu|Tools]] > [[:Category:Hammer Options Dialog|Options...]] > [[Hammer Game Configurations|Game Configurations]]''' tab.
# Locate the '''Cordon texture''' field, and click the '''Browse...''' button next to it, to open the texture browser.
# Locate the '''Cordon texture''' field, and click the '''Browse...''' button next to it, to open the texture browser.
# Double-click to select a different texture. The <code>tools/[[tool textures#skybox|toolsskybox]]</code> texture works well, but you need to make sure you have a [[light_environment]] in the bounds for the skybox texture to light the world properly after compile.
# Double-click to select a different texture. The <code>tools/[[tool textures#skybox|toolsskybox]]</code> texture works well, but you need to make sure you have a [[light_environment]] in the bounds for the skybox texture to light the world properly after compile.
{{tip|The <code>tools/[[tool textures#skybox|toolsblack]]</code> material also makes a good choice for a cordon texture, especially if the light emitting from a <code>toolsskybox</code> material is undesirable (such as in an underground environment).}}


[[Category:Level Design Tutorials]]
[[Category:Level Design Tutorials]]
[[Category:Hammer Tools]]
[[Category:Hammer Tools]]

Revision as of 20:33, 17 August 2006

Overview of the Hammer Cordon Tool

Toolbar cordon circled.PNG

The cordon tool is used to limit the map area to be compiled to a smaller area in order to either save compile time, test areas individually without interference from their surroundings, or to find the location of an unknown problem.

Compiling with cordon boundaries set will compile only the area within the cordon bounds (safely enclosing this area in a sealed box to prevent leaks).

General usage

Using the cordon tool allows the developer to compile only one room, or test lighting in a particular area, without having to compile the entire map. Excluding large or complex areas in this way can save a considerable amount of compilation time.

Cordons can also be used to eliminate areas from compilation when trying to find the location of a problem. This can be done by gradually decreasing the size of the cordoned area until the problem is eliminated, defining the area in which the problem must be. It is also possible to move the cordoned area around the map until the problem is found or eliminated.

Tip.pngTip:Before compiling, make sure that the cordon area contains a start point for the player (an info_player_start or an info_player_deathmatch), or the game will place the player at the world origin (0,0,0) when you load the map in the game engine.

Mo-editcordon.png Edit Cordon Bounds

A selected cordon with its handles.

This function is used to set, or alter, boundaries of an area to "cordon off". Only objects that are at least partially within these boundaries will be compiled, and a box using the assigned cordon texture will be placed along these boundaries to seal leaks.

To create a new cordon area

  1. Select the Edit cordon bounds button on the Map Operations Toolbar.
  2. Drag a selection box in one of the 2D views around the section you wish to compile.
  3. As the cordon area is a 3D cube, you may find it necessary to resize the height, width, and/or depth of it (in any of the 2D views) to fit the intended area.
  4. Select any other editing tool from the Map Tools Toolbar to finish creating the cordon area.

To edit an existing cordon area

  1. Select the Edit cordon bounds button on the Map Operations Toolbar.
  2. To resize a cordon area, drag its boundary handles in any of the 2D views.
  3. To move a cordon area, click-drag in the center of the selection box.
  4. Select any other editing tool from the Map Tools Toolbar (like the Selection tool, for instance) to finish editing the cordon area.

Mo-togglecordon.png Toggle Cordon State

A cordon while the cordon state is activated.

This function will toggle the cordon state i.e. the effect and visibility of the cordon area (created with the Edit cordon bounds tool).

While the cordon state is active, the compiler will only compile the cordoned off area. The objects which will be included in the compile will be reflected in the 3D view, boundaries of the cordon area will also be outlined by a thick red line, like the pictures below show.

Note.pngNote:Only one cordon area can be active at any one time. The cordon area must be moved or resized to choose a new cordon area to be used.
File:Cordon2.jpg
Cordon boundaries selected.
File:Cordon3.jpg
Cordon boundaries activated.

With the cordon state deactivated, the compiler will compile the entire map as normal, and the cordon area will not be visible. (See Edit Cordon Bounds above for information on how to create and edit cordon areas.)

Changing the cordon wall texture

File:Cordon4.gif
Changing the texture used for the cordon.

If the cordon boundary is showing incorrectly in-game (as a black and white checkerboard), this means an invalid material is chosen as the cordon texture. This texture can easily be changed by choosing a different material for the cordon:

  1. Go to Tools > Options... > Game Configurations tab.
  2. Locate the Cordon texture field, and click the Browse... button next to it, to open the texture browser.
  3. Double-click to select a different texture. The tools/toolsskybox texture works well, but you need to make sure you have a light_environment in the bounds for the skybox texture to light the world properly after compile.
Tip.pngTip:The tools/toolsblack material also makes a good choice for a cordon texture, especially if the light emitting from a toolsskybox material is undesirable (such as in an underground environment).