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.

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.

36 comments on “X-Plane 11.01b1: Fixing Cockpit Light Levels

  1. 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?

    1. 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.”

      1. 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.

        1. I found I had to restart X-Plane after regenerating icons for them to show.

          Also I used the button which appears on the Aircraft “Customize” menu after loading the plane initially.

  2. 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. 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.

    1. This is a problem with all aircrafts, it was actually an issue with graphics engine so it will affect all.

  4. 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

        1. They just try to get close – a rough approximation of sun position is available to plugins, but they’re mostly just trying to get closed based on their own heuristics.

    1. 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.

      1. 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.

        1. 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?


          1. 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.

  5. 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


    1. 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).

    2. 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.

  6. 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

  7. 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.

    1. And it Is. Ryzen 1700 have low single thread performance, which is most important for run X-Plane (and all other big simulators), for that reason i7-7700k is best CPU as it have best single thread performance on market even with stock clocks. After OC it becomes really beast.

      In future there are plans for implement multithreaded rendering with use of Vulcan API and depends on how it will be implemented. Currently OpenGL is single thread rendering (thats reason for single thread performance) and can’t utilize more cores.

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

    1. 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.

  9. 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.

    1. 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.

  10. 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.

  11. I find that the cabin is still incredibly bright with very weak shadows st most times during the day aside from very specific positions relative to them sun. For this reason I still find myself running a shadow script.

Comments are closed.