material.lbl
This file is used to to define all the materials in a material library which can then be used under the circumstances defined by the associated labels to dynamically modify the material of a SimObject. In the Livery XML file, you can create a dynamic material and then pass in a series of key / value labels which are used to find a specific material to match the circumstances of the flight the livery is being used in. The found material will then substitute the material referenced in the XML file.
Unlike other LBL files, this one does not need to be created manually and is automatically generated when you build the package containing the MaterialLib. This means that you should be defining the labels you want to use in the Labels parameter of The Material Editor and then building the package to generate the file.
IMPORTANT! The material library needs to be part of the aircraft package that is going to use the dynamic materials.
Before listing the different keys that the LBL file requires, here is an example showing a single material definition which can be used for reference:
{
"LabeledMaterials": [
{
"Name": "Dynamic_Material_1",
"MaterialGUID": "{F519090D-FF85-4C30-A6BB-8AECBD126541}",
"Labels": [
{
"Key": "Activity",
"Values": [
"CAR"
]
},
{
"Key": "Continent",
"Values": [
"Europe"
]
}
]
}
]
}
"LabeledMaterials"
This is the top level key of the material.lbl
file, and must be included otherwise the file will be invalid. The value for this element is an array, where each object in the array is a single palette definition containing the "Name"
, "MaterialGUID"
, and "Lables"
keys.
"Name"
This key expects a single value, which is a string defining the name of the material. This name is purely orientative and is not used in the simulation. It is simply to help clearly identify each palette object within the file.
"MaterialGUID"
This key expects a string containing the GUID for a material (this is generated automatically by The Material Editor when the MaterialLib package is generated).
"Labels"
This key expects an array of one or more objects, where each object is a "key" and "value" pair. Label keys are used to further filter the list of liveries available such that only one is possible under any given situation (after the initial filtering has been done by the container and livery titles).
"Key"
This key is used to define a key parameter to be used as a filter to find the correct material to use.
"Value"
This is an array of values that accompany the given key to generate the filter used to find the correct material to use.