Naming Lights: Difference between revisions
(Removed example as its confusing and misleading, a better example is needed.) |
m (Added lang and formatting.) |
||
Line 1: | Line 1: | ||
{{lang|Naming Lights}} | |||
Giving a light entity a [[targetname]] makes [[VRAD]] compile a second [[lightmap]] "page" for the surfaces that its emitted light touches. This won't harm in-game performance, but it will increase compile time and BSP filesize, regardless of whether the light ever receives [[input]] to change its state. | Giving a light entity a [[targetname]] makes [[VRAD]] compile a second [[lightmap]] "page" for the surfaces that its emitted light touches. This won't harm in-game performance, but it will increase compile time and BSP filesize, regardless of whether the light ever receives [[input]] to change its state. | ||
Line 8: | Line 9: | ||
{{note|Setting an animated appearance for the light counts as naming it.}} | {{note|Setting an animated appearance for the light counts as naming it.}} | ||
{{bug|There is a bug in the | {{bug|There is a bug in the {{game name|l4d|name=Left 4 Dead}} engine that affect the use of named lights. A named light, even if totally still will be considered fully dynamic by the engine and pump up a large chunk of frames per second until it is turned off and on for the first time. The workaround is to set the light to start turned off and to turn it on on map spawn using a {{ent|logic_auto}} entity for instance. This could also affect {{game name|l4d2|name=Left 4 Dead 2}}, but this has not been proven.}} | ||
== See also == | == See also == | ||
* | * {{ent|light}} | ||
* | * {{ent|light_spot}} | ||
[[Category:Level Design]] | [[Category:Level Design]] | ||
[[Category:Lighting]] | [[Category:Lighting]] |
Revision as of 12:59, 13 September 2021


Giving a light entity a targetname makes VRAD compile a second lightmap "page" for the surfaces that its emitted light touches. This won't harm in-game performance, but it will increase compile time and BSP filesize, regardless of whether the light ever receives input to change its state.
However, the system can be overloaded if you try to make it handle a large number of overlapping named lights (since the number of pages needed increases exponentially). When this happens performance can be harmed and you may well see lighting anomalies.
VRAD attempts to avoid this with its hard-coded limits of two switchable lights affecting a brush face and 32 pages in total. More than this causes VRAD to throw a warning such as "Too many light styles on a face" and refuse to compute the lightmaps for those lights; this will make those areas appear as if they are not lit. You can help too by giving lights that will always change state at the same time a shared targetname, which makes VRAD merge their pages together.


