Composite in the Panel Texture, Not 3-d

One thought on alpha and HDR and aircraft:

If you need to create a final flat part of a panel out of multiple layers, some translucent, and you are using panel texture, it is better to composite the entire piece of panel in the panel texture than to layer polygons in your OBJ.

For example, consider the annunciator display on the dashboard that many airplanes have.  There are two ways to build this panel:

  1. Model the entire thing in the panel texture.  The background can be part of the panel background, and each annunciator is a generic instrument.
  2. Each annunciator sits on a transparent background, and the background of the annunciator panel is a separate piece of non-panel texture, on a second mesh, directly behind the first.

Choose option 1!  Tom had to convert the Baron’s annunciator panel from method 2 to method 1.  A few reasons to prefer method 1:

  • The sim does not allow for truly emissive translucent lighting in an OBJ, so the results look better if composited in the panel texture.
  • You can get shadowing artifacts between the polygon layers.
  • Spill lighting on the dashboard will not look quite right if there is alpha.

You won’t use up that more panel texture, but you’ll make your life easier. This technique wasn’t totally possible before, but now with GLOBAL_cockpit_lit you can alwys have your panel handle real lighting.

  • Facebook
  • Reddit
  • StumbleUpon
  • Twitter
  • Google Buzz
  • LinkedIn

About Ben Supnik

Ben is a software engineer who works on X-Plane; he spends most of his days drinking coffee and swearing at the computer -- sometimes at the same time.
This entry was posted in Aircraft & Modeling, Cockpits. Bookmark the permalink.

10 Responses to Composite in the Panel Texture, Not 3-d

  1. Jim Zane (JazAero) says:

    I build all of my instruments out of 3-D geometry and then attach the data refs to that geometry I have a lot of trouble when trying to use panel textures to represent instruments in conjunction with 3-D geometry-based instruments, I’m sort of old-school that way; and I hope this is not off-topic but I’m trying to map the simple radar display textures to some 3-D geometry in the cockpit. But all it does is give me errors about multiple textures in AC 3-D. I don’t use texture based panels at all. But I would love to chat with someone who has experience with it.

    • Ben Supnik says:

      ac3d has strict rules about when it ‘recognizes’ panel texture. Unfortunately I am flat on my back for time and am therefore not helping third party authors with individual projects right now. 🙁 🙁 So if you can find another ac3d user they can probably find the issue. The rules are documented in the README/manual but they are also quite confusing.

  2. Bob Marsh says:

    Does this mean that standard generic instrumentation such as the landing gear
    down indicator which lies in a shadow under the dashboard rim will be able to have a truly emmisive lighting which shows thru the shadow?

  3. vonhinx says:

    So if I understood this correctly, gen_ann_something.png is transparent, taking texture from the panel, and gen_ann_something-1.png has a transparent left and opaque lit section on the right?

    • Ben Supnik says:

      Maybe.
      1. The background can be opaque or transparent, depending on what the annunciator is sitting ON TOP OF. But the background to the annunciator should come from the instrument background or panel background, NOT some other piece of OBJ.
      2. The left side of gen_ann_something-1.png should only be transparent if the annunciator has NO foreground image when off. That depends on the type of annunciator. For annunciators marked ‘glass’ (representing a digital display on a screen) a transparent left side for the -1 layer makes sense. For a mechanical annunciator, well, it depends on the mechanism.

      EDIT: let me make this simpler. I am only saying one thing:
      IF you are going to have additive lighting on an instrument (via either a LIT-1 layer for additive or back-lit type lighting or via a -1 layer for a glass-type lighting)
      THEN: the sum of the panel background and instrument background should NOT contain transparency.

      The reason for this is that additive lighting in the panel only works when there is somethign opaque to add over. You can’t do additive lighting between different triangles in an OBJ.

      • vonhinx says:

        Understood, if that means no transparent background to an additive or back-lit generic annunciator. I think I do have an issue that this might cure.

Comments are closed.