2/26/2024 0 Comments Dataref editor x plane 11Nine numeric parameters define the appearance of a custom light. Typically the texture coordinates and size are not modified. Most X-Plane provided datarefs for lights reinterpret the RGBA values (and replace them with white and a variable-level alpha) lights can be colored by coloring their texture. In return for this flexibility, the author loses control of the tint of the light (because the dataref always sets the light tint to white). In this example, the meaning of RGBA is completely changed – instead these four parameters form a vector and light number. The result is a directional landing light. The dataref replaces the RGB values with 1,1,1 (white) and the alpha value with the brightness based on the current camera angle, or 0.0 if the light is off. (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 |