Check out the new USENIX Web site.

Simulating the World

The purpose of the TerraGear project[9] is to develop open-source tools and rendering libraries and collect free data for building 3D representations (or maps) of the earth for use in real time rendering projects. There is much freely available Geographic Information System (GIS) data on the Internet. Because the core data for FlightGear has to be unrestricted, the default use of the project only uses source data that doesn't impose restrictions on derivative works. Three categories of data are used.

Digital Elevation Model (DEM) data is typically a set of elevation points on a regular grid. Currently, 30 arcsecond (about $1\,km=0.6\,mi$) data for the whole world, and 3 arcsecond ($90\,m$) data from the Shuttle Radar Topography Mission (SRTM) for the United States and Eurasia, is available from the U.S. Geological Survey (USGS). Although the SRTM data was originally recorded in February 2000, the signal processing by the Jet Propulsion Laboratory (JPL) is being continuously improved. The recent releases with even finer grids, including 1 arcsecond, would offer much better resolution of landscape features but still suffer from artifacts around large buildings. Future improvements in these data sources are hoped for.

Irrespective of which data source is selected for a given area, an optimizing algorithm seeks to find the smallest number of flat triangles that provide a fairly smooth and realistic terrain contour. This algorithm reduces the number of triangles need to render an area while preserving all the detail within some specified error tolerance.

Other more specialized data such as airport beacon, lighthouse locations, radio transmission towers and the like are available in listings from various government agencies. These generally provide a short text description of the item and its geographic coordinates. The challenge is to convert each entry into a realistic visual object which can be inserted into the scenery database.

Polygonal data such as landmass outlines, lakes, islands, ponds, urban areas, glaciers, land use and vegetation are available from the USGS and other sources. Unfortunately, the land use data is many years old and thus may not be current with a pilot's local real world knowledge and this is not expected to change in the near future. The GSHHS database provides a highly detailed and accurate global land mass data so we can model precise coast lines for the entire world. Based on the source of the data and factoring in the land use data, we can select an appropriate texture which will be painted onto the individual triangles. Where necessary, triangles are subdivided to get the effect correct. Runways and taxiways are generated by converting the list of runway segments into polygons, painted with appropriate surface texture and markings, and then integrated into the scenery in the same way.

Clearly, someone can gain access to data sources that are under more restrictive licenses, use the TerraGear project tools to generate enhanced scenery and then distribute those files as they choose. Both the FlightGear and TerraGear projects encourage this kind of enhancement, because the basic open source packages cannot do this.

There is a trade-off between the quality of the scenery and the speed at which it can be rendered by the graphics card. As cards get faster, it becomes feasible to place more detail into the scenery while maintaining a useful and smooth visual effect. There are many techniques for adjusting the level of detail according to the altitude and attitude of the aircraft, to optimize the visual quality, but none of them are currently implemented as they cause visual artifacts.

The scenery system adds trees, buildings, lights (at night) and other objects. The choice of object, as well as the coverage density, is determined by the land use data. These objects are relatively slow to display in large quantities, so the user must trade off the reduction in display responsiveness against the improved cues for height, speed and underlying terrain. Like other settings, this property may be adjusted in real time. Figure 3 shows randomly placed buildings and trees, with a maximum range of about half way to downtown San Francisco, together with the manually placed downtown area and bay bridge.

Airports have runways and taxiways that are automatically created from the best available information to ensure that their locations, dimensions and markings correspond to real life. This is not trivial, since there are dozens of different levels of painting complexity in use. This information is also used to determine the pattern of lighting, if any - since some airports have no lights, that is shown at night and during twilight. Some lights are directional, multicolored, flashing or are defined to have a specific relative brightness. Figure 1 shows the lights and markings for KSFO.

Currently, the visual effect is clearly synthetic, as can be seen in figures 3 and 4, but it has sufficient information to readily permit navigation by pilotage (i.e. comparing the view out of the window to a chart). The compressed data requires about one kilobyte per square kilometer. All the information inside the scenery database is arranged in a four-level hierarchy, each level changing scale by a factor between 10 and 100:

Figure 5: World scenery
  1. One planet, currently only the Earth
  2. $10^o\times10^o$ rectangle as shown in figure 5,
  3. $1^o\times1^o$ $\approx 70\,mi \times 50\,mi=100\,km \times 60\,km $,
  4. $50 \, mi^2 = 100\,km^2 $ approximately.

One of the difficulties facing the TerraGear developers is that most information sources are only generated at a national level. It is easy to justify writing special code to read and process data files for the largest ten countries, since they cover most of the land surface of the planet, but this approach rapidly reaches the point of diminishing returns.

There are already many organizations that painstakingly collect and transform the data into standardized formats, precisely for these kinds of applications. However, the huge amount of effort involved requires them to keep the prices extremely high in order to fund the conversions. Therefore, in the medium term, it is possible that these organizations (or one of their licensees) may start selling TerraGear compatible scenery files that is derived from their data archive. You can expect a high price tag for such reliable data though.