Publish .sbsar and export textures for game engines
There are two ways to get a material out of Designer: a .sbsar (a compiled Substance archive that stays procedural in the host application) and bitmaps (plain textures any engine can read). MCP Pro for Designer does both. This guide shows the calls and the choices that matter.
1. Prepare the graph for publishing
- Exposed inputs. Only graph inputs are tweakable in the .sbsar. Ask the AI to expose what users should change:
create_graph_input+expose_node_parameter, orexpose_inputs=trueon a recipe (the default). - Presets.
create_presetstores named looks ("clean", "worn") inside the graph;export_presets/import_presetsmove them as JSON. - Attributes.
set_graph_attributessets label, description, category, author, tags, user data and physical size.set_graph_iconmakes the icon from a node or an image. - Check it.
validate_graphbefore publishing: outputs without a usage are easy to miss and confuse host applications.
2. Publish the .sbsar
export_sbsar(
package="oak_floor",
path="D:/out/oak_floor.sbsar",
compression="auto", # auto | best | nocompression
expose_output_size=True,
expose_random_seed=True,
expose_pixel_size=False,
icon=True)
The path must be absolute and end in .sbsar. The archive can be loaded in Substance 3D Painter (for example together with MCP Pro for Painter) and in Unreal Engine or Unity through Adobe's Substance 3D plugins for those engines. Godot has no built-in .sbsar support; export bitmaps instead.
3. Export bitmaps
export_outputs computes the graph and saves every output node. The options that matter for engines:
| Argument | Values | Notes |
|---|---|---|
file_format | png, jpg, tga, tif, exr, bmp, hdr | PNG or TGA for most maps, EXR for float height. |
size_log2 | 8 = 256 ... 12 = 4096 | Renders at that size for this export only; the graph setting is restored. |
bit_depth | 8, 16, 16f, 32f | 16-bit PNG/TIF or float EXR for height maps; 8-bit is fine for base color. |
color_space | sRGB, Linear, Raw | Base color is usually sRGB; data maps linear. |
name_pattern | e.g. T_{graph}_{usage} | Fields: graph, identifier, usage. |
outputs | list of identifiers | Export only some outputs, e.g. ["height"]. |
Library instances that fix their own output format ignore bit_depth; the result reports the real pixel format so the AI can tell you. To export a single intermediate node at full size, use export_node.
Example: an 8-bit set plus a 16-bit height
export_outputs(directory="D:/out/oak", size_log2=11,
name_pattern="T_{graph}_{usage}",
outputs=["baseColor", "normal", "roughness", "metallic", "ambientOcclusion"])
export_outputs(directory="D:/out/oak", size_log2=11, bit_depth="16",
name_pattern="T_{graph}_{usage}", outputs=["height"])
4. Engine notes
- Normal map convention. Unreal expects DirectX-style normals (green down); Unity and Godot expect OpenGL-style (green up). Ask the AI to check the format setting of the Normal node in the graph before exporting.
- Channel packing. Engines often want packed maps (Unreal's occlusion / roughness / metallic, Unity HDRP's mask map). Packing is done in the graph: ask the AI to add an RGBA Merge node fed by the right maps and a new output for it, then export that output.
- Naming.
name_patternkeeps file names consistent with your project's convention, so re-exports overwrite the right files. - Tiling.
get_texture_statsreports a tiling-seam ratio, useful before a texture goes on a large floor.
5. Long exports: run them as jobs
4K exports of a big graph can take longer than an MCP client is willing to wait. Run them in the background:
start_job("export_outputs", {"directory": "D:/out/oak", "size_log2": 12, "bit_depth": "16"})
get_job(job_id, wait_seconds=30) # queued / running (elapsed) / done + result
cancel_job works while a job is queued. A compute that has started cannot be interrupted, because Designer's API has no cancel for it.
Get MCP Pro for Designer
Early Access, $12 once, free updates.