Tech Support Blog

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Monday, 7 September 2009

Parameterized Lights, Generic Lights and Plugin Controlled Lights

Posted on 12:57 by Unknown
There are a few changes to 940 regarding airplane lights...I will try to get some permanent documentation on the Wiki, but here's the basic ideas:

There is a new "type" of light in the OBJ8 format, called a parameterized light. A parameterized light is somewhere between a named light (totally as-is, can't be modified, simple to use) and a custom light (totally complex, can do anything, requires a lot of work). In a parameterized light, you control just one or two aspects of the light.

Parameterized lights are aimed at airplanes, not scenery, because typically parameterized lights are customizable and slow.* The goal is to give airplane authors some flexibility without having to invent a huge number of named lights.

Consider, for example, landing lights. A landing light could vary based on what switch controls it (we have 16 now), how big it is (many authors have pointed out that one size does not fit all) or how wide it's view angle should be. (Lights that are inset in a structure might not be easily viewable from the side.) With a parameterized light, we can provide one light definition with 3 parameters instead of a huge matrix of lights.

Generic lights are a new collection of 64 lights that can be used for any purpose, sort of like misc wings, misc bodies, and sliders. The main difference between a landing light and a generic light is that the landing light halo won't show up on the runway when a misc light is turned on. They are meant to be used for logo lights, inlet lights, etc. A series of new named lights will "listen" to the generic switches.

(Tip: combine ATTR_light_level with generic lights to have a light turn on and your lit texture appear at the same time.)

Finally, there is now a plugin override for the beacons and strobes (and in the systems model there can be up to 4 separate sets of beacons and strobes flashing at different times). With parameterized lights you can make two sets of strobes and use a plugin to control when they flash.

The combination of these three things let an author create an airliner that models all of the various lights and their behaviors.

* Slow needs some qualifications here. There are two code paths for lights, the fast and slow path. The slow path IS pretty fast, just not as fast as the fast path. The fast path is expected to be able to draw at least 10,000 lights in a single frame on low-end hardware, while the slow path is expected to be able to draw at least 500 lights per frame on low-end hardware.

500 lights is a lot for one airplane, especially if you have to place them by hand. And most modern computers will easily do thousands of slow lights.

Basically slow lights are not appropriate for scenery objects in the library that might be placed a huge number of times: OBJs attached to roads (e.g. street lights), OBJs used for buildings, taxiway lights. The are plenty fast for airplanes. In the X-Plane world, slow doesn't really means slow, just slower than something else.
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in aircraft, file formats, modeling | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Pixel Shaders and Moore's Law
    In my post on 64-bit computing and X-Plane, there's a point that's implicit: there is a cost (in development time) to adopting any ...
  • Hierarchy and WED
    I just finished fixing some bugs in WED regarding the hierarchy view. (To get a sense of what a hierarchy view is like, try AC3D...) In WED...
  • Is Bigger Always Better?
    We've been preaching "one big texture, not lots of little textures" for a while now, and generally speaking, packing a lot of ...
  • Systems Modeling and Physics Modeling
    In past blog posts I have tried to contrast two very different different approaches to simulation, which I would loosely call: "Predic...
  • How Framerate Dies - Glitching
    Back in the good old days (that would be X-Plane 6), X-Plane's framerate would suffer in two ways as you cranked up the rendering option...
  • The X-Desktop and iPhone Are Not Zero-Sum Games
    On the menu this morning: first a whiny rant, then a nerdy one. Someone pointed me at this post. Before I go into my geeky diatribe about l...
  • Clean Airport Layouts
    I have blogged about correct airport layouts before, but let me bring the point up again, because it is so important: You must create struc...
  • So How Big of a Mesh Can You Build?
    I get asked about the maximum mesh density in X-Plane a lot. First, I must note that X-Plane's mesh is adaptive - the triangles are not ...
  • What is a panel region?
    X-Plane 9 introduces a new OBJ feature: panel regions. The basic idea is this: In X-Plane 8 you could use the 2-d panel as a texture in you...
  • Why Do Custom Lights Use the Object Texture?
    I am trying to be disciplined and put documentation on the X-Plane wiki , and limit the blog to announcements, rants, and explanations of wh...

Categories

  • absurdly cute
  • Air Traffic Control
  • aircraft
  • Android
  • animation
  • announce
  • cockpits
  • documentation
  • drivers
  • file formats
  • global scenery
  • Goofy Screenshots
  • hacks
  • hardware
  • hobbies
  • inside x-plane
  • installer
  • ipad
  • iphone
  • legal
  • localization
  • modeling
  • off topic
  • palm pre
  • panels
  • performance
  • plugins
  • political
  • scenery system
  • tools
  • X-Plane 10
  • XSquawkBox

Blog Archive

  • ►  2011 (12)
    • ►  February (1)
    • ►  January (11)
  • ►  2010 (111)
    • ►  December (4)
    • ►  November (4)
    • ►  October (10)
    • ►  September (9)
    • ►  August (12)
    • ►  July (8)
    • ►  June (4)
    • ►  May (13)
    • ►  April (13)
    • ►  March (11)
    • ►  February (12)
    • ►  January (11)
  • ▼  2009 (130)
    • ►  December (16)
    • ►  November (11)
    • ►  October (6)
    • ▼  September (16)
      • Off Topic: Freecycle
      • Closing the Washington Branch
      • Normal Maps Can't Be Mirrored
      • I Hate the Term Photo-Realistic
      • Pie in the Sky: Future Rendering Tricks
      • Removing Third Parties is a Diagnostic Test, Not a...
      • Marking the Ground? Use a .pol or .lin.
      • Higher-Order Beziers? Probably Not
      • Parameterized Lights, Generic Lights and Plugin Co...
      • Yank That Stick Back
      • Proximate And Ultimate Crashes
      • Pay No Attention To That Last Post
      • Caught With My Pants Down
      • Scalability and apt.dat
      • Marketing And Fact
      • Test Your Add-Ons Now!
    • ►  August (12)
    • ►  July (11)
    • ►  June (9)
    • ►  May (5)
    • ►  April (10)
    • ►  March (9)
    • ►  February (9)
    • ►  January (16)
  • ►  2008 (147)
    • ►  December (18)
    • ►  November (10)
    • ►  October (7)
    • ►  September (11)
    • ►  August (15)
    • ►  July (9)
    • ►  June (14)
    • ►  May (9)
    • ►  April (14)
    • ►  March (13)
    • ►  February (6)
    • ►  January (21)
  • ►  2007 (100)
    • ►  December (17)
    • ►  November (13)
    • ►  October (13)
    • ►  September (9)
    • ►  August (17)
    • ►  July (7)
    • ►  June (4)
    • ►  May (6)
    • ►  April (9)
    • ►  March (2)
    • ►  February (3)
Powered by Blogger.

About Me

Unknown
View my complete profile