• Introduction To Terrain Mesh

    Introduction To Terrain Mesh

    By Justin Tyme / FSGenesis

    Terrain Mesh: What It Is and What It Can Do for You

    I'm sure some of the old-timers can remember back to the dawning of the age of desktop flight simulators--the pool table flatness of FS4 and FS5, the synthetic tiled blobs of color that served as mountains in FS5.1 and the hand drawn 3D polygons FSGenesis created for Pennsylvania, Delmarva, and West Virginia for FS98. The floating airports that would settle down to tile-level as you approached closer to the runway threshold. The processors of the day just could not keep up with keeping track of tens of millions of elevation points, although there was a rudimentary terrain mesh system in the code. Back then it was purely visual and I remember one experiment that ended when I flew right through the terrain mesh as if it wasn't there.

    FS2000 brought terrain mesh into the forefront by converting a low-resolution global dataset (GTOPO30) into terrain mesh BGLs and we were able to fly over and through some sort of accurate rounded mountains with elevation points spaced more than a kilometer apart. There were some improvements to FS2002 and more higher-resolution areas in FS2004, but the high-resolution terrain mesh was pretty much left to third-party developers.

    And so it began with the add-on terrain mesh, as more regions were covered by ever more higher-resolution terrain. By the time FSX rolled around, most of the world was covered by at least 76m terrain mesh and many more areas of 38m terrain mesh was available and the contiguous United States and later Europe was available in 10m.

    So as we bask in a Golden Age of Terrain Mesh, of sorts... There are still many who have yet to partake in the profound improvements that can be achieved by the simple addition of highly-accurate, high-resolution topography, making the virtual world much closer to its real-world counterpart.

    What Is Terrain Mesh?

    This will be a simplified layman's explanation aimed at the casual simmer, but anyone wishing more technical detail, see my friend Adam Szofran's, a chief designer of the FSX terrain engine, excellent paper Global Terrain.

    Simply stated, terrain mesh is the shape of the ground. It is the mountains, the valleys and the plains. Other elements of the terrain engine include landclass, phototextures, flatten polygons, and various lines and polygons, such as transportation elements, lakes, streams, coastlines, and airport property polygons. They all work independently and are blended together at runtime to create the scene out your window at any given moment, and FS does this many times a second. We will be focusing only on the terrain mesh portion of that mixture.

    The resolution of the terrain mesh generally determines its detail and accuracy. Very low-resolution terrain has a much farther distance between elevation points, sometimes up to a kilometer, which results in rounded approximations of even the most craggy mountain ranges. As the distance between elevation points decreases, the detail and accuracy increases. This is due to an exponential increase in the number of elevation points as the distance between them decreases from 1226m to 612m to 306m to 153m to 76m to 38m to 19m to 10m. It is at the lower resolutions (38m, 19m and 10m) where detail and accuracy are brought into a sharp focus and your enjoyment of the FS environment is brought to a new level. The higher the resolution, the more detailed and accurate the terrain (output being as good as the source data). The lower the resolution, the less detailed the terrain.

    FS terrain mesh is a Digital Elevation Model (DEM) that has been processed into a BGL file that is understood by the terrain engine, which converts it into what you see at runtime.

    A DEM (for our purposes) is an array of elevation values spaced evenly apart that represent real-world elevation data. This data has been collected over the years by various methods and by various government as well as private entities. It is this source data that is used to create a file that is recognized by Flight Sim (a *.BGL file). The distance between elevation points in the source DEM is the resolution. A shorter distance between elevation points will create more detailed terrain. Source DEMs can come in a variety of resolutions, such as 1km, 300m, 100m, 90m, 30m, 10m, and so on, and determines the highest optimal resolution of the resulting terrain mesh *.BGL file.

    For instance, if you have 90m source data and make a 10m BGL, the result is a massive increase in the number of elevation points that will greatly slow performance, but won't actually add any detail. If you want to make 10m terrain mesh it's best to start with 10m, or higher source resolution. While some over-sampling will result in an overall improvement, such as making 19m terrain mesh from 30m source data, the best result will be obtained by starting with the highest resolution source data you can find. Sometimes this presents problems such as high cost or is simply not available.

    The quality of the end result mostly depends on the quality of the source data. Somtimes the quality of the source data is uneven and questionable and may require time-consuming manual adjustments and editing to remove spikes and pits before it can be released as a commercial product. (These are just a couple of the pitfalls and challenges facing a terrain mesh developer.)

    Level of Detail (LOD) is what Flight Simulator uses to determine resolution output. LOD divides the world into squares. Lower LODs have larger, fewer squares covering the world. Conversely, higher LOD means smaller, more numerous squares. The more squares, the more detail.

    For instance, LOD 6 represents 612 meters (612m) spacing between the elevation points. This is the default terrain resolution for most of the world in FSX. This relatively low resolution turns majestic and jagged mountains into slightly rounded hills. FSGenesis detailed terrain mesh, for instance, pushes that up to 9.6m (LOD12) in the United States and Europe while other areas are increased to 19m (LOD11) and 38m (LOD10). The rest of the world is increased and upgraded to 76m (LOD9), which brings out the sharp points and steep faces of the most rugged mountains, as well as the subtle undulations of the plains.

    FSX Default Terrain Mesh

    LOD6 (612m)
    LOD7-9 (306m-76m)
    LOD10 (38m)
    These maps show the coverage for the default FSX terrain mesh. While better than FS2004, only a small portion of the world is in higher resolutons and none are in the maximum resolution FSX is capable of.

    6 Comments
    1. max_gradient's Avatar
      max_gradient -
      Nels, what a great and well researched article, a pleasure to read. Thank you so much!

      It is good that you also mentioned the downsides (terrain issues around airports, which I have never managed to get fully rid of) and their origins, however I fully agree that it is definitely worth the trouble.

      Once you have done some visual flying over the Andes or Alps you know it was worth it.

      By the way the "FS Global" mesh product includes flattening meshes for all default FSX airports, which you can install individually for airports you frequently use.
    1. alexf's Avatar
      alexf -
      Excellent explanation. Thanks for posting!
    1. jmig's Avatar
      jmig -
      I have used Justin's FSGenesis' mesh since FS2004. It is the first add-on I install. I highly recommend anyone who doesn't use FSGenesis mesh to look into purchasing the products.
    1. WallyBob's Avatar
      WallyBob -
      Justin,

      Well written introduction in layman's terms. Pricing? Well those who are complaining do not realize the the software development tools, hardware and the sometimes cost of the source data, not to mention the hours spent to repair the less than perfect source data required to produce a professional quality product. Nobody ever got rich developing FS addons , most just try to cover their costs whilst trying to keep the electricity on doing what they love to do.

      The only real solution to airport plateaus and other anomalies is to depict the airstrip as it really is with Sloping Runways. Search the flightsim file library for Sloping Runways, there's also a "How To" tutorial.

      Wally-Bob
    1. bonerre's Avatar
      bonerre -
      Quote Originally Posted by WallyBob View Post
      Justin,

      Well written introduction in layman's terms. Pricing? Well those who are complaining do not realize the the software development tools, hardware and the sometimes cost of the source data, not to mention the hours spent to repair the less than perfect source data required to produce a professional quality product. Nobody ever got rich developing FS addons , most just try to cover their costs whilst trying to keep the electricity on doing what they love to do.

      The only real solution to airport plateaus and other anomalies is to depict the airstrip as it really is with Sloping Runways. Search the flightsim file library for Sloping Runways, there's also a "How To" tutorial.

      Wally-Bob
      WallyBob, I hope you don't believe that. If that were the case, as I said, FSX would have cost in the 200-300 dollar range. It is no cheaper for Microsoft to develop the game than it is anyone else which is why there is so much freeware out there. These folks are making a killing. $39 for a single plane?? You've got to be kidding!! Explain how people are putting out freeware planes and scenery then! They aren't going broke doing it.
    1. bonerre's Avatar
      bonerre -
      WallyBob, I hope you don't really believe that about the pricing. If that's the case, then every freeware maker is bankrupt. Sorry dude, but $39 for a single plane, or a single airport's scenery IS overpriced. Imagine how much FSX would have cost had Microsoft charged that much for every plane and every airport (even just the one's with major detailing such as LAX, Hong Kong, etc). You're looking at hundreds of dollars. And "software development tools, hardware and the sometimes cost of the source data"? Who are they buying this from? What a funny joke. Microsoft spent no less time that these folks but didn't charge you that accordingly. These people are trying to make a killing off it, period. They won't be getting my money!! Freeware rocks!!
  • Recent Forum Activity

    ColR1948

    AIFP flights in Australia problem.

    Thread Starter: ColR1948

    I have a fresh install of FS9 using Window 7. I decided for a change to fly around Australia and New Zealand and surrounding Islands, so I...

    Last Post By: ColR1948 Today, 03:33 PM Go to last post
    Raceguy

    P3D T shaped hangars

    Thread Starter: Raceguy

    Hello everyone A few years ago I was still running FSX and a friend greatly enhanced my local airport, Hidden Lake FA40. I have moved on to...

    Last Post By: Jim Robinson Today, 03:28 PM Go to last post
    poko

    When flying over the Netherlands

    Thread Starter: poko

    ATTENTION PLEASE: It seems a concern has been voiced by someone in the Netherlands about the inherent danger of flying with a canoe. To address...

    Last Post By: poko Today, 03:26 PM Go to last post
    Roger Wensley

    lines between land texture rectangles

    Thread Starter: Roger Wensley

    Years ago Holger Sandmann told me how to turn a water lake to an ice lake, and I froze Canada for the winter, and posted the result. He also told me...

    Last Post By: tgibson_new Today, 03:03 PM Go to last post