X-Plane 11.01b1: Fixing Cockpit Light Levels

A number of blog comments have been (cough, cough) rather vocal about the cockpit lighting being too bright in the cockpit at dusk. As it turns out, this was a shader bug! Here’s some before and after:

To get a sense of the bug and the fix, look at the panel of the Baron and the wall of the building behind it. These surfaces are both bright-albedo rough reflectors facing in the same direction. You’d expect roughly similar direct lighting levels* for the same surface, and yet in the 11.00 pictures, the cockpit panel is way brighter.

X-Plane uses atmospheric scattering equations to calculate the sun’s direct sun color – the sun light becomes “reddish” at low angles because the blue light has been scattered out more, by going through more air than at higher sun angles.

But we can’t always use this formula! When you view a weapon in the weapon preview screen, where in the world is it? What time is it? The answer is: no one knows, so we just render with proxy lights and not the full atmospheric model.

The bug was: we were using proxy lighting colors and not the actual scattering-based lights to calculate the interior of the airplane, causing huge direct-lighting mismatches between the interior and exterior of the aircraft. If you had a part-interior, part-exterior model (e.g the air-stairs of the plane folded up inside the cabin) you might see a huge lighting difference.

11.01 correctly uses scattered sunlight in the airplane too, resulting in much less “electric” sunsets.

 

* Assuming no cockpit shadows – if you really want to put back cockpit shadows after this fix, um, go ahead, but I continue to think that the shadows look too awful due to the very low sun angle, and the direct light isn’t a problem now that it’s fixed.

  • 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 Development. Bookmark the permalink.

34 Responses to X-Plane 11.01b1: Fixing Cockpit Light Levels

  1. Tom Knudsen says:

    Thank you Ben, most welcomed fix.

    Question: Was it not a function to made thumbnails of default repainted airplanes? When I select my airplane (Default C172 and the texture I made), I cannot see any “generate preview/thumbnails” button?

    Am I missing it or is it gone?

    • Tyler Young says:

      To use the icon generator, you’ll need to first load up the sim (pick any location and start a flight in the plane whose icons you want to generate). Then, from the Developer menu, click “Regenerate icons for current aircraft.”

      • Tom Knudsen says:

        Thanks Tyler, cudos on the new ui, love it 🙂

      • Tom Knudsen says:

        Hi again..
        Did try your suggestion, but sad to say it did not work.
        1. Developer menu – Selected Regenerate, paint cycles but it do not return my paint.

        2. In menu, no paint is shown on the aircraft

        3. Pressed the regeneration button in menu, same happens but no paint is shown there either.

        When I select my plane, it comes up as all white. When XP starts the paint is there.

  2. Morten says:

    Hi Ben,

    Will the artifacts seen in the clouds since 11.01b1 be fixed in 11.01b2 ?
    I submitted a bug report on 11.01b1 on this issue including screenshots and log.txt.

  3. vonhinx says:

    Would fading internal shadows out at very low sun angles work?

  4. This looks way better than before. Great!

    Regards,
    Marc

  5. John says:

    Hello Ben,

    Sorry for commenting again on this issue. I don’t see any rain with the default weather. Though I have the rain sounds and the precipitation is set to full with cumulus clouds. Is it a bug? with version 11.00 currently. no rain visible even in the stormy preset.

    Thanks for all your work. Loving it.

  6. JoaoVBettu says:

    But is this a problem with all planes or just the default ones?

  7. SL9 says:

    Can plugins and scenery gain access to the current scattered lights for, for example, matching pre-rendered objects with the current atmosphere/sun color? Hi

  8. RD says:

    Any news regarding lights not being occluded by clouds?

    • Jan Vogel says:

      Check again – they work ok for me now (11.01b1).

      Sometimes it looks like they don´t occlude, especially from above with a broken cover, but once you get inside the clouds, they work well.

      • Ben Supnik says:

        It depends on the cloud type. If the cloud type is overcast or stratus, you should get complete occlusion. If you are using real weather and are transitioning between cloud types, you’re going to get imperfect results.

        The goal was to fix it enough to use the sim for IFR training, e.g. if you say “solid layer, no one sees lights” then..you don’t.

        • RD says:

          So if the “goal WAS to fix it enough”, is it not considered an open issue anymore? Or do you mean the goal for the first release?

          Thanks!

          • Ben Supnik says:

            It’s still an open issue, but this was a case where we could fix a HUGE problem (can’t IFR train at all) and get everyone SOME relief quickly; a more robust solution (e.g. serious rework of blend draw ordering) is a lot more complex and will take a while.

  9. david says:

    Hi Ben,

    I have a question concerning the flight models in XP11.

    I wanted to know if the air density changes are taken into consideration in the flight performance, as XP is built following aerodynamical rules. As I am studying for my PPL right now, I was wondering.

    In summertime (high temperature) => (lower air density) => less lift so greater distance for take off.

    in winter, the opposite. (better lift in cold weather)

    I tried to compare the time to reach 60 knots with the default C172 on the same rway at 5 degrees Celsius and 31 but did not notice any difference.
    Is the parameter taken in account and computerised (or will it be ?)

    Thank you for your answer (i know, it is not something crucial at all, there are more important issues, but I was wondering about the flight model and weather engine)
    Best regards

    David

    • Ben Supnik says:

      Yes – baro pressure, temperature and altitude all come into play! But we let you set temp and pressure independently, so you may be able to create unrealistic scenarios, e.g. super low baro pressure in super cold conditions at sea level…maybe there’s a storm like that but I’ve never lived through one in NE).

    • Jan Vogel says:

      X-Plane does not simulate one feature – and that is the true altitude changing with temperature. The true altitude changes by 4% for every 10C of temperature change. So if you can clear a mountain in the summer just barely flying at 5000´ indicated, chances are that you will smash into it flying the same (indicate) altitude in the winter.

      This is a very important aspect of real flying (google “cold temperature correction”), and I hope that X-Plane will some day take it into account.

  10. Joao Alfredo C. Pinto says:

    Weather insistent changes to broken.
    Select other Weather in flight configuration, clear, cirrus, overcast…, but when start flight, weather changes to broken.
    In Customize Weather mode = Manually configured

  11. Philipp says:

    Can you do anything to increase the xplane performance on the AMD Ryzen platform? My 1700 feels slower than my old 2500k@4,5 in xplane.

  12. bert says:

    any news about the fmod documentation? Will be there datarefs? I like to hook up xivap into fmod/x11

    • Ben Supnik says:

      1. FMOD docs are partly done.
      2. You use datarefs to control FMOD but you can’t use FMOD with -just- datarefs.
      3. For 11.0 we support FMOD only for aircraft, so no way to integrate it with X-Ivap YET.

  13. Colin Hutchings says:

    I saw the lighting improvements and and I have to say they are much better on my system.
    Unfortunately I had to revert to the previous version as the latest update crashed to desktop every time I switched on Airport Navigator.
    If that’s fixed I will jump straight back.

    • Duncan White says:

      Airport Navigator v1.4.6 was released to work with X-Plane 11.01b1. A bug report was raised with Laminar about XPLMGetNavAidInfo causing the crash to desktop. So its fixed & you can jump straight back.

  14. Alexander John says:

    This is something that has really bugged me. I think internal cabins of aircraft will still be entirely lit up by the sun during sunset/sunrises though, so I hope that shadows on aircraft can be fixed to be more realistic, i.e. we won’t see sunlight on the wing which should be in the shade.

Leave a Reply

Your email address will not be published. Required fields are marked *