Пыль, Туман и Дым

From Valve Developer Community
< Ru
Jump to navigation Jump to search
English (en)Deutsch (de)Русский (ru)中文 (zh)Translate (Translate)
Серия Воссоздание окружающей обстановки(en) Выскажите свои мысли — Помогите нам воплотить больше идей

Снаряжение | Животные и существа | Муравьиные львы | Лучи и лазеры | Кабели и верёвки | Движущиеся облака | Теория цвета | Битвы | Комбайны | Сжатие ресурсов | Двери | Пыль, туман и дым | Лифты | Переключение карт | Внешнее освещение, солнце, погода и окружение | Взрывы | Огонь | Растительность | Стекло и окна | Хэдкраб | Жизнеспособность | Лестницы | Освещение | Оптимизация | Физические объекты | Сканеры сетчатки | Звук и музыка | Спецэффекты | Ландшафт | Поезда | Турели | Вода | Оружие | Зомби


Эта статья о добавлении на карту дыма, пыли, тумана и т.д. Они весьма схожи между собой, поэтому их эффекты пересекаются.


Объекты

  • env_fog_controller(en) — добавляет туман по всей карте
    • sky_camera(en) - aside from being used to add 3D Skybox, fog on 3D Skyboxes need to be adjusted through this entity.
  • env_smokestack(en) — добавляет дым, сдуваемый ветром
  • func_dustcloud(en) — добавляет пыль
  • env_steam(en) — быстро движущаяся версия env_smokestack, без ветра
  • env_dustpuff(en) — пускает клубы дыма
  • env_smoketrail(en) — создаёт дым в виде "дымного следа"
  • env_dusttrail(en) (must be parented. Can't be toggled.)
  • func_smokevolume(en) — создание объёмного дыма (использует значительные ресурсы CPU)
  • func_dustmotes(en)

Материалы

  • effects/fog_d1_trainstation_02 — Используется только на расстоянии. Fit to brush face. Только в играх содержащих исходный код Half-Life 2(en).
  • effects/fog_d2_coast_01 — Используется только на расстоянии. Fit to brush face. Half-Life 2 20th Anniversary Update only.
    • Example usage of this material can be seen on all Water Hazard (before d1_canals_13), Highway 17 and Sandtraps maps, which was applied to round shaped brush and displacement fog placed in far distance, combined with env_fog_controller with radial fog enabled.
  • effects/fog_d1_canals_13 — (uses effects/fog_gradient texture, just with color changed through $color VMT parameters). Half-Life 2 20th Anniversary Update only.
    • Example usage of this material can be seen on d1_canals_13 map, which was applied to round shaped brush and displacement fog placed in far distance, combined with env_fog_controller with radial fog enabled.
  • shadertest/volumetricfog — Не работает.
  • tools/toolsfog — Работает только с func_smokevolume.
  • tools/toolsskyfog — Non-functional, use non-existent shader SkyFog.

Примечания

  • env_smokestack(en) и func_dustcloud(en) для достижения своего эффекта используют многочисленные спрайты , и поэтому очень требовательны к ресурсам (некоторые настройки замедлят вашу карту, особенно на слабых системах).
  • CS:S(en) есть некоторые модели облаков.
  • Лучи света должны быть добавлены вручную. Для этого существует модель (Effects/vol_light.mdl) или вы можете создать не твёрдый браш с материалом models/effects/vol_light001 или vol_light002.
  • Чтобы получить туман в 3D скайбоксе, настраивайте параметры тумана в sky_camera(en). Для достижения наилучшего результата задайте ему те же параметры, что и в env_fog_controller(en).
  • In Source games, prior to Left 4 Dead(en), renders fog as a plane a certain distance away from the camera. This method is bad, as rotating the camera will strengthen or weaken the apparent amount of fog in a particular spot, even though the viewer hasn't moved at all. After Left 4 Dead Left 4 Dead, aswell as Half-Life 2 Half-Life 2 (since 20th anniversary, enabled in some maps only), and Ветвь Team Fortress 2 Ветвь Team Fortress 2 games (Counter-Strike: Source, Half-Life Deathmatch: Source, Half-Life 2: Deathmatch and Day of Defeat: Source), Valve implemented a new radial method which is independent from the viewing angle. Mapbase(en) also has it's own implementation of radial fog.
  • Left 4 Dead 2 There is a Fog Panel in Left 4 Dead 2 that allows in-game manipulation of fog parameters. It is loaded via console command fogui.
Icon-Bug.pngБаг:On systems with newer GPUs (since  Nvidia GeForce 8000 series or newer AMD/ATI GPUs) and newer drivers, fog effect on all Source 2004 Source 2004 and Source 2006 Source 2006 games will appear more foggy than usual. This has been fixed on NVIDIA systems since driver version "516.5x" (confirmed on RTX 3060),[1][2] but is likely still present on  AMD/ Intel. This issue is not affected when using dxlevel 81 (DirectX 8.1 level) or lower, only dxlevel 90 (DirectX 9.0 level) or higher.

Additionally, using any Direct3D 9 wrapper (D3D9 to D3D11 via dgVoodoo 2 for example) on this branch, even on systems with newer NVIDIA drivers that fixes this issue, will also cause this fog issues to appear.

Comparison

Source - Old Engine fog bug.jpg

Смотреть также

Справочные сноски

1. Source DirectX9 grey fog bug
a0divided: This bug basically only happens while using DX9 with games that run on pre-Orangebox versions of Source, like Sin as mentioned above or HL2 & EP1 before the 2010 engine update.

But what's interesting is that this bug was fixed at some point by Nvidia, at least on their newer cards with the latest drivers. I currently have an RTX 3060 Laptop GPU with driver 516.5 and the fog actually works properly on DX9. Unfortunately, I think it's still bugged with AMD or Intel GPUs.... Retrieved on November 11, 2026. 

2. Verified by leonidakarlach (talk) 01:36, 14 September 2024 (PDT):
Appeared to be fixed. Using RTX 3060 (desktop) and driver version 560.81. Using something like DgVoodoo2 would break this again..

Внешние ссылки