Substance textures to Toolbag materials, then GLB, FBX, USD and Viewer export
Toolbag is often where textured assets are presented. MCP Pro for Toolbag reads the export folders of Substance 3D Painter, Sampler and Designer (and similarly named folders, such as Quixel exports), builds Toolbag materials from them, and exports the result as GLB, FBX, OBJ, USDC, DAE or a Marmoset Viewer file.

recipe_substance_to_toolbag in the live test: a material built from a synthetic Rock_* texture set made by the test suite.Texture folders to materials
scan_texture_folder(folder="D:/art/chair_tex") # dry run, nothing changes
recipe_substance_to_toolbag(folder="D:/art/chair_tex", assign_to=["#12"])
create_material_from_folder(folder="D:/art/chair_tex", set_name="Chair",
assign_to=["#12"], replace=True)
scan_texture_folder groups the images of a folder into texture sets by name without touching the scene. recipe_substance_to_toolbag builds one material per texture set, assigns it and returns a preview; create_material_from_folder does the same without the preview and can pick one set (set_name) or replace an existing material.
From the sister products: export from MCP Pro for Painter or MCP Pro for Sampler into a folder, then point this recipe at it.
How maps are detected
Files are grouped by their stem and map suffix: x_BaseColor, x_Normal, x_Roughness, x_Metallic, x_ORM, x_AO, x_Height, x_Emissive, x_Opacity and the usual variants. Each stem (for example Chair_Body, Chair_Legs) becomes one texture set and one material.
Normal maps and ORM
Normal maps are treated as OpenGL by default; names with _DirectX are detected as DirectX, or pass normal_format="directx". Packed ORM maps are read as R = ambient occlusion, G = roughness, B = metalness. The packing was checked live: a cube with G = 200 rendered brighter in the Roughness pass than a sphere with G = 40 (229 vs 111).
Plugging maps by hand
create_material(name="Chair", roughness=0.5)
set_material_textures(material="Chair",
maps={"albedo": "D:/tex/chair_BaseColor.png", "normal": "D:/tex/chair_Normal.png",
"orm": "D:/tex/chair_ORM.png"},
normal_flip_y=False, channels={"roughness": "a"})
assign_material(material="Chair", objects=["#12"])
render_material_preview(material="Chair")
Map kinds: albedo / basecolor, normal, roughness, gloss, metalness / metallic, specular, ao, orm, height (parallax), displacement, emissive, opacity. normal_flip_y=true for DirectX normals; channels reads a map from one channel. Paths are absolute.
Shaders and fields
set_material_shader sets the shader of any subroutine slot (surface, microsurface, albedo, reflectivity, occlusion, emissive, transparency, displacement, transmission, diffusion, clear coat, texture) from a catalogue verified live (list_shader_catalog). Unknown names are rejected: in Toolbag 5.03 an unknown name silently empties the slot. set_material_fields edits fields with their types; export_material / import_material handle .tbmat files.
Texture projects
create_texture_project starts a Toolbag texture project on a material (the material must be on a mesh, or pass assign_to: Toolbag crashed otherwise in testing). Add fill, procedural or smart layers with add_texture_layer, set per-map values and blend modes with set_texture_layer, connect baked inputs with set_texture_project_inputs and write the output maps with export_texture_project.
Exporting the scene
export_scene(path="D:/out/chair.glb") # glb, fbx, obj, usdc, dae
export_scene(path="D:/out/chair.fbx", embed_textures=True, triangulate=True)
export_scene_bundle(path="D:/archive/chair/chair.tbscene")
The format comes from format= or the extension. Options include models, lights, cameras, materials, UVs, normals, subdivision, displacement, triangulation, embedded textures and texture quality. Toolbag writes glTF only as binary .glb and USD only as .usdc. export_scene_bundle saves a copy of the scene with all referenced models and textures collected next to it. In the live test GLB, FBX, OBJ, USDC and DAE were written, and FBX, OBJ and USDC re-imported.
Marmoset Viewer
recipe_viewer_export(path="D:/web/chair.mview", title="Chair", author="Me")
export_viewer(path="D:/web/chair.mview", texture_quality="high", html=True,
width=800, height=600, auto_start=False)
A .mview archive is an interactive 3D view for web pages and ArtStation. export_viewer writes it plus an HTML page that embeds it; the recipe frames the scene first and returns a preview of the framing. The HTML page loads Marmoset's viewer script from the web when opened, so serve it over HTTP rather than opening it as a file.
Limits
- Imports verified: FBX, OBJ, USDC (ABC / PLY / STL accepted, untested). Toolbag 5 cannot import glTF / GLB.
- No Marmoset Library tools: the library has no listing API.
- No undo:
delete_materialand replacing materials needconfirm=true; save before big changes. - Tools write to the paths you give them, with your user's rights, like Toolbag itself.
Get MCP Pro for Toolbag
$15 once on itch.io (Early Access), updates included.