Ru/Lighting: Difference between revisions
< Ru
Jump to navigation
Jump to search
Line 19: | Line 19: | ||
{{tip:ru|Статичный свет компилируется в [[Lightmap:ru|карты освещения]], которые освещают и [[brush|браши]], и [[model|модели]], и [[Cubemaps|кубмапы]], и дают статичные [[reflection|отражения]]. | {{tip:ru|Статичный свет компилируется в [[Lightmap:ru|карты освещения]], которые освещают и [[brush|браши]], и [[model|модели]], и [[Cubemaps|кубмапы]], и дают статичные [[reflection|отражения]]. | ||
Это [[free|облегчает]] визуализацию, поскольку огни уже прописаны в | Это [[free|облегчает]] визуализацию, поскольку огни уже прописаны в карте.}} | ||
;[[light]]:Неподвижный, все-направленный точечный источник света (типа лампочки или пламени). | ;[[light]]:Неподвижный, все-направленный точечный источник света (типа лампочки или пламени). |
Revision as of 04:43, 21 March 2016
Серия Воссоздание окружающей обстановки Выскажите свои мысли — Помогите нам воплотить больше идей |
---|
![]() This article has been marked as a candidate for speedy deletion.
If you object to this decision, then please discuss why here (If you make a discussion section also create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself Administrators / Moderators - Remember to check if anything links here and the page history before deleting. Снаряжение | Животные и существа | Муравьиные львы | Лучи и лазеры | Кабели и верёвки | Движущиеся облака | Теория цвета | Битвы | Комбайны | Сжатие ресурсов | Двери | Пыль, туман и дым | Лифты | Переключение карт | Внешнее освещение, солнце, погода и окружение | Взрывы | Огонь | Растительность | Стекло и окна | Хэдкраб | Жизнеспособность | Лестницы | Освещение | Оптимизация | Физические объекты | Сканеры сетчатки | Звук и музыка | Спецэффекты | Ландшафт | Поезда | Турели | Вода | Оружие | Зомби |
Руководства
- Добавление света - Уроки для начинающих о том, как настраивать основные энтити света.
- Вспомогательное освещение - Подробный материал о всех источниках света.
- Продвинутое освещение
- Константно-Линейно-Квадратичное рассеивание - Простое объяснение старой системы C-L-Q затухания света.
- HDR - Высокий динамический диапазон освещения.
Виды
Статичные источники света
- light
- Неподвижный, все-направленный точечный источник света (типа лампочки или пламени).
- light_spot
- Неподвижный, однонаправленный точечный источник света (типа фонарика). Конический угол луча не должен превышать 90°.
- light_environment
- Содержит два связанных источника света:
- Рассеянный 'окружающий' свет (отраженный от облаков и атмосферы в целом), исходящий из всех поверхностей скайбокса.
- Направленный 'яркий' свет (солнечный или лунный), падающий в одном направлении.
- Оба излучаются материалом toolsskybox везде, где он есть на карте. См. также Скайбокс.
- env_particlelight
- Освещает частицы, порождаемые env_smokestack. Частицы не подвержены нормальному освещению. Используйте не более двух.
- Светящиеся текстуры
- Брашевые поверхности со светоизлучающим материалом (определяемым в
game_dir/lights.rad
), который отбрасывает свет на угол 180°.
Статичные приёмники света
- Браши
- Инструмент Масштаб карты освещения диалогового окна Hammer Face Edit Dialog может быть использован для управления резкостью и размытостью карты освещения на поверхности браша - эффект наиболее заметен в зонах с повышенной контрастностью, например, затенённых местах. Обратите внимание, что добавление новых источников света не сильно скажется на производительности, но уменьшение масштаба карты освещения (т.е. увеличение разрешения) сразу увеличит размер карты и объём занимаемой памяти.
- prop_static
- В отличие от других моделей, prop_static светится статично: значение освещения сохраняется для каждой вершины, а модель сетки столкновений (или, опционально, reference mesh) используется для расчёта теней.
- Существуют следующие опции:
disableshadows
- Не отбрасывать тениdisablevertexlighting
- Сохранять только одно значение освещения для всей моделиdisableselfshadowing
- Не позволяет энтите отбрасывать тень на себяignorenormals
- При расчёте освещения игнорирует данные нормалей вершин. Это чрезвычайно полезно для листвы, и других тонких типов вершин сетки.
Dynamic light sources


env_projectedtexture shines from a doorway.
- light_dynamic
- A simple, uni-directional dynamic light that can be moved, turned, and adjusted.
- point_spotlight
- A dynamic spotlight beam effect, with an optional dynamic light source where it hits a surface.
- npc_spotlight
- A spotlight NPC, similar to point_spotlight but with the capability of tracking targets.
- env_projectedtexture
- A dynamic light that lights with a texture rather than a solid colour, and which also 'subtracts' realistic dynamic shadows. Affects all surfaces that can accept lighting, and is used for the player flashlight in Episode Two.
Dynamic shadows






- shadow_control
- Point entity used to control Dynamic Shadow projections for the entire map, including maximum distance cast, direction cast, and sharpness/diffuseness.
- info_no_dynamic_shadow
- Point entity used to list Brush surfaces that should not receive Dynamic Shadows.
- prop_physics entities
- have a "shadowcastdist" keyvalue to override how far this object casts Dynamic Shadows.
- prop_dynamic entities
- have a "disableshadows" keyvalue, and "enableshadows" and "disableshadows" inputs to control Dynamic Shadows cast by them.
- NPC entities
- have the prop_dynamic shadow controls, plus a "disablereceiveshadows" Нужно сделать: to prevent...?
Tyndall effects
Tyndall effects are caused by light scattering on suspended (colloid) particles in a transparent medium. E.g., car headlights in fog.
- Halo (Glow Sprite) effects :
- env_sprite - entity used to create omni-directional glow or flare effects.
- env_lightglow - an asymmetrical glow (for areas of contrasting light).
- env_sun - adds a bright haloed spot to the Skybox to represent the position of the Sun or Moon.
- Lightbeam (Volumetric Light) effects :
- Brush texture :
models/effects/vol_light001
- Brush texture :
models/effects/vol_light002
- Model :
models/Effects/vol_light.mdl
- use with prop_static.
- Brush texture :
- See also Render Modes for sprites, particularly World Space Glow.
Common values
- Car Headlights
- Brightness
231 223 192
Примечание:Taken from L4D2 SDK
- City 17 day
- Brightness
237 218 143 800
- Ambience
190 201 220 100
- Ravenholm night
- Brightness
175 230 239 50
- Ambience
43 45 57 5
- Combine lamp
- Brightness
147 226 240 3000
- Ambience N/A
- Tungsten bulb
- Brightness
254 216 146
- Ambience N/A
- Fluorescent bulb
- Brightness
159 237 215
- Ambience N/A
For values to accompany the stock skybox materials, see Sky List.
Notes
- Naming a light makes it more expensive. Only name lights when you need to. Multiple lights sharing the same name are cheaper than lights with separate names.
- light_dynamic is especially expensive, and will not even show up on some systems
- The basic light entities do not come with a visible representation (e.g. a lightbulb). For that you need a prop. See HL2 light props for a list.
- The basic light entities do not come with a "glow" as you'd expect to see in a foggy or misty area. To provide this, either compile and run the map with HDR enabled, or add a point_spotlight (with dynamic lighting off unless needed) or env_lightglow entity.
- Maps will not be lit unless you run vrad (or equivalent). Vrad will not run properly and will not calculate realistic light bounces unless the level is free of leaks.
- Several textures provide their own light & can do so using
lights.rad
in a mod's directory or the one insourcesdk/bin
. - Moving brushed-based objects will not change the way they are lit. Their lighting will be calculated only according to their positions in Hammer. (e.g. a brush in a dark room will not become bright if it is brought into a bright room.)
Console commands
mat_fullbright <0-2>
0
is normal lighting.1
is 'full bright' lighting, where everything is 100% lit.2
has been introduced with the Orange Box and is 'lighting only'. It replaces all textures' images with a colourless monotone, allowing you to see exactly what is lit, where, and probably how.
See also
- HL2 light props
- Color theory (level design)
- Light entities - A list of light entities.
- Intermediate Lighting
- Advanced Lighting
- Window lighting - How to simulate refracted sunlight through openings.
External links
- Lighting Tutorial - Covers entities & variables with examples
- Quadratic/Linear/Constant in Lights