Ru/Hammer Cordon Usage

From Valve Developer Community
Jump to navigation Jump to search

Template:Otherlang2

Обзор инструмента Hammer Cordon

Toolbar cordon circled.PNG

Инструмент "кордон" используется для уменьшения компилируемой зоны карты в целях экономии времени, а также тестирования отдельных частей без вмешательства окружения, или поиска местоположения проблемы.

Будет скомпилирована только область внутри границ кордона (помещенная в закрытую коробку для предотвращения утечек).

Общие принципы

Инструмент "кордон" позволяет разработчику компилировать только одну комнату, или тестировать освещение в отдельной области без необходимости компиляции всей карты. За исключением больших или сложных зон, это позволит весьма сократить время компиляции.

Также кордоны могут использоваться для отсечения от компиляции зон при поиске проблемы. Это делается путем постепенного уменьшения охватываемой кордоном области, пока не будет найден проблемный участок. С той же целью эту область можно двигать по карте.

Также они могут использоваться для исключения лишней или запутанной геометрии комнат в окнах 2D-вида. Отсеченная кордоном область позволит вам сосредоточиться на деталях конкретной комнаты.

Местоположение отправных точек

Область кордона зачастую не включает в себя оригинальные отправные точки карты (энтитю info_player_start или info_player_deathmatch), и запускает карту без скомпилированной точки входа игрока, поместив его по умолчанию в координате (0,0,0). Конечно, этого можно избежать путём перемещения стартовой точки между оригинальной позицией и разными кордонами, но в долгосрочной перспективе отправные энтити лучше ставить сразу в нескольких зонах кордонов.

Когда кордоны выключены, использование нескольких энтить info_player_start обычно вызывает проблемы при запуске игры в одиночном режиме. Игрок будет появляться в первой попавшейся точке карты, где стоит какая-нибудь энтитя. Чтобы заставить игрока появляться в нужной позиции, в одном info_player_startустановите флажок Master. Теперь все другие точки возрождения будут игнорироваться.

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.
  5. Make sure that the cordon area includes at least one starting point for the player(s).

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.
  5. Make sure that the cordon area still includes at least one starting point for the player(s).

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.pngПримечание: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.
Cordon state inactive.
Cordon state active.

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

Note.pngПримечание:While mapping with the cordon state active, and an entity is moved passed the cordon boundaries, the entity will disappear. It isn't removed from the map, just hidden by the cordon curtain. But you'll have to deactivate cordon to retrieve the entity.

Changing the cordon wall texture

The Cordon texture option.

If the cordon boundary is showing incorrectly in-game (as a black and pink 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.pngСовет: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).