model.cfg

The model.cfg file is a critical file when it comes to defining anything 3D within the sim world, and it would go in the "model" folder in the root directory for the object (along with the texture, sound, etc... folders). It describes which models to use for the interior and exterior of an aircraft, or which model to use for the SimObject being created. When being used for an aircraft, typically the interior is what is shown when in cockpit view, and the exterior in all other cases.

 

Model behaviors are defined in accompanying *.XML files, which are the continuation of the old modeldef.xml from Microsoft Flight Simulator X. For glTF, these behaviors are not integrated with the models as in the old *.MDL format, but must be referenced by the model.cfg in the [Models] section (explained below). The model behavior file is in turn referencing the model's LODs. Model behaviors describe how the model animations interact with the simulation, and must be specified for the interior and exterior separately. They are shared between all LODs. For more information, please see here.

 

Below you can find information on the different sections used in the model.cfg file as well as what parameters and values are expected within them. Note that all file paths in the model.cfg are relative to the directory the config file resides in.

 

 

[model.options]

This section permits you to define some options for the model when the model is for an aircraft. The available parameters are:

 

Parameter Description Type Required
withExterior_showInterior If true (1), when showing the exterior, the interior model will also be visible. Default is false (0).

Bool

No
withExterior_showInterior_hideFirstLod If withExterior_showInterior is true (1), when showing the exterior, never show the interior's first lod ( interior.lod.0). Default is false (0).
withInterior_forceFirstLod If true (1), when showing the interior, only the first lod will ever be visible ( interior.lod.0). Default is true (1).
withInterior_showExterior If true (1), when showing the interior, the exterior model will also be visible. Note that if true (1), any attachments (such as lights) that found a node to attach to will stay attached to the exterior model even when switching to cockpit view. Default is false (0).

 

 

[models]

This section is where you define the models to be used by the item being defined and is mandatory for all models, regardless of whether it is an aircraft or some other SimObject. Note that a file extension is not required for *.MDL files. However, to reference an *.XML file which describes the model LODs and behaviors, the extension must be included in the file name.

 

The available parameters are:

 

Parameter Description Type Required
normal / exterior Defines the model file to use for the exterior. String Yes
interior Defines the model file to use for the interior. No