Simulating the ever-changing scenery

The secrets of the environment settings

If you look at aerial imagery of a region every day for a year, it never changes. Yet if you would fly over the same region in reality every day, it would almost never look the same twice. In reality, nature is a dynamically changing environment, and what you see from a cockpit reflects this.

Some of these changes have to do with weather – on a cloudy day, the light is different from bright sun, the shadows are muted, the amount of haze may change so that faraway terrain looks fainter… and these are readily captured by the weather simulation.

Yet there are more subtle effects. For instance, snow may linger on the ground even on a sunny day with temperatures above freezing if the original layer was thick enough. Snow may fall, but not remain on the ground if the ground is warm enough. In essence, whether you see snow or not depends not so much on how the weather is now, but how it has been the last days, weeks or even months.

Such changes to the scenery in FG are taken care of by the environment settings which control how the terrain is shown. You can find the menu as an entry under Environment.

Currently, the full range of environment effects is only implemented for the Atmospheric Light Scattering (ALS) framework starting from medium quality settings, however the snow effect is available for all rendering frameworks.

Let’s explore some of the things this can do:

Seasonal changes

This is how the default terrain is shown without any environment effects – a summer day in Grenoble:

Moving the season slider somewhat to the right brings autumn coloring into the scene – deciduous tree patches change colors to orange-red, fields and grass appear yellowish:

Changing to a yet later season causes deciduous trees to shed leaves and changes most of the vegetation to a dull brown:

Modifying the snow line and thickness allows to add a sprinkle of snow to the valleys, simulating the first snowfall of late fall:

Finally, adding more snow changes the whole scene into deep winter:

In coastal regions, the appearance of water can also be changed. Here is the coast of Norway near Bergen in summer:

Using the snow and ice sliders allows to simulate winter with lots of drift ice in the sea:

Using a combination of the season and snow settings, it is hence possible to simulate a lot of the seasonal changes during the year. But that’s not all.

Dust and greenery

Have you noticed how colors fade during a long spell of dry weather, to be restored only when rain washes the dust away? Or how a desert might look green for a few weeks after rainfall, to change to its usual dusty appearance later? The environment system also provides those options – let us take a look at the Sierra Nevada. This is how the chain appears from China Lake (with a good measure of snow added to the peaks):

Using the dust slider makes all the colors fade and lets the scene appear dry:

Using the vegetation slider instead gives a fresh green touch to the desert as if after a rainfall:

Changes may be subtle and affect more than just color. Consider this close-up of a dry runway:

The environment settings allow to make it wet (this will happen automatically when the weather predicts rain, but terrain can be wet without current rainfall). This creates puddles and alters the whole reflectivity of the surface – look at how the light changes:

Finally, adding snow covers the runway partially in snowdrifts:

Why can’t this happen automatically?

The environment subsystem just renders as it is told, it is hence easy to misuse it – think snowfall and ice cover on Caribbean islands for instance. Sometimes, the question gets asked why this is implemented that way, and why parameters aren’t just set automatically.

The answer to that is – based on what should they be set? Flightgear does not include a global climate simulation as would be needed to determine how likely it was that there was e.g. snowfall during the last days or weeks, or that there was a dry summer and hence everything should look dusty.

The idea is that the user can adjust these settings, either based on how the scene currently looks at a location, or based on what the user wants to experience (it’s a simulation after all – there’s nothing wrong with simulating a tropical day in Hawaii on a bleak winter day).

If used with some care, the environment settings offer a chance to experience the same scenery in a hundred different ways, each time subtly different.

If misused, the settings deliver weird to crazy results of course.

For the sake of completeness, for low-performance systems which are unable to run shader effects, using the commandline option –season=winter offers at least the choice between the default summer textures and a snow-covered set of textures, although no control over snowline and thickness.

13 Replies to “Simulating the ever-changing scenery”

  1. FSX/P3D has a fixed seasons world map (1 km resolution) for every month of the year (seasons.bgl) that sets the seasonal texture for each 1 km2 landclass tile. To avoid hard boundaries MS did some dithering. The system facilitates for instance mountains to be snowy in March while larger valleys are already green. For this to work MS uses seasonal textures.
    The major drawbacks are:
    – in places where snowy tiles (winter) are mixed with green ones (spring) it looks just silly
    – the terrain does not reflect the real weather – thus it may snow over green fields or a white snow cover may exist with +10°C.

    If one would like to implement a similar system in FG (it could work without seasonal textures, just using some further improved terrain shaders) a seasons map must be implemented into the regions system, for which a GPL data source would be needed. This system would set the basic terrain condition (vegetation color, leaves on the trees or not etc.) according the flight date you set, set the snow line according the season and modify it with the live weather data. Finally, the current precipitation of live weather could modify wetness and snow cover/thickness further.
    This way, the drawbacks of the FSX implementation could be mostly avoided.

  2. FSX, P3D and X-plane have the same METAR information as FlightGear. Somehow they managed to automatically adjust seasons. Does anybody know if they use a climate model?

    1. I’m really not that interested. But it’s all OpenSource – why don’t you give it a try? 🙂

  3. Some of the scenery could change in an auto mode just by METAR information alone. If it rains it likely to be wet on the ground.
    If it snows it is likely to be snow on the ground.
    If it is autumn the trees are likely to be yellowish. Leaf will probably start shedding at a certain time of year closer to the earth poles because of lower temperature.

    Maybe there is some service FlightGear can gather METER information about last days precipitation and temperature to calculate the most likely scenery look.

    I see alot of possibilities here, but keep a checkbox for it so users can manually tweak it if they wish.

    1. This is implemented for rain automatically for rain (the system renders the higher of current rainfall and user setting) and optionally for snow.

      FG doesn’t internally know the season you simulate other than the season slider, and to determine seasons across the world according to the calendar time requires a climate model (if you look at for instance at spring in central Europe, it’s not at all a simple function of latitude). More southern regions of the world do not even have four seasons, they have less.

      So you could spend hundreds of hours trying to code something that’s in the end not halfway realistic. At the end of the day – why not let the user spend ten seconds before every flight with the settings? I don’t see a realistic pain to gain ratio here.

      1. Hi Thorsten. You are right it only takes the user 10 seconds to set it before a flight, but the main drawback I see is that the conditions won’t change during the flight. I completely understand the difficulty of creating a realistic model (and how much work it would be!), but imagine how great it would be to arrive at an airport in which it is raining and the ground and runways are wet, while departing from a dry and dusty place.

        BTW, can Nasal control these enviroment settings? I plan to learn Nasal now (I do know some other programming languages), and it could be fun to play around with those.

        Take care!
        Gilberto

        1. As I said, the rain will automatically adjust runway wetness – you just can’t get dust automatically.

          Nasal can set any of these perfectly well, and would indeed be a suitable tool if you want to try setting them automatically.

  4. Great arcticle. It would be nice if there was a checkbox making the environment settings reflect the current climate conditions in the current flying location. You don’t need climate simulation for that.

    1. Feel free to explain to me how it would be done, because I don’t know how. For instance, the US Southwest is mostly dusty, except when it’s not – after a rainfall for instance. The Mediterranean is usually not snow-covered – except every few years it is.

      Geographical position and current weather (which we can get) is simply not enough – you’d need input we don’t have.

  5. Amazing post as always, Thorsten. I always look forward to your detailed explanations! The ALS system is one of the greatest features ever added to FG.

Comments are closed.