• FlightGear's Atmospheric Light Scattering Rendering Framework

    Many Hues of Light

    FlightGear's Atmospheric Light Scattering Rendering Framework

    By Thorsten Renk

    The sky above us (while often taken for granted), is one the most beautiful sights visible to the human eye. Think of a perfect sunrise, a rainbow, or the subtle play of the Auroa Borealis and it is no wonder that it's 'what's above' which attracts many us into becoming real or virtual pilots. Yet, at the heart of almost all of this, is the wondrous phenomenon known as light scattering.

    One of the three rendering engines FlightGear (FG) offers, excels in this area and is designed to capture the beauty of the sky - the Atmospheric Light Scattering (ALS) framework. It does this, not in an artistic way using pre-created textures, but rather by solving real-time approximations of the whole light scattering equations in the atmosphere.

    Think of it like a generator, one which produces (depending on weather and atmospheric conditions) an infinite amount of lighting conditions.


    The Main Phenomenas - Rayleigh And Mie Scattering

    The richness of the sky's visuals comes mostly from the fact that there are numerous types of light scattering phenomena at play. Let us first consider Rayleigh scattering.

    Rayleigh scattering only happens on small particles (smaller than the wavelength of light). The scattering has no preferred direction, but is wavelength dependent - blue light is affected more than red light. It is because of this (diffuse Rayleigh scattering) that the sky appears blue. Rayleigh scattering also happens on air molecules, which means that even in perfectly clear air at sea level, you cannot hope to see farther than 200-300 km before everything fades into Rayleigh blue.

    The following example shows how the sky would look if there were only Rayleigh scattering:

    The image above looks fairly familiar except for one thing; there's no bright halo around the sun. Such a halo is created by Mie scattering. This happens on larger particles (usually fluid droplets) which are comparable in size with the wavelength of light. As a result, the scattering is independent of color, but becomes more strongly directional (under small angles the effect is much stronger). As the example below shows, Mie scattering creates a characteristic halo around bright light sources, but (importantly) does not cause the sky to be blue.

    Only when the two channels are combined do we finally see the familiar visuals of daylight:

    Once these types of non-uniformities (scatterers) get so dense that multiple scatterings occur, the net result is described as diffuse scattering (shows neither directional nor wavelength dependence). The light under an overcast sky is a good example of diffuse scattering as the sunlight gradually 'trickles' through the clouds and most of the intensity is lost.

    In addition to these main phenomenas, there's also a host of less known scattering processes with their own characteristics, some of which we will meet below.

    Tags: flightgear

    1. tiger1962's Avatar
      tiger1962 -
      An absolutely stunning series of achievements, not only in flightsim development but in game engine development as a whole - the FlightGear team are becoming leaders and it's a joy to watch!
      We've always been told that cloud shadows cannot be done, I wonder what the FlightGear team will show the world next?
    1. Nels_Anderson's Avatar
      Nels_Anderson -
      I don't know about anyone else, but I found the details in this article fascinating. Who knew there was so much involved in displaying light properly? Reading this should make us appreciate all the work that goes into the simulators we use.
    1. Semjase's Avatar
      Semjase -
      I don't know but I tried flight gear and found it generally horrible in all aspects.
    1. RonaldVermeij's Avatar
      RonaldVermeij -
      Amazing result guys. Keep up the good work Flight Gear team.
      Show the world what can be accomplished by sharing passion, knowledge and good teamwork!
    1. zangg's Avatar
      zangg -
      Awesome! I`m delighted! My congratulations to Author! And Best Regards!
  • Recent Forum Activity


    strange squares on grass

    Thread Starter: U.Ferrner

    Hi fans, after a long, long time I re-installed fsx again on my PC ( Win 10, 64bit ). For the file EDNX I needed to install the ORBX files....

    Last Post By: il88pp Today, 02:52 PM Go to last post

    Article: Review: Just Flight - HS-748 Propliner

    Thread Starter: Nels_Anderson

    You can view the page at https://www.flightsim.com/vbfs/content.php?18090-Review-Just-Flight-HS-748-Propliner

    Last Post By: HarveyEidenbeeg Today, 02:23 PM Go to last post

    turbine temp gauge ?

    Thread Starter: gypsymoth

    I've put a Mooney_Bravo!Turbine Temperature gauge into the panel of Mike Stone's Beech Bonanza which is turbo-charged, but it appears not to work as...

    Last Post By: tiger1962 Today, 02:17 PM Go to last post

    Eaglesoft SR22 Turbo Stuttering

    Thread Starter: Ralie25

    Hi all, Purchased the Eaglesoft SR22 a few months ago and have been putting up with stuttering ever since. I have now become very frustrated with...

    Last Post By: il88pp Today, 02:15 PM Go to last post