Lights¶
Lights refer to the lighting effect (color, diffussion, spill), not to a physical light object (e.g., bulb, strobe). The object must be modelled separately, with a lighting effect applied to it.
For details on lights and parameters for lights.
name x y zNamed lights are pre-defined light types. You can find a full list of light names shipped with the simulator in
X-Plane/Resources/bitmaps/world/lites/lights.txt. As of X-Plane 12, there are about a five hundred different named lights. Do not edit this file.. The file format can be found in lights.txt File Format.Valid names are find by looking at lower-case names in the second column of the file.
The behavior of these lights cannot be customized – each named light comes with preset behavior, such as blinking or changing color.
Named lights are affected by Animation Commands. Hide commands, rotation, translation animation commands will alter the behavior of enclosed lights.
name x y z [additional params]As Laminar Documentation says, “Parameterized Lights: Named Lights on Steroids”.
This command also takes a named light as the first parameter with the usual (x, y, z) for location, but depending on the particular named light, it allows additional parameter(s) to be provided.
For example looking at
X-Plane/Resource/bitmaps/world/lites/lights.txtwe find the two lines:LIGHT_PARAM_DEF spot_params_sp_pm 9 R G B A INTENSITY DX DY DZ WIDTH SPILL_HW_DIR spot_params_sp_pm R G B A INTENSITY DX DY DZ WIDTH 0We know
spot_params_sp_pmis a parameterized light because there’s aLIGHT_PARAM_DEFrecord. That line tells us that it requires 9 parameters, (R, G, B, A) for color, (DX, DY, DZ) for direction 2, INTENSITY and WIDTH. TheSPILL_HW_DIRline tells X-Plane how to render the light – basically we can change most aspects of this spill light, but during the “day” it is off (=0).Also in the
lights.txtfile, we learn lights normally “face south” (0, 0, 1). So that if you’re standing south of a light looking north, you’ll see it. Parameters (DX, DY, DZ) allows you to change this. INTENSITY is expressed in candela (cd) 1When used in an OBJ8 file, we’ll need to provide first the (x y z) location of the light, then the values for the nine parameters:
LIGHT_PARAM spot_params_sp 0 10 0 1.0 0.0 1.0 1.0 60 0 -0.5 0 0.5Gives a light effect at (0 10 0), so ten meters above our object, with color (1, 0, 1, 1) or purple, 60cd intensity, pointed down (0 -.5 0). The width value (for spill lights) refers to the shape of the cone. Use 1.0 for omnidirectional. Otherwise the widthis is the cosine of half the cone (e.g., width=0.99619 implies a narrow code angle of ten degrees, width=0.08715 implies a wide code angle of 170 degrees). Airplane Parameterized Light Guide has a table of angles.
offset countThis command is deprecated. Do not use
x y z r g b a s s1 t1 s2 t2x y z r g b a s dx dy dz semi dref—
