Ru/Moving water (Source): Difference between revisions

From Valve Developer Community
< Ru
Jump to navigation Jump to search
mNo edit summary
 
m (obsolete language category)
 
(25 intermediate revisions by 12 users not shown)
Line 1: Line 1:
{{totranslate:ru}}
{{LanguageBar}}
[[Category:Level Design Tutorials]]
{{tabs|Moving water|goldsrc=1|source=1}}
{{seealso|[[Flowing Water]]}}
 
[[Image:Moving_water.jpg|thumb|300px|Moving water in cs_militia.]]
{{translate}}
Source поддерживает воду как ентити [[func_water_analog]], которая может передвигаться так же, как и [[func_movelinear]] .
{{seealso|{{L|Flowing Water}}}}
Движок Source поддерживает воду как энтити {{L|func_water_analog}}, которая может передвигаться так же, как и {{L|func_movelinear}} .


==Ограничения==
==Ограничения==
Line 9: Line 10:


* Не используется шейдер воды. Для воды используется bump mapping (чтобы "удешевить" воду, т.е. сделать менее ресурсоёмкой).
* Не используется шейдер воды. Для воды используется bump mapping (чтобы "удешевить" воду, т.е. сделать менее ресурсоёмкой).
* Moving water will not always react the same as normal water. Client-side entities, such as broken props in HL2MP or ragdolls, do not float in this type of water.
* Перемещение воды не всегда корректно реагирует как нормальная вода. Ентити клиента, например, осколки от объектов в HL2MP или рэгдоллы,не всплывают.
* Splashes (most noticeably those caused by explosions) will not render correctly. Splashes appear to be created at the water's original position, rather than its current position.
* Всплески (чаще всего видны при взрывах) неправильно визуализируются. Скорее всего, они будут появляться на начальном уровне воды, чем на конечном,.
*Underwater fogging does not occur, making the water seem "bright" compared to normal water brushes.
*Под водой не происходит изменения вида, и вода выглядит "ярче", чем нормальная.


==Создание==
==Изготовление==
To add a moving water volume to your level, follow these steps:
To add a moving water volume to your level, follow these steps:


===Creating the Water Brush===
===Создание водный браши===
[[Image:Moving_water1.jpg|thumb|200px|right|Step 1]]
[[File:Moving_water1.jpg|thumb|200px|right|Шаг 1]]


# Create a brush the size of the water volume using the Block Tool.
# Создайте браш размера водной массы используя Block Tool.
# Open the '''Texture Browser''' by clicking the '''Browse''' button on the Texture Bar.
# Откройте '''Texture Browser''' нажав на кнопку Browse на Texture Bar.
# Double-click the <code>tools\[[tool textures#nodraw|toolsnodraw]]</code> material in the Texture Browser.
# Дважды кликните <code>tools\[[tool textures#nodraw|toolsnodraw]]</code> материал в Texture Browser.
# With your water brush selected, click the Apply Current Texture button to assign the <code>tools\toolsnodraw</code> material to the whole brush.
# Теперь нажмите на кнопку Apply Current Texture чтобы применить текстуру nodraw на браш.
# Select the Texture Application tool, which opens the '''Face Edit''' mode.
# Выберете Texture Application Tool, который откроет режим '''Face Edit'''.
# Left-Click the top face of the water brush in the 3D view to select it.
# Кликните левой кнопкой мыши на верхний фейс водного браша в 3D виде, чтобы выделить его.
# Click '''Browse''' to bring up the '''Texture Browser''' again.
# Нажмите '''Browse''', чтобы снова отобразить '''Texture Browser'''.
# Type <code>movingplane</code> into the '''filter''' field and select the texture <code>nature/water_movingplane</code>.
# Введите <code>movingplane</code> в поле '''filter''' и выберити текстуру <code>nature/water_movingplane</code>.
# Click the '''Apply''' button on the '''Face Edit''' panel.
# Нажмите кнопку '''Apply''' на панели '''Face Edit'''.
<div style='clear: right'>
<div style='clear: right'>


===Configuring the func_water_analog entity===
===Конфигурация энтити func_water_analog===
[[Image:Moving_water2.jpg|thumb|200px|right|Step 2]]
[[File:Moving_water2.jpg|thumb|200px|right|Шаг 2]]
# Now you have constructed the water brush, press '''Ctrl + T''' to tie the brush to an entity. Select <code>func_water_analog</code> from the list.
# Now you have constructed the water brush, press '''Ctrl + T''' to tie the brush to an entity. Select <code>func_water_analog</code> from the list.
# In order to trigger your water, you must name it. Enter an identifier for the water in the <code>Name</code> field.
# In order to trigger your water, you must name it. Enter an identifier for the water in the <code>Name</code> field.
Line 40: Line 41:


===Triggering the Water===
===Triggering the Water===
The <code>func_water_analog</code> entity can be moved via two inputs, <code>Open</code> and <code>Close</code>. See [[Inputs_and_Outputs|Inputs & Outputs]] for more information.
The <code>func_water_analog</code> entity can be moved via two inputs, <code>Open</code> and <code>Close</code>. See {{L|Inputs_and_Outputs|Inputs & Outputs}} for more information.
 
==Cubemaps и движущаяся вода==
 
As mentioned earlier, moving water cannot use the water shader and instead has the same visual properties as "cheap" water, using a pre-calculated environment map from an {{L|env_cubemap}} instead.


==Cubemaps and Moving Water==
Cubemaps are important to use with water surfaces. On lower than DX9 level video cards, it is not possible to render the real-time reflective water shader. For these cards, an {{L|env_cubemap}} entity provides the pre-calculated environment map use to render water on sub-DX9 cards.


As mentioned earlier, moving water cannot use the water shader and instead has the same visual properties as "cheap" water, using a pre-calculated environment map from an [[env_cubemap]] instead.
Чтобы добавить {{L|env_cubemap}} к водным поверхностям:


Cubemaps are important to use with water surfaces. On lower than DX9 level video cards, it is not possible to render the real-time reflective water shader. For these cards, an [[env_cubemap]] entity provides the pre-calculated environment map use to render water on sub-DX9 cards.
# Добавьте энтити env_cubemap использовая '''Entity Tool'''.
# Разместите env_cubemap над поверхности воды, около центра.
# Дважды кликните на '''env_cubemap''' в 3D виде, чтобы отобразить '''Object Properties'''.
# Кликните на кнопку '''Brush faces''' в '''Object Properties'''.
# Кликните кнопку '''Pick...'''. Курсор мыши смениться на иконку пипетки.
# Кликните на верхний фейс воды, чтобы выделить его пипеткой. Он выделиться красным, чтобы показать ассоциацию фейса с энтити env_cubemap.
# Закройте '''Object properties'''.
# Скомпилируйте и запустите вашу карту. Когда карта загрузилась, откройте консоль разработчика и введите <code>buildcubemaps</code>. Движок просчитает карту окружения для каждой энтити env_cubemap, и сохранит информацию в BSP файл.


Adding a [[env_cubemap]] to water surfaces:
{{ACategory|Level Design Tutorials}}
[[Category:Russian]]


# Add an [[env_cubemap]] entity using the Entity Tool.
{{ACategory|Water}}
# Place the [[env_cubemap]] above the top surface of the water, near the center.
{{ACategory|Level Design}}
# Double-click the [[env_cubemap]] in the 3D view to bring up the Object Properties dialog.
{{ACategory|Tutorials}}
# Click on the '''Brush faces''' key in the '''Object Properties'''.
# Click the '''Pick...''' button. The mouse cursor will change to the eye dropper icon.
# Click the top water face to select it with the eyedropper. The face will highlight in red, to show it has been associated with the [[env_cubemap]] entity.
# Close the '''Object properties''' dialog.
# Compile and run your map. After the map is loaded, open the developers console and type <code>buildcubemaps</code>. The engine will calculate an environment map for each [[env_cubemap]] entity, and save the data into the [[BSP]] file.

Latest revision as of 03:53, 22 August 2024

English (en)Русский (ru)Translate (Translate)
Info content.png
This page needs to be translated.
This page either contains information that is only partially or incorrectly translated, or there isn't a translation yet.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article complies with the alternate languages guide.(en)
См. также:  Flowing Water(en)

Движок Source поддерживает воду как энтити func_water_analog(en), которая может передвигаться так же, как и func_movelinear(en) .

Ограничения

Хотя перемещение воды в принципе возможно, есть некоторые ограничения.

  • Не используется шейдер воды. Для воды используется bump mapping (чтобы "удешевить" воду, т.е. сделать менее ресурсоёмкой).
  • Перемещение воды не всегда корректно реагирует как нормальная вода. Ентити клиента, например, осколки от объектов в HL2MP или рэгдоллы,не всплывают.
  • Всплески (чаще всего видны при взрывах) неправильно визуализируются. Скорее всего, они будут появляться на начальном уровне воды, чем на конечном,.
  • Под водой не происходит изменения вида, и вода выглядит "ярче", чем нормальная.

Изготовление

To add a moving water volume to your level, follow these steps:

Создание водный браши

Шаг 1
  1. Создайте браш размера водной массы используя Block Tool.
  2. Откройте Texture Browser нажав на кнопку Browse на Texture Bar.
  3. Дважды кликните tools\toolsnodraw материал в Texture Browser.
  4. Теперь нажмите на кнопку Apply Current Texture чтобы применить текстуру nodraw на браш.
  5. Выберете Texture Application Tool, который откроет режим Face Edit.
  6. Кликните левой кнопкой мыши на верхний фейс водного браша в 3D виде, чтобы выделить его.
  7. Нажмите Browse, чтобы снова отобразить Texture Browser.
  8. Введите movingplane в поле filter и выберити текстуру nature/water_movingplane.
  9. Нажмите кнопку Apply на панели Face Edit.

Конфигурация энтити func_water_analog

Шаг 2
  1. Now you have constructed the water brush, press Ctrl + T to tie the brush to an entity. Select func_water_analog from the list.
  2. In order to trigger your water, you must name it. Enter an identifier for the water in the Name field.
  3. Select the direction for the water to move in the Move Direction field. For most cases, you should select Up from the list.
  4. Enter a speed at which your water should move. 55 works well, but the speed should depend on the situation.
  5. The entity uses the Move Distance field to determine how far the water should move. If you enter the height of your water brush, it will move fully above its starting position (the bottom of the brush will be where the top of the brush was originally).
  6. You can select sounds to be played when the water starts or stops moving with the Sounds played... fields.

Triggering the Water

The func_water_analog entity can be moved via two inputs, Open and Close. See Inputs & Outputs(en) for more information.

Cubemaps и движущаяся вода

As mentioned earlier, moving water cannot use the water shader and instead has the same visual properties as "cheap" water, using a pre-calculated environment map from an env_cubemap(en) instead.

Cubemaps are important to use with water surfaces. On lower than DX9 level video cards, it is not possible to render the real-time reflective water shader. For these cards, an env_cubemap(en) entity provides the pre-calculated environment map use to render water on sub-DX9 cards.

Чтобы добавить env_cubemap(en) к водным поверхностям:

  1. Добавьте энтити env_cubemap использовая Entity Tool.
  2. Разместите env_cubemap над поверхности воды, около центра.
  3. Дважды кликните на env_cubemap в 3D виде, чтобы отобразить Object Properties.
  4. Кликните на кнопку Brush faces в Object Properties.
  5. Кликните кнопку Pick.... Курсор мыши смениться на иконку пипетки.
  6. Кликните на верхний фейс воды, чтобы выделить его пипеткой. Он выделиться красным, чтобы показать ассоциацию фейса с энтити env_cubemap.
  7. Закройте Object properties.
  8. Скомпилируйте и запустите вашу карту. Когда карта загрузилась, откройте консоль разработчика и введите buildcubemaps. Движок просчитает карту окружения для каждой энтити env_cubemap, и сохранит информацию в BSP файл.