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

$illumposition: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Making use of the "this is a" template for the first line here.)
No edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{this is a|QC command|name=$illumposition}} It sets the lighting origin for the model, relative to its origin. By default the <code>$illumposition</code> is the center of the model geometry, as computed by [[StudioMDL_(Source)|the model compiler]].
{{LanguageBar}}


When illuminating an animated or moving model in the engine, the lighting calculations are only done for the two brightest light sources.  All the other lights, as well as bounced light from the environment, go into a simple single cubemap.  This is the position the model uses for that cubemap.
{{this is a|QC command|name=$illumposition}} It sets the lighting origin for the model, relative to its origin.
 
When illuminating an [[CBaseAnimating|animated or moving model]] in the engine, the lighting calculations are only done for the two brightest light sources, via the [[BSP (Source)#Worldlights|worldlights lump]].  All the other lights, as well as bounced light from the environment, are taken from a single [[ambient cube]].


You can optionally specify a bone name for the illum position. If you do, the position specified will be interpreted as being relative to the specified bone.
You can optionally specify a bone name for the illum position. If you do, the position specified will be interpreted as being relative to the specified bone.
{{note|$illumposition can be overridden per-entity on most entities (including [[prop_static]]) by using the {{code|lightingorigin}} [[KV]].}}
{{important|The default illumposition is ''not'' the origin of the model, but rather the center of the model, based upon the first [[$sequence|sequence]].}}


== Syntax ==
== Syntax ==
Line 19: Line 24:


__NOTOC__
__NOTOC__
[[Category:QC Commands|illumposition]]

Latest revision as of 21:13, 18 July 2025

English (en)中文 (zh)Translate (Translate)

$illumposition is a QC command available in all Source Source games. It sets the lighting origin for the model, relative to its origin.

When illuminating an animated or moving model in the engine, the lighting calculations are only done for the two brightest light sources, via the worldlights lump. All the other lights, as well as bounced light from the environment, are taken from a single ambient cube.

You can optionally specify a bone name for the illum position. If you do, the position specified will be interpreted as being relative to the specified bone.

Note.pngNote:$illumposition can be overridden per-entity on most entities (including prop_static) by using the lightingorigin KV.
Icon-Important.pngImportant:The default illumposition is not the origin of the model, but rather the center of the model, based upon the first sequence.

Syntax

$illumposition (x) (y) (z) [optional bone name]

Examples

$illumposition 0.000 0.048 -0.115
$illumposition 0.000 9.21 4.00 ValveBiped.Bip01_Pelvis

See also