Lighting:ru

From Valve Developer Community
Jump to: navigation, search
Dead End - Icon.png
This article has no links to other VDC articles. Please help improve this article by adding links that are relevant to the context within the existing text.
January 2024

Освещение в Dota 2 является динамическим и осуществляется по модели отложенного освещения. Освещение не нужно компилировать.

env_global_light

Управляет глобальными настройками света в пользовательских картах. Некоторые настройки являются глобальными, другие же могут быть переопределены в ent_dota_lightinfo

Specular Angle (Y Z X) Управления углом отражения (По умолчанию: 64 283 0)
Specular Power 0 = infinite width falloff, higher values = sharper falloff (По умолчанию: 14)
FOV This is the field of view that the sunlight casts in. Use lower values for more distant sun and sharper shadows (По умолчанию: 5)
NearZ Distance This controls the near clipping plane's distance from the player (По умолчанию: 4)
Texture Name Материал теней облаков (По умолчанию: ...effects/light_clouds_00)
Enable Shadows Включение/Отключение теней
Cloud Scale Проецируемый размер облака (По умолчанию: 6500)
Cloud 1 Speed Скорость передвижения материала облака 1 (По умолчанию: 120)
Cloud 1 Direction Направление движения материала облака 1 (По умолчанию: 0 165 0)
Cloud 2 Speed Скорость передвижения материала облака 2 (По умолчанию: 80)
Cloud 2 Direction Направление движения материала облака 2 (По умолчанию: 0 145 0)

ent_dota_lightinfo

Control and blend lighting settings from one localized space to another. Maps contain an env_global_light and env_fog_controller entity and most of their values can be controlled by parallel values in ent_dota_lightinfo entities. This is useful for the light differences when passing between the Radiant and Dire sides of the Dota map and a different lighting look is desired. More than one of these entities can exist in a map and any overlap between the outer radii of two or more will cause an averaged transition to occur between the multiple settings. Inner radii cannot overlap each other.

Color Directional light color
Ambient Rim lighting on objects
Shadow Scale Shadow opacity for any elements using the 'Hero Shader' (Example: heroes, npcs, creeps, etc.)
Shadow Ground Scale Shadow opacity for multiblend and global_lit_simple shaders (Example: Props, terrain, etc.)
Height Fog Not supported in custom maps yet - Misty ground effect opacity (0 is fully transparent, .09 default in dota map)
FoW Darkness Fog of war additive opacity
FoW Color RGB Fog of war color is defined by the weighted average of these separate RGB values (Example: R0 G2 B2)
Skybox Name Not supported yet - Add a localized skybox image
Skybox Tint Not supported yet - Tint the localized skybox image
Inner Radius Inner core radius of the ent_dota_lightinfo (Important! These cannot overlap between any ent_dota_lightinfo entities)
Outer Radius Outer radius of the ent_dota_lightinfo. Once the camera has passed beyond this radius, the lighting will be controlled by neighboring ent_dota_lightinfo entities or by the env_global_light if none are intersecting the current camera position
Tip.pngTip:If the fog of war in a custom map goes entirely black the camera has exceeded the defined outer radius of the nearby ent_dota_lightinfo" entity. Either make the radius bigger or add a second controller.

env_deferred_light

Создает маленький источник точечного света, который не создает теней. Такой вид света часто используется для создания факелов, пожаров и т.д.

Оптимизация освещения

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