Caution: only tested with
MSFS 2002 and 2004
 


Mesh Priority and Rendering


Priority - FS2002

It does not matter where you install the mesh on your system, nor what layer/priority is assigned in scenery.cfg, since the sim does not consider layers where mesh is concerned. We have no control over how mesh is used, other that to Activate/Deactivate it in the Scenery Library or remove it from the \scenery folder.

Mesh information from all "active" Scenery Library layers is "pooled";

    When the LOD values differ, the higher LOD level mesh file is used.
    When the LOD values are the same, the higher source data resolution mesh file is used.


Priority - FS2004

FS2004 still uses the mesh file with the highest LOD. But we can no longer rely on mesh with the higher source resolution being used when the LOD is the same. This is a matter of some importance for both developers and users of add-on mesh data.

FS2004 rules for mesh with the same LOD:

* Mesh in the folder/layer having the LOWER Priority in the Scenery Library will be used. (Unlike scenery, where the HIGHER Priority folder is still given precedence)

     Note: this may not work for replacing the default mesh. I've had to use the following rule to do so.

* Within the same folder, precedence is determined by filename, in reverse alphabetical order. (ZZZ.bgl has precedence over AAA.bgl)

Implications:

If you care whether mesh you add to the sim is actually used, you will have to address this issue. To insure that the "best" mesh is seen in the sim, you now need to know which mesh is best. That usually means you need to know the resolution of the source data.

Once you have decided how you want to have your mesh treated by the sim, you have two basic choices:

* Place all the mesh in one folder and rename files to force their use based on alphabetical order. You will have to repeat this process every time you add new mesh to the folder. This approach is essentially unmanageable.

* Place your mesh in separate folders and adjust the Priority of the folder/layer in the Scenery Library. Far simpler.

Many creative variations and combinations of the above can be used. Just be consistent.

Test procedures used to confirm the above rules:

You can read about the details in this readme.txt file. This file is not formatted for the browser. Click your cursor in the new browser window, select the contents (CTL-A), copy them (CTL-C), and paste them into a text editor that supports wordwrap (Ctl-V):
 
        Open readme.txt in new browser window

Or download the readme file and test data, and confirm my results for youself (1.7MB):
 
        Download test data


Rendering

The software uses a few basic rules (version-specific, see above) to determine which data to use to construct the terrain as a series of concentric rings extending from the aircraft to the horizon, with less terrain detail rendered as you move toward the horizon.

* LOD determines the radius of the mesh actually displayed under the aircraft. (e.g. LOD12 mesh has a radius of only about 7 nm, LOD10 mesh extends 30-40nm)

* Beyond this radius, the "priority" of the mesh used under the aircraft drops to 0, and the rules are applied to determine which mesh data is used to render the terrain for the next concentric ring of mesh. The radius of that ring will be determined by the LOD of the mesh available for that region.

* This process is repeated until the horizon is reached.

The sim may always use the lowest (default) LOD world mesh at the horizon, or do something entirely different in FS2004, where distant mountain profiles seem to behave strangely.

Mesh constructed with an LOD of 12 or higher is not used at all with the default fs2002.cfg/fs9.cfg settings.

In FS2004, mesh constructed with an LOD of 10 or higher is rendered exactly the same. An LOD greater than 10 (38.2m) only increases the file size and reduces the radius where the mesh is rendered.


The above factors determine the maximum possible amount of detail rendered by the sim. Settings in the sim allow users to reduce the actual amount of detail, usually to improve performance elsewhere.

Terrain Mesh Complexity Slider (controls the value of TERRAIN_ERROR_FACTOR)

In FS2004, TERRAIN_MIN_DEM_AREA and TERRAIN_MAX_DEM_AREA affect the range where the Slider is effective

TERRAIN_MAX_VERTEX_LEVEL, in the [MAIN] section of the cfg file.