Meshes
When Material Smith finds a texture set, it also looks for static and skeletal meshes that should get the set’s material instance. With Assign to meshes on, Create puts the instance into those material slots.
Where meshes are searched
Section titled “Where meshes are searched”Meshes are searched in one folder and all its subfolders:
- If the textures are in a folder named like an entry of Texture Folder Names (
Textures,TextureorTex, case ignored), the search starts in its parent folder. Textures in/Game/Props/Rock/Texturesfind meshes anywhere under/Game/Props/Rock, for example in/Game/Props/Rock/Meshes. - Otherwise the search covers the texture folder and its subfolders.
Static meshes, skeletal meshes and their subclasses are included.
How names are matched
Section titled “How names are matched”The mesh name is compared without its prefix: the first matching entry of Mesh Prefixes (SM_, SK_, SKM_, S_, case ignored) is removed. Then there are two cases.
Same name as the set
Section titled “Same name as the set”SM_Rock matches the set Rock (case ignored). If the mesh has exactly one material slot, that slot gets MI_Rock. A mesh with the same name but several material slots gets nothing from this rule.
One set per material slot
Section titled “One set per material slot”Multi-material exports, for example from Substance Painter, often name the textures after the mesh and the material: <Mesh>_<Material>_<Map>, such as Chair_Wood_BaseColor and Chair_Metal_BaseColor. Material Smith finds the sets Chair_Wood and Chair_Metal, and gives them to the mesh SM_Chair when:
- the set name starts with the mesh name and an underscore (
Chair_), and - the rest of the set name (
Wood) equals the name of a material slot of the mesh, case ignored.
So MI_Chair_Wood goes into the slot Wood of SM_Chair and MI_Chair_Metal into the slot Metal.
Before slot names are compared, one prefix MI_, MAT_ or M_ and one suffix _Material or _Mat are removed from them. Slots named M_Wood, MI_Wood or Wood_Mat all match Wood.
A set can go to several meshes and slots, for example to both SM_Rock and SK_Rock.
In the panel
Section titled “In the panel”- The list shows the meshes after the instance path, for example
MI_Rock · /Game/Props/Rock/Materials · SM_Rock. The slot name is added in parentheses when the set goes to more than one slot or to a slot other than the first:SM_Chair (Metal). - The Meshes section of the details lists each slot with its index, its name and its current material, for example
SM_Chair · slot 0 Wood · now M_Chair. Uncheck a slot to leave it alone. - Without a match, the section says No matching mesh. A mesh named SM_Rock gets the instance automatically.
- The Mesh slots tile counts the checked slots of all sets.
- What will happen lists each slot, for example Assigned to SM_Chair, slot 0 (Wood).
Meshes are searched when the textures are loaded into the panel. Changing the instance name or folder in the details doesn’t search again.
What Create does
Section titled “What Create does”For every checked slot, Create sets the slot’s material to the instance, unless it already is. Static and skeletal meshes are supported. Changed meshes are saved with Save assets on.
With Assign to meshes off, no mesh is changed and the slot check boxes in the details are disabled.
The Material Smith master has the Skeletal Mesh and Instanced Static Meshes usages turned on, so assigning its instances to skeletal meshes or instanced meshes doesn’t need to change the master.
From Python
Section titled “From Python”find_texture_sets_in_folders and find_texture_sets look for meshes by default (find_meshes=True). The results are in each set’s meshes array (mesh, material_index, slot_name, current_material, enabled). Set enabled to False to skip a slot, or set options.assign_to_meshes = False. See Python.