material-sets
This is an old revision of the document!
Material Sets
Like the church, a monument can have material sets. This means that each material (base and replacement) must be listed in your monument asset property MaterialSetList
.
For each material set, all materials must be listed in the same order as their replacement:
mod:register({ DataType = "MONUMENT", ... MaterialSetList = { { SetName = "DEFAULT", MaterialList = { "MAIN_MATERIAL", "SECONDARY_MATERIAL", "TERTIARY_MATERIAL" } }, { SetName = "ALTERNATIVE", MaterialList = { "MAIN_MATERIAL_ALT", "SECONDARY_MATERIAL_ALT", "TERTIARY_MATERIAL_ALT" } } } })
When you import a FBX file, materials are imported alongside the model. You can find those materials in a virtual directory Materials
, inside the FBX file. You can see an example in the Example02
mod, where the materials are in models/MithrilFactory.fbx/Materials
.
In this directory, you can find all your materials. You can then register an ID for each of those materials, to use them in the material set list:
mod:registerAssetId("models/YourMonumentModel.fbx/Materials/MainMaterial", "MAIN_MATERIAL") mod:registerAssetId("models/YourMonumentModel.fbx/Materials/MainMaterialAlt", "MAIN_MATERIAL_ALT")
material-sets.1588112449.txt.gz · Last modified: 2020/04/28 18:20 by maxime