The HDR check-box turns on HDR mode in X-Plane 10. But what is HDR mode?

High Dynamic Range( HDR) mode in X-Plane actually enables many features at the same time. We put in a single check-box because the features all fit well together, and we wanted to keep the interface simple.

  • High-dynamic range rendering.  In HDR mode, the world is rendered across a wider spectrum of brightness (just like real HDR photography)*, to better capture lighting levels.  The result is then compressed to low dynamic range (which is what your monitor does).
  • Tone mapping with real-time exposure.  The HDR image is converted to LDR via a tone mapping algorithm that attempts to preserve the character of the image while keeping the dynamic range within limits of your screen.  The level of exposure changes in real-time: if you look at a bright scene and then duck the camera behind a building, you’ll see your eyes slowly adjust up, then everything gets dark when you stare at the sun.  (The level-adjustment algorithm runs entirely on the GPU for performance.)
  • X-Plane uses deferred shading for all rendering except for translucent glass in aircraft. Deferred shading is a 2-pass approach to rendering that is commonly used in today’s shooter games, because it allows us to efficiently draw huge numbers of real 3-d spill lights.  In the case of X-Plane, you get a lot more night lighting.
  • The individual puffs in our 3-d clouds have soften intersection with the terrain to avoid ugly cloud-ground collisions in low-cloud conditions.  (See page 1 and 4 of the article for before/after pics.)
  • We emit heat blur from the engine particles.  The ability to add blur effects is a capability of the deferred rendering engine; something I’d like to do more with in the future.
  • Optional atmospheric scattering.  This effect enables a more advanced lighting and fog shader that runs on the GPU and models the diffusion of light through the atmosphere as it hits oxygen and water particles.  Atmospheric scattering is what makes the far view ‘bluer’ than the near view.

So the moral of the story is: the HDR check-box actually enables a lot of effects!

Why Did You Put Everything in One Check-Box?

We had a few reasons to put a lot of effects into one bucket:

  • Some of those effects require other effects.  For example, you can’t have the heat blur or soft cloud puffs without the deferred renderer.
  • We wanted to keep the UI simple.  Our view is that the rendering settings screen is way too complicated and hard to tune, something we’re still looking to improve.  So any time we add features, we have to ask: can we make this simpler?**
  • There are fewer combinations for us to test if there are fewer settings.  Sometimes we can have bugs based on combinations of features, so having the features all enable at the same time simplifies development of testing, which is extra important when we have to test GPU features against different hardware and drivers already.

* GPU nerds: The final render surface is in 16-bit floating point format.

** If you really want to get tweaky, most of the sub-effects within HDR mode can be accessed by settings.txt.  But if you edit settings.txt and your computer transforms into an alien cyborg and destroys humanity, don’t hold me responsible.

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.

12 comments on “HDR Isn’t Just HDR: What Does That HDR Check-Box Do?

  1. I love there is an option for choosing weither if you want to have this included or not. Personally I think it work on some RPG games, but not in X-Plane, nighttime yes but daytime no. Why? Well the downside to HDR/tonemapping is coloring and contrast, and X-Plane ground texture favours none of those features. HDR makes daytime ground texture way more saturated and it looses detail in the shadows due to contrast and brightness.

    You say HDR includes lots of effect, could you elaborate further on this Ben and furthermore do you think HDR/OpenGL serves ATI or Nvidia better?

  2. Hahahaha… is good to know I always wondered why get low fps with HDR :). Now I understand. Tring to get a Frankenstein to destroy the world hahahahah 🙂 Regards ben!

  3. I love how X-Plane utilizes modern hardware! There techinques feels very modern. I like the approach of your strategy building X-Plane.

  4. I couldn’t stomach HDR off and I’m glad I found reasonable settings for my system that delivers 29~30 fps, but I wonder about internal versus external lighting. External affects internal directly and via reflections, the converse is also true but to a lesser extent in most cases.

    When a cabin is set to internal lighting, it doesn’t get enough external light and looks too flat (except when lit by lightning). Adding minimal spill lights fleshes it out magnificently. When stairs are given external lighting, they don’t seem to respond to internal spills (when retracted inside). Given internal lighting, they don’t respond to external spills when deployed outside — correct me if I’m wrong.

    Don’t we need just one lighting system or a Both (internal and external) option for something like retracting stairs? Or a modicum of ambient spill for internal areas?

    1. The internal vs external lighting designation basically implements “lighting groups” for an airplane, a technique common to a lot of game engines. We do this for two reasons:

      1. To correctly render what we could do in v9 and
      2. Because the spill lights don’t have shadows, they tend to go through walls. Without the internal vs external groups, your cabin lights light up the runway and your landing lights light up the first class lounge.

      The stairs are a very hard case, because of course in real life when the airplane isn’t closed light leaks. I think your best bet is: mark the stairs as external and add an external HDR light near the door way that you slowly bring up to add ambience around the door way when the lights are on in the cabin and the door is opened. This will cause the internal cabin to appear to ‘dump’ light on the stairs and (if present) anything else nearby.

  5. I prefer to have a lot of rendering options – especially for expandable sims. Tuning the rendering settings would be easier if:
    a) more info was shown about what the sliders actually do and which part(s) of the system they affect mostly,
    b) the steps would be more consistent.
    c) integrated gpu-monitoring (this is on the slate, right?)

    Cheers
    Flo

    1. Hi Flo,

      We’re going in the opposite direction: fewer settings. Most users don’t understand what they do and don’t want to spend a ton of time screwing around with them. The good news is that everything we don’t expose (and anything we might ‘take away’ in the future) is in settings.txt.

      Integrated GPU monitoring is coming to the extent that I have code for 10.30 that shows you GPU and CPU time per frame, which gives you a better idea of why fps are slow. But that’s meant for aircraft developers; our goal has to be to make the settings more simple, direct and automatic, not to teach every one of users how a GPU pipeline works.

      cheers
      ben

  6. Ben, I don’t get it.

    With statements like “In HDR mode, the world is rendered across a wider spectrum of brightness (just like real HDR photography)*, to better capture lighting levels,” and “In the case of X-Plane, you get a lot more night lighting,” I just don’t understand why night flight in X-Plane 10 is dark as the abyss for me. I think it’s a substantial failing on Laminar’s part that few ever talk about. Significant allure was built on those sexy night shots of lit billboards and headlights spilling light onto adjacent grass, and of course the airport environment where taxi lights illuminate the terminal ahead. VERY sexy, all of it.

    But get into the air and Laminar seems to have forgot what it’s supposed to look like from cruise altitude. I might as well be flying over the ocean as over a densely populated area of land. The brightness from the ground is unacceptably dark. Further the gamma adjustment system seems a complete mess. Adjust it during flight (I know a restart is theoretically required, but not really, sort of, I’ve discovered) and it might help, or it might not. It’s schizo in that regard, and if you forget to reset it at the end of a flight, you’re screwed on the next, where you WILL have to do a restart to get back to a baseline gamma setting.

    I flew from Washington DC to Madison, WI one evening earlier this year – on a real airline. The flight had us heading out over Lake Michigan somewhere around Grand Haven and making land fall on the Wisconsin side just north of Milwaukee. It was a clear night. The entire southern shore of Lake Michigan was outlined in that golden sodium vapor light. The Chicago area, some 50 miles or so from us, was ablaze with light! Little lines of sparkling spun-gold light for all the major the North/South streets. Stunningly beautiful!

    Fly that same route in XP? Forget it. Nothing but black. Making landfall at MKE in XP10 is perhaps what it might have looked like back in the gas-light days before man even knew how to fly. Laminar has got to fix that. Or if I’m missing something critical, please tell me what it is, because I’ve not found anything that renders anywhere near real-life night lighting.

    I don’t know if flying in non-HDR yields any greater nighttime lighting brightness, but again, what would be the point of running non-HDR?

    My system is not optimum, but not a slouch either, so I can run HDR. i7-950 OC to 4.2GHz, 12GB RAM, NVIDIA 660TI-2GB, Win7 Pro 64bit. Decent frame rates out of XP10 as long as I don’t fly with weather (SkyMaxx next to remedy that?) and I run it pretty much wide open except for Siberian Winter for traffic, keep the shadows in check, and don’t go overly nuts on the AA.

    1. Hi Thomas,

      This post is, I fear, a bug report with a rant tacked on. Without seeing what you are reporting, I cannot comment on it. But please do _not_ follow up in this blog, as this is not the correct forum for bug reporting.

      Please note two things:
      – You have to have the autogen and roads maxed out to get max night lighting, otherwise you’re taking away the light sources.
      – There is currently a known bug that as your screen res gets bigger, the billboards become effectively less bright. This will be addressed in a future patch — probably 10.30.

      If you think you STILL see lack of brightness (e.g. you go to HDR at 1024 x 768 and things are STILL dark with the autogen maxed out), please _file a bug_ and include a screenshot and a log.

      In terms of the original point of the blog post, you should be able to verify spill light off of headlights and streetlights in HDR mode visually – it’s definitely there.

      Cheers
      Ben

Comments are closed.