Tech Support Blog

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

Friday, 21 January 2011

Light Levels: Don't Panic

Posted on 08:27 by Unknown
One of the comments on the suburban preview screenshots I've heard in a bunch of places is "I hope it's not going to be that dark" or "could you guys add more light"?

At this point, light levels in our previews are not reflective (no pun intended) of how the sim will really look. The reason is simple: the light model is not fully debugged (who am I kidding -- it's not even remotely debugged) and it only takes one light model bug to completely throw off the light levels. So I think light levels are going to be a case where the sim's lighting looks a bit funny right up until the last bug is swatted - it's just the nature of those kinds of bugs.

To give you an idea of how much change there is in lighting from version 9 to 10, here's a short laundry list of sim changes that affect lighting:
  • Dynamic Exposure. X-Plane 10 reduces the effect of emissive (_LIT) textures base on the brightness of the sun. In X-Plane 9, emissive textures have the same impact regardless of time of day; thus a lighting effect that looks good at night will look too strong during the day. (In real life, you eyes would adjust for the sun and the artificial light would seem less bright.)

  • Linear Light Mode. This gets confusing fast, but basically, our eyes perceive light in a non-linear way; we are more sensitive to low light levels than bright light levels. Computer graphics mimick this behavior; the result is that most computer lighting models are physically incorrect in some circumstances. Using the non-linear eye-based behavior has been the norm for while because it was cheaper hardware-wise, but these days it is possible to do physically correct linear lighting. We are adding this wherever we can; the correctness varies with rendering settings since physically correct lighting is more expensive GPU-wise and we don't want to hurt fps for low-end users.

  • Deferred Rendering. X-Plane 10 has two rendering modes: a forward renderer (which is a lot like X-Plane 9) and a deferred renderer that supports global illumination and an HDR rendering space.* This creates a certain amount of chaos because the code for forward and deferred rendering are separate, and they seem to develop separate, unrelated lighting bugs.

  • Global Illumination. X-Plane 10 supports global illumination in deferred rendering mode, which means that thousands of lights can light up any part of the scenery system. Thsi means that (for the first time) an object may be lit by dozens of light sources at once. It turns out that the linear light model is a lot more important when we have more than one light source. (In fact, Alex and I realized that we needed a linear light model when looking at highways lit by streetlamps.)

  • New Light Billboards. X-Plane, like most flight simulators, uses billboards (textured squares that face the camera) to draw the light effects near a light source, like glare and bloom. The shape, textures, and equations for the light billboards are heavily revised in version 10.

  • Clouds. The weather system is being rebuilt, including new shaders for cloud puffs. Since cloud puffs aren't like solid buildings or airplanes, they have their own shaders with their own light characteristics. We are also experimenting with increased ground visibility, which affects fog.

If there's a take-away point, it's this: lighting isn't just one piece of code in X-Plane - it's the sum and interaction of a large number of features, all of which are being heavily worked over. Only when all of the features work correctly and work together in harmony will we have what appears to be sane lighting.

* Some users may confuse HDR, which just means an image with increased dynamic range for light levels, with the more common effects that games ship once they have an HDR render: bloom and tone mapping. Bloom is when bright light sources "blow out" and splat light around nearby areas; tone mapping is a technique to visualize that high dynamic range on a normal monitor - often it is used to simulate your eyes adjusting to variable light levels.

I do not think we will ship bloom in version 10.0; I experimented with it and found it had almost no value. First, there are very few scenes in a flight simulator where bloom is that useful; it seems to be a lot more useful for interior rendering, like you'd see in a first person shooter. Second, X-Plane already has a number of bloom-like effects, including halos around lights via billboards, sun glare, etc. With most of the important cases already covered by ad-hoc effects, my early experiments with bloom weren't very promising. We may revisit bloom later, but I don't think it's as important as other effects for now.

Similarly, I don't think we will have dynamic tone mapping because we will have an overall dynamic exposure control running all of the time. Again, the value of tone mapping is more obvious with first person shooters, where you can go from interior to exterior and you want the world to be 'overpoweringly bright' for a while. By comparison, pilots do their best to preserve their night vision, and the interior of an airplane is designed to match that; instruments auto-calibrate their brightness to the overall light levels, making tone mapping less important.
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in inside x-plane, scenery system, X-Plane 10 | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Developer Hardware
    So...just how awesome is my main development machine? Not that awesome. Periodically users ask me what my setup is. Usually the user wants...
  • That's one biiiiig polygon
    Something I'm seeing now that WED is in beta: airport layouts with the entire taxiway structure made from one really complex polygon. I...
  • Caught With My Pants Down
    My friends say I have become a technological curmudgeon...whenever a new gadget or device or operating system comes out, I just grumble abo...
  • Who Am I?
    This week we've seen an increase in questions from new users, potential customers (both in the consumer and professional spaces) and thi...
  • Mirrored Normal Maps
    Normal maps in X-Plane 940 have a funny property: if you flip the normal map horizontally or vertically, the bumps change direction. Things...
  • 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...
  • The Future of WED
    WED 1.0 has gone RC . The on ly change from beta 5 is that I have the latest manual changes from Tom (including Cormac's illustrations ...
  • The 3-d Panel Is Not Always Necessary
    There is no need to use the 3-d panel if you only want 3-d cockpit. That might be the most counter-intuitive statement in the entire univers...
  • OS X 10.6.3 Performance
    OS X 10.6.3 is out. Besides adding a bunch of OpenGL extensions*, it looks like vertex performance is improved on nVidia hardware. My quic...
  • Bad Alloc Crashes in 920 - Bad Timing
    I just received a series of reports today that certain converted scenery will cause X-Plane to crash with a "bad alloc" error. Ba...

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)
      • Various X-Plane 9 Bug Fixes
      • ATC Part II - A Dilemma
      • ATC Part I - Real Physics
      • Light Levels: Don't Panic
      • Next-Gen Cities
      • The Scenery Site Is Wikified
      • LSD.glsl
      • Fun With Servers
      • Plausible, Realistic, Procedural and Algorithmic
      • I Recognize That Scenery
      • 100 Mile Visibility
  • ►  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)
    • ►  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