![]() (This is a light where X = 0, Y = 0, and Z = -1.) A = 2 would mean the third landing light is used A = 0 means the first landing light. So RGB = 0 0 -1 means that the light points toward the front of the aircraft. The alpha parameter is interpreted as an index number for the landing light switches. Example: the dataref sim/graphics/animation/lights/airplane_landing_light interprets the red, green, and blue parameters as a direction vector for the light. In this case the “meaning” of those lighting parameters depends on the dataref. The most complex case is the one where lighting parameters are interpreted by a plugin and then replaced. Custom Lights with Plugin-Modified Parameters You can put any RGBA into your custom light with sim/graphics/animation/lights/airplane_strobe_light and it will always come out white. Other parameters (RGBA) are replaced by the plugin, so the values in the OBJ file do not matter. In this example, some of the light parameters (size, texture coordinates) work normally. Thus adding this dataref to a custom light makes it into a white strobe. Example: The dataref sim/graphics/animation/lights/airplane_strobe_light replaces the red, green, and blue parameters with 1.0, an the alpha parameter with 0.0 if the airplane strobes are not flashing or 1.0 if they are. Custom Lights with Plugin-Replaced ParametersĪ more complex use involves using a plugin that replaces certain parameters. Example: an object uses a custom light with no dataref to make a simple, omnidirectional, always-on light. Your light will be drawn based on the parameters in the OBJ file. ![]() The simplest way to use a custom light is to not use a dataref at all. There are a number of ways to use custom lights (with or without datarefs): Simple Custom Lights Usage Models for Custom Lights and Datarefs This process happens each time the light is drawn – that is, the next time the light is drawn, X-Plane starts over with the original OBJ parameters.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |