Hammer Cordon Usage: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Cleaned up the article. Muuuch better. =))
Line 1: Line 1:
==Compiling==
==Overview of the Hammer Cordon Tool==


Compiling with cordon boundaries set will compile only the part of the map selected with the cordon tool. This allows the user to compile one room or test lighting in a particular area without compiling the entire map. This can eliminate waiting for what can be a lengthy compile of a large map.
[[Image:Toolbar cordon circled.PNG|center]]
 
The cordon tool is used to box off the playing area 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).


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 elimnated, 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.


==Use==
==Use==


[[Image:Toolbar cordon circled.PNG|center]]
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.


To select a cordon area, begin by clicking the '''Cordon Edit''' button (the square outlined in yellow and black on the right in the image above). In the 2D views, drag a box around the part of the map you want to compile. The box is a cube shape, so two different 2D views must be used to alter the height, width, and depth of the cube to fit the section to be cordoned off.
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 elimnated, 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.


Once the area to be compiled is boxed off, select a different tool (the Select tool, for instance) and the '''Cordon Toggle''' button (the fully colored in black and yellow to the left of the Cordon Edit button) will become active.
:{{note|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 else your map will not work.}}


:{{note|You '''must''' include a start point (an [[info_player_start]] or an [[info_player_deathmatch]]) inside your cordon boundary or else your map will not work.}}


The map can now be compiled and run and only the cordoned area will appear in the game.
==The Edit Cordon Bounds Button [[Image:mo-editcordon.png]]==


[[Image:Cordon2.jpg|thumb|left|300px|Cordon boundaries selected.]][[Image:Cordon3.jpg|thumb|left|300px|Cordon boundaries activated.]]<br style="clear:both">
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.


If the area cordoned off is sufficiently smaller than the full map or the cordoned area '''excludes''' complex areas of the map, considerable compilation time can be saved.


= The Edit Cordon Bounds Button [[Image:mo-editcordon.png]] =
==The Toggle Cordon State Button [[Image:mo-togglecordon.png]]==


This function allows you to "cordon off" an area in order to test compile a section of the map file. When the Toggle Cordon State is activated, a thick red line will appear around that area. When you compile, only the objects inside of that red area will be compiled, and a black box will be placed around the area to seal leaks.
This function will toggle the cordon state i.e. the effect and visibility of the cordon area (created with the '''Edit cordon bounds''' tool).


This function allows you to create new cordon boundaries, or edit existing ones. After enabling Edit Cordon Bounds, the editing handles of a cordon area will become active. Drag the boundary handles to a new area to change the size of the area. Select an different editing tool to deactivate Edit Cordon Bounds and make the changes to the cordon area.
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.


[[Image:cordon1.png]]
[[Image:cordon1.png]]


= The Toggle Cordon State Button [[Image:mo-togglecordon.png]] =
[[Image:Cordon2.jpg|thumb|left|300px|Cordon boundaries selected.]][[Image:Cordon3.jpg|thumb|left|300px|Cordon boundaries activated.]]<br style="clear:both">


This function will toggle the visibility and effect of a cordon area you have created with the '''Edit Cordon Bounds''' tool. When the '''Toggle Cordon State''' is activated, a thick red line will appear around that area. When you compile, only the inside of that red area will be compiled, and a box will be placed around the area to seal leaks. With the button deactivated, the cordon area will not be visible, and the compile will be unaffected by the cordon. See Edit Cordon Bounds for information on how to create and edit cordon areas.
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.)


== To create a new cordon area ==
== To create a new cordon area ==


# Select the '''Edit cordon bounds''' button ( [[Image:Mo-editcordon.png]] ) on the [[Hammer Map Operations Toolbar|Map Operations Toolbar]]. (The '''Toggle cordon state''' button ( [[Image:Mo-togglecordon.png]] ) will also automatically activate.)
# Select the '''Edit cordon bounds''' button ( [[Image:Mo-editcordon.png]] ) on the [[Hammer Map Operations Toolbar|Map Operations Toolbar]].
# Drag a selection box in one of the 2D views. (You may resize it as necessary, in any of the 2D views.)
# Drag a selection box in one of the 2D views around the section you wish to compile.
# Select any other editing tool from the [[Hammer Map Tools Toolbar|Map Tools Toolbar]] to finish creating the cordon area. (The '''Toggle cordon state''' button will remain active.)
# As the cordon area is a 3D cube, you may find it neccessary to resize the height, width, and/or depth of it (in any of the 2D views) to fit the intended area.
# Select any other editing tool from the [[Hammer Map Tools Toolbar|Map Tools Toolbar]] to finish creating the cordon area.
{{tip|Make sure a player start point lies within the bounds of the cordoned area before you run a test compile, otherwise the game will place the player at the world origin (0,0,0) when you load the map in the game engine.}}
{{tip|Make sure a player start point lies within the bounds of the cordoned area before you run a test compile, otherwise the game will place the player at the world origin (0,0,0) when you load the map in the game engine.}}


== To edit an existing cordon area ==
== To edit an existing cordon area ==


# Select the '''Edit cordon bounds''' button ( [[Image:Mo-editcordon.png]] ) on the [[Hammer Map Operations Toolbar|Map Operations Toolbar]]. (The '''Toggle cordon state''' button ( [[Image:Mo-togglecordon.png]] ) will also automatically activate.)
# Select the '''Edit cordon bounds''' button ( [[Image:Mo-editcordon.png]] ) on the [[Hammer Map Operations Toolbar|Map Operations Toolbar]].
# To resize a cordon area, drag the handles of its selection box in any of the 2D views.
# To resize a cordon area, drag its boundary handles in any of the 2D views.
# To move a cordon area, click-drag in the center of the selection box.
# To move a cordon area, click-drag in the center of the selection box.
# Select any other editing tool from the [[Hammer Map Tools Toolbar|Map Tools Toolbar]] to finish editing the cordon area. (The '''Toggle cordon state''' button will remain active.)
# Select any other editing tool from the [[Hammer Map Tools Toolbar|Map Tools Toolbar]] (like the ''Selection tool'', for instance) to finish editing the cordon area.
 


=Changing the cordon wall texture=
==Changing the cordon wall texture==


[[Image:Cordon4.gif|thumb|200px|right]]
[[Image:Cordon4.gif|thumb|200px|right]]
Line 54: Line 58:


# 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.
# Click '''Browse''' by Cordon texture field.
# 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.


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

Revision as of 07:39, 17 August 2006

Overview of the Hammer Cordon Tool

Toolbar cordon circled.PNG

The cordon tool is used to box off the playing area 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).


Use

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 elimnated, 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.

Note.pngNote: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 else your map will not work.


The Edit Cordon Bounds Button Mo-editcordon.png

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.


The Toggle Cordon State Button Mo-togglecordon.png

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.

File:Cordon1.png

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.)

To create a new cordon area

  1. Select the Edit cordon bounds button ( Mo-editcordon.png ) 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 neccessary 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.
Tip.pngTip:Make sure a player start point lies within the bounds of the cordoned area before you run a test compile, otherwise the game will place the player at the world origin (0,0,0) when you load the map in the game engine.


To edit an existing cordon area

  1. Select the Edit cordon bounds button ( Mo-editcordon.png ) 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.


Changing the cordon wall texture

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.

  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.