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

$illumposition

From Valve Developer Community
Jump to navigation Jump to search
English (en)中文 (zh)Translate (Translate)

$illumposition is a QC command available in all Source Source games. It sets the lighting (and cubemap) 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 that this does not cause the $illumposition to move with the bone; only the position of the bone in the reference pose is taken into account.

Note.pngNote:$illumposition can be overridden per-entity on most entities (including prop_static) by using the lightingorigin KV.
Warning.pngRisk of Confusion:The default illumposition is not the origin of the model, but rather the center of the actual model geometry, based upon the first sequence.
Note.pngNote:While illumposition is not used for actual lighting on per-vertex lit and lightmaped static props, it is still used for dictating which env_cubemap to use.

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