Using correct texture names

When reading-in a texture library, or a material from a texture, BakeMyScan tries to match textures to PBR channels according to their names. Although the naming pattern followed by most of the texture libraries will be compatible with BakeMyScan, you might have to rename some of your textures or to play in python in order for everything to work smoothly.

The lowercase name of a texture file must end with a specific pattern corresponding to its role, in order to be associated with the appropriate slot of a Principled shader node

The python dictionnary I use to do so is available in the fn_match.py file, and looks like so:

patterns = {

    "albedo"      : ["albedo", "diffuse", "dif", "alb", "base_color", "basecolor", "color", "_d", "_col","tex"],
    "ao"          : ["ao", "ambient_occlusion", "occlusion", "occ"],
    "metallic"    : ["metallic", "metal", "metalness"],
    "roughness"   : ["roughness", "rou", "rough", "_r"],
    "glossiness"  : ["specular", "ref", "spec", "glossiness", "reflect", "refl", "gloss"],
    "normal"      : ["normal", "normals", "nor", "_n", "norm", "nrm"],
    "height"      : ["height", "dis", "disp", "displacement"],
    "emission"    : ["emission", "emit", "emissive"],
    "opacity"     : ["alpha", "transparent", "opacity", "transp", "mask"], }

For instance, creating a PBR library out of the “textures/” directory below should perfectly match the “wood”, “mymaterial”, “rainbow” and “spaceship” materials!

textures/

   wood_color.jpg
   wood_occlusion.png
   wood_OPAciTy.tiff

   someOtherMaterial/
     mymaterial_diffuse.png
     mymaterial_METallic.jpeg
     mymaterial_rou.jpg
     mymaterial_normal.png
     mymaterial_emit.tif

   Another directory/
     under/
       rainbow_COLOR.png
       rainbow_specular.jpeg
       rainbow_nor.jpg
     under2/
       spaceship_albEDo.png
       spaceship_metal.png
       spaceship_ROUGHNESS.png
       spaceship_Metal.png
       spaceship_normals.png
       spaceship_disp.png
       spaceship_emission.png
       spaceship_mask.png

Conclusion

If your textures are named in a sensible manner, everything should go as planned.

However, if you encounter a problem or some textures are not found, you can still use the “Create empty material” button alongside the “Assign texture” one in order to manually assign textures to their corresponding slots. As a last option, jump into the Node editor mode and manually assign the image files to the texture nodes.