Lighting Definitions
From X-Plane Wiki
Contents |
Definitions
Lighting in X-Plane typically consists of three distinct elements:
- The lighting fixture is the 3-d model of the device that creates light, e.g. the housing of a VASI, or a runway light structure.
- The billboard is a square texture that always faces the user. It creates the look of the direct "glow" of the light, particularly from far away.
- The "halo" is the effect of the light on other parts of the scenery, such as the ground.
Lighting Fixtures
Lighting fixtures are almost always modeled as OBJ files. Sometimes for in-wing landing lights, the author simply draws the light onto the wing texture.
Lighting Billboards
Lighting billboards come from two sources:
- Via OBJ files.
- The aircraft file contains the coordinates of some typical airplane lights - X-Plane creates billboards for these lights directly.
Lighting Billboards in OBJ Files
OBJ files can create lighting billboards in 3 ways:
- Using Named Lights via the LIGHT_NAMED command.
- Using Custom Lights via the LIGHT_CUSTOM command.
- Using legacy RGB lights, using the LIGHTS command. Note that this technique is not recommended, and is provided only for backward compatibility.
Comparison of Named and Custom Lights
This table summarizes the differences between named and custom lights.
| Named Lights | Custom Lights |
|---|---|
| Very simple to use | Complex to use |
| Potentially faster rendering path | Limited rendering speed |
| Cannot be customized | Lots of Customization Options |
| Visual quality can improve with new versions of X-Plane | Cannot take advantage of new rendering technology |
| Rendering Look Might Change | Rendering always looks the same - no surprises! |
When to Use Named vs. Custom Lights
- Use named lights when a named light exists that corresponds to your needs.
- Do not use named lights for uses other than their intention. For example, do not use taxiway lights for lights at a police station - only use them as taxiway lights.
- Use custom lights when you need something that the named lighting system does not already provide.
(Why not use the taxiway lights for police station lights? In the future, the taxiway light might change in a way that makes it look better for taxiways but worse for police stations, affecting your scenery.)
Note: LR can add new named light types by request!
Lighting Halo Effects
The only true global halo effect (affecting all parts of the sim) is the landing light for the user's aircraft. This halo is created based on parameters in the ACF file.
For runway lights, there are named lights that create small halos on the ground.
Authors often create the appearance of lighting halos by 'baking' lighting to their _LIT texture - that is, directly drawing a halo of light onto the _LIT texture of the aircraft.