The majority of light authoring in X-Plane is made through its large library of named and parameterized lights. These "known" Laminar Research lights come with an assortment of colors, directionality, and tie-ins with datarefs and airplane electrical systems to fit most artistic visions. Fully customizable lights are also available for your artist and complex plugin needs.
These "known" lights are listed in a file called "lights.txt", located in your X-Plane installation folder. A copy is also included in the addon folder "io_xplane2blender/resources/lights.txt". See the section About lights.txt for more about using this file.
Type- XPlane2Blender uses this to tell if the artist wants a "Point" or non-"Point" (such as a "Spot") light. "Point" lights have no meaningful direction and are therefore used for things like car headlights and blinking runway lights. They're more optimizable than non-"Point" spotlights. A "Spot" type has a meaningful direction to it and are good for representing things like spotlights. Further mentions of
Typewill refer to XPlane2Blender's setting unless otherwise noted.
Color- Custom Lights and old style lights use this for their RGB value
Typerefers to what type of information is required to use them.
- "Named" - Named lights use a specified pre-made light in X-Plane. They're the most common kind of light authors use
- "Param" - Param lights are like named lights, but also allow partial customization of their behavior such as color, direction, or brightness
- "Custom" - Custom lights are a textured billboards that use a size, a subsection of the OBJ texture, and, optionally, a dataref to control the look of them
"Default (deprecated)", "Flashing (deprecated)", "Pulsing (deprecated)", "Strobe (deprecated)", and "Traffic (deprecated)" are old X-Plane 7 lights, now deprecated.
Developer Blog Articles
OBJ8 Spec Sections
lights.txt Comment Sections
- Lines 12-18, 38-62, 76-97
"Light Name" refers to the name of a pre-made light, such as "taxi_b" or "airplane_nav_left_size", see the setting
Nameabove for more details. "Named Light" refers to the type of XPlane2Blender light which takes a light name and no parameters.
Most spot lights can be aimed directly, without animation. Simply rotate the light and it will appear in X-Plane as so! The exporter will use the lamp's rotation, even if a param list includes X, Y, Z or DX, DY, DZ components. (The param list must still be valid.)
This What-You-See-Is-What-You-Get behavior will be activated if the Lamp is a "Spot" (or other non-"Point") lamp and a "Named" or "Param" type and the light name is included in the
lights.txt is essentially a massive table of information for X-Plane defining lights to be used in the sim. An artist only needs to be concerned with an extremely small portion of it. To read it, you'll need a good text editor (not Notepad or Word!) that can handle different line endings and has an adjustable tabstop (8 seems to work). Comments are prefixed with a #. It is located inside the addon folder,
io_xplane2blender\resources\lights.txt. It can be replaced by the lights.txt file included in X-Plane.
Do not make changes to this file! Changes may be incompatible with X-Plane and may, at best, make your object export incorrectly or, at worst, crash X-Plane!
The vast majority of this file is not relevant and may be misleading. The most important column is the second one: the light name. Multiple lines with the same light name represent different light drawing styles X-Plane can choose from, not different lights with the same name.
- 1.4.LIGHT_PARAM_DEF appron_light_billboard 5 X Y Z W S
- 2."LIGHT_PARAM_DEF" declares that the following is a description of a parameterized light
- 3.The light name
- 4.The number of parameters, meaningless to an artist
- 5.The parameters for this param light which must be replaced by the artist
Any light that doesn't have an associated LIGHT_PARAM_DEF is known simply as a "Named Light".
Though mostly undocumented, one can usually find the purpose of each light using some of these tips
- Experiment! Make a scenery object with lots of lights and view it in X-Plane!
- Light names are usually very descriptive
- Comments nearby may explain their purpose
- If a light name ends in "_bb" it usually means it is meant to be used with a billboard light. Look for a corresponding "_sp", such as "helipad_flood_bb" and "helipad_flood_sp"
- If a light name ends in "_sp" it usually means it's meant to be used as a pair with another light such as "taxi_g" and "taxi_g_sp" or "radio_const_bb" and "radio_const_sp"
- If it is a param light, the parameter names may be of help
- Though the first column is meaningless in terms of artistic and authoring decisions, it could give clues as to it's use. For instance, if a light name only has BILLBOARD types associated with it, one can safely guess that the light will be a billboard. "SPILL_HW_FLA" lights such as "heli_morse_beacon" will FLAsh at an interval
- If your file browser is sufficiently advanced, you can search for example uses of the light name in the text of existing .obj files in your X-Plane folder
The first column of each uncommented line of the light.txt is a defined light type. Each light name can have multiple types, and X-Plane will choose between them automatically. For instance, "taillight" includes 2 types for X-Plane to choose from:
This information is only used by X-Plane and should not influence your decisions about whether to use Point or Spot lamps. The differences between SPILL_HW_DR, SPILL_SW, and etc have no impact on your work. For the overly curious, it is documented at the top of the file.