Skip to content

Texture set naming

Material Smith finds the map of a texture (base color, normal, roughness …) from the end of its name, and groups textures with the same remaining name into a texture set. Each set becomes one material instance.

Take T_Cliff_vdzkbf_2K_ORDp as an example:

  1. Trailing resolution and file type tokens are removed (with Ignore Resolution Tokens on). Nothing to remove here; rock_diff_4k would become rock_diff.
  2. The end of the name is compared with every ending of the name table, longest ending first, ignoring case. ORDp matches, so the texture is a packed map with ambient occlusion, roughness and height. Because the longest ending wins, BaseColor beats Color and ORM beats M.
  3. The ending must start a new word. It has to follow a separator (_, -, a space or .), or, for endings of three or more letters, start with an uppercase letter that follows a lowercase letter or a digit (camel case, as in RockNormal). One and two letter endings always need a separator: T_Rock_D is a base color map, T_RockD is not recognized.
  4. The rest of the name is the base, without separators at its end: T_Cliff_vdzkbf_2K. If nothing is left, the ending doesn’t count.
  5. The set name is the base without its texture prefix and resolution tokens. The first matching entry of Texture Prefixes (T_, TX_, Tex_, case ignored) is removed from the start, resolution and file type tokens are removed wherever they are (except at the very start), and separators at either end are trimmed: Cliff_vdzkbf.
  6. Textures in the same folder with the same set name form a set. Case is ignored, and the set keeps the spelling of its first texture.
  7. The instance name is the Instance Prefix plus the set name: MI_Cliff_vdzkbf. Characters Unreal doesn’t allow in asset names, and -, are replaced by _.

A set needs at least one map the material can use. A texture that only matches a Not Used ending, such as a lone T_Rock_Spec, does not form a set on its own and is not counted as not recognized either.

Texture name Set Map Matched ending
T_Rock_BaseColor Rock Base Color BaseColor
T_Rock_ORM Rock Packed (ORM) ORM
T_Rock_Spec Rock Not Used Spec
Chair_Wood_OcclusionRoughnessMetallic Chair_Wood Packed (ORM) OcclusionRoughnessMetallic
brick_wall_001_nor_gl_2k brick_wall_001 Normal, OpenGL nor_gl
T_Cliff_vdzkbf_2K_ORDp Cliff_vdzkbf Packed (ORD) ORDp
Metal049A_2K-PNG_Color Metal049A Base Color Color
T_OldPaint_Gloss OldPaint Roughness, glossiness Gloss
RockNormal Rock Normal Normal
T_RockD – not recognized –
T_RandomThing – not recognized –

The panel shows the matched ending under each texture in the details (matched: ORDp).

With Ignore Resolution Tokens on (the default), these tokens are ignored when they are separated from the rest of the name by _ or -:

  • one or two digits followed by K or k: 1K, 2k, 4K, 16K;
  • the sizes 256, 512, 1024, 2048, 4096, 8192 and 16384;
  • the file types JPG, JPEG, PNG, EXR, TGA, TIF, TIFF, PSD and HDR, in any case.

Tokens at the end are removed before the map ending is looked for (rock_diff_4k). Tokens elsewhere are removed from the set name (T_Cliff_vdzkbf_2K_D and Metal049A_2K-PNG_Color give the sets Cliff_vdzkbf and Metal049A). The first token of a name is never removed.

The default table has 15 rows with 97 endings: 79 for maps the material uses and 18 that are recognized but not used. Case is ignored.

Map Endings Notes
Base Color BaseColor, Base_Color, BaseColour, Albedo, AlbedoTransparency, Diffuse, Diff, Color, Colour, Col, BC, D
Normal Normal, Normals, NormalMap, NormalDX, Normal_DX, Nor_DX, Norm, Nrm, Nor, N DirectX normal maps
Normal NormalGL, Normal_GL, Nor_GL, NormalOpenGL, Normal_OpenGL OpenGL normal maps
Packed (ORM …) ORM, ARM, AORM, OcclusionRoughnessMetallic, OcclusionRoughnessMetalness R occlusion, G roughness, B metallic
Packed (ORM …) MRA, MRAO, MetallicRoughnessAO, MetallicRoughnessOcclusion R metallic, G roughness, B occlusion
Packed (ORM …) RMA, RMAO, RoughnessMetallicAO, RoughnessMetallicOcclusion R roughness, G metallic, B occlusion
Packed (ORM …) ORD, ORDp R occlusion, G roughness, B height (Megascans)
Roughness Roughness, Rough, Rgh, R
Roughness Glossiness, Gloss, Smoothness, Smooth Glossiness, inverted
Metallic Metallic, Metalness, Metal, Met, M
Ambient Occlusion AmbientOcclusion, Ambient_Occlusion, Occlusion, AO, Occ, O
Emissive Emissive, Emission, Emit, Glow, E
Opacity Opacity, OpacityMask, Alpha, Transparency, Transparent, A
Height Height, Heightmap, Displacement, Displace, Disp, Bump, H
Not Used Specular, Spec, S, Cavity, Curvature, Thickness, ID, MaterialID, Translucency, Subsurface, SSS, Sheen, Fuzz, Transmission, BentNormal, Position, WorldNormal, Mask Recognized, not used by the material

The alpha channel of every default packed layout is empty.

Endings Red Green Blue Badge
ORM, ARM, AORM, OcclusionRoughnessMetallic, OcclusionRoughnessMetalness Ambient Occlusion Roughness Metallic ORM
MRA, MRAO, MetallicRoughnessAO, MetallicRoughnessOcclusion Metallic Roughness Ambient Occlusion MRA
RMA, RMAO, RoughnessMetallicAO, RoughnessMetallicOcclusion Roughness Metallic Ambient Occlusion RMA
ORD, ORDp Ambient Occlusion Roughness Height ORD

The badge in the panel shows the channel layout, so an _ARM texture is labeled ORM: both hold occlusion, roughness and metallic in red, green and blue. For other layouts, for example after you change a channel by hand, the badge lists one letter per filled channel in R, G, B, A order: O occlusion, R roughness, M metallic, D height, A opacity.

You can change the channels of any packed texture in the panel’s details (R, G, B, A).

  • Normal maps that match an ending of the OpenGL row (NormalGL, Nor_GL …) are marked OpenGL (green up). Fix texture settings turns on their Flip Green Channel setting.
  • Roughness maps that match the glossiness row (Gloss, Smoothness …) are marked Glossiness (invert). With the Material Smith master, the Invert Roughness (Glossiness) switch of the instance is turned on; when channels are packed, the map is inverted while packing.

Both flags can be changed per texture in the panel’s details.

Textures that match the Not Used row belong to the set but are not given to the material. The details list them dimmed, and What will happen says, for example, T_Rock_Spec is not used (Spec). You can give such a texture a map type by hand in the details.

Inside a set, textures are listed in this order: Base Color, Normal, Packed, Roughness, Metallic, Ambient Occlusion, Emissive, Opacity, Height, Not Used. Textures of the same map type are sorted by name. When a set has two textures for the same map, the first one is used and What will happen says so, for example 2 Base Color maps found, T_Rock_BaseColor is used.

Textures whose names don’t end with a known ending are not part of any set. The panel counts them in the Not recognized tile and lists them in a bar under the list; click the bar to select them in the Content Browser.

To include them, either rename the textures to use a known ending, or add the ending to the name table.

Open Edit > Project Settings > Plugins > ta Material Smith and expand Detection > Suffix Rules. Each row has:

Field Meaning
Suffixes Name endings separated by commas, for example BaseColor,Albedo,Diffuse,D. Case is ignored.
Map The map these endings stand for. Choose Not Used for maps the material should ignore.
Red, Green, Blue, Alpha Only for Packed (ORM …): the content of each channel.
Open GLNormal Only for Normal: the maps use the OpenGL convention.
Invert Only for Roughness: the maps store glossiness or smoothness.

All endings of all rows are compared together, longest first; between endings of the same length, the earlier row wins. The rules for separators and camel case above apply to your own endings too, so one and two letter endings always need a separator.

Changes apply the next time textures are loaded into the panel (Use selection, the Content Browser menu or Python). The other detection settings, Texture Prefixes and Ignore Resolution Tokens, are described in Settings.