model.cfg

The Model Tab In The SimObject Editor

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 scenery SimObj 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. For glTF, these behaviors are not integrated with the models and 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 (when creating an aircraft SimObj). 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.

 

For an explanation of how this file should be used, please see:

 

 

[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.

 

The available parameters are:

 

Parameter Description Type Required
normal / exterior Defines the model XML file to use for the exterior, or the model XML file to use for the scenery SimObj String Yes
interior Defines the XML model file to use for the interior. No