This article's documentation is for anything that uses the Source engine. Click here for more information.

Info lighting relative: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (icon)
(The entity is available by default for the current build of Garry's Mod)
 
(35 intermediate revisions by 13 users not shown)
Line 1: Line 1:
{{wrongtitle|title=info_lighting_relative}}
{{obsolete|entity=1}}
{{Ent not in fgd|any|except={{portal}} and {{Garry's_Mod}}}}
{{CD|CInfoLightingRelative|file1=1}}
{{This is a|point entity|name=info_lighting_relative|sprite=info_lighting.png|before=Left 4 Dead}} An entity that allows a model to be lit from a different light origin without affecting the environment around the model. Great for lighting up trees with many lights or doing manual light correction. It is used in {{ent|d1_trainstation_01}}, where inside the train car [[Dr. Gordon Freeman|Gordon]] encounters [[G-Man]].


{{Ent_not_in_fgd}}
Deprecated by <code>LightingOrigin</code> keyvalue and <code>SetLightingOrigin</code> input for point entities (these however are not in Valve's [[FGD]] by default), use those instead, as they can accept any entity as a lighting origin.  
{{todo|Add the code.}}


==Entity Description==
== Keyvalues ==
[[Image:info_lighting.png|right]]
{{KV|Lighting Landmark|intn=LightingLandmark|target_destination|Entity at which the reference origin is contained. If empty, the info_lighting_relative's origin will be used.}}
This entity is not present in the FGD, but is in the code. Despite its obsolete icon, this entity is used in the very beginning of HL2 (in the ''d1_trainstation_01'' map) inside the train car Gordon arrives in (where the zoom occurs, before he is teleported to the second, moving, train car).


The function and use of this entity is so far unknown, but a good guess would be that this entity applies static lighting to dynamic objects, improving performance (as this lighting might not count as dynamic lighting despite being inside a moving entity) and/or to avoid lighting fluctuations caused by movement. The info_lighting_relative is placed inside a static environment, and linked via the ''LightingLandmark'' keyvalue to an [[info_target]] entity inside an (preferably identical) moving environment where the lighting will be applied.
== External Links ==
* [https://www.youtube.com/watch?v=JVtIS-Rssjc Video by gtamike_TSGK]
* [http://gamebanana.com/prefabs/7242 Relative Lighting Tutorial by Bud Doug Lee]
* [http://gtamike.tsgk.com/relations.zip Example VMF]
* [https://gamebanana.com/mods/3897 Example VMF (gamebanana)]


Another guess would be that it simply uses the lighting from one place, and applies it to another.
[[File:Z1.jpg|thumb|left|Red and Green tree lighting effect using info_lighting_relative.]]
{{clr}}
[[File:Z2.jpg|thumb|left|Ghost lighting effect using info_lighting_relative.]]
 
[[File:Z3.jpg|thumb|left|Ghost lighting effect using info_lighting_relative.]]
==Keyvalues==
* {{kv targetname}}
* '''LightingLandmark'''
: <?> In HL2 this keyvalue contains the name of an [[info_target]] entity in the second train car - a duplicate version of the boxcar the info_lighting_relative is in, seemingly at the exact same place inside it.
 
<!--This entity doesn't have any flags or outputs, and all(?) inputs seem to be available for it.-->
 
[[Category:Entities]]

Latest revision as of 12:31, 21 August 2025

Obsolete-notext.png
This entity is obsolete. Its use is discouraged. It may only exist/function in older engine branches.
Icon-NotInFGD.png
This entity is not in the FGD by default, except in Portal and Garry's Mod.
See below for instructions on making it available.
C++ Class hierarchy
CInfoLightingRelative
CBaseEntity
C++ baseanimating.cpp
Info lighting.png

info_lighting_relative is a point entity available in all Source Source games before Left 4 Dead Left 4 Dead. An entity that allows a model to be lit from a different light origin without affecting the environment around the model. Great for lighting up trees with many lights or doing manual light correction. It is used in d1_trainstation_01, where inside the train car Gordon encounters G-Man.

Deprecated by LightingOrigin keyvalue and SetLightingOrigin input for point entities (these however are not in Valve's FGD by default), use those instead, as they can accept any entity as a lighting origin.

Keyvalues

Lighting Landmark (LightingLandmark) <targetname>
Entity at which the reference origin is contained. If empty, the info_lighting_relative's origin will be used.

External Links

Red and Green tree lighting effect using info_lighting_relative.
Ghost lighting effect using info_lighting_relative.
Ghost lighting effect using info_lighting_relative.