Photo to tileable PBR material in Substance 3D Sampler with AI
Sampler can turn a photo of a surface into a PBR material. With MCP Pro for Sampler, an AI client does the whole job from one sentence: it creates the asset, runs Sampler's AI Image to Material, cleans up the lighting, makes the result tile, checks it, exports it and shows you the maps.

One call: recipe_photo_to_material
Ask: "Make a tileable material from D:/photos/wall.jpg and export it for Godot into D:/game/materials. Show me the maps." The client calls:
recipe_photo_to_material(image="D:/photos/wall.jpg", name="M_Wall",
export_dir="D:/game/materials", engine="godot")
What happens:
- A new asset is created from the photo with AI Image to Material (
method="ai", the default) or classic B2M (method="b2m"). - Delighter (AI Powered) and Equalize go on the photo (
delightandequalize, both on by default) to remove baked-in light and even out the brightness. - A tiling filter goes on top (see below).
- The recipe waits for Sampler to finish computing, measures the tiling seams, exports in the engine layout you chose and returns a preview image of the maps.
Useful arguments: resolution (document resolution, default 2048), physical_size, export_size, preview_size and check_tiling. Exports accept power-of-two sizes only.
Choosing the tiling filter
tiling="tiling"(default): Sampler's Tiling filter. Works on any surface.tiling="auto": Auto Tiling, for regular patterns such as bricks or tiles. When it finds no clean pattern, the recipe reports Sampler's warning.tiling="make_it_tile": Make It Tile.tiling="none": no tiling filter.
In the live test on a cobblestone image, the base-colour seam ratio (x / y) was 4.0 / 3.5 without a tiling filter, 1.0 / 1.0 with Tiling, 1.1 / 0.9 with Make It Tile, and 4.0 / 3.5 with Auto Tiling, which reported "no clean patterns" on that irregular surface.
Checking the seams
get_texture_stats returns per-channel minimum, maximum, mean and standard deviation, plus a tiling seam ratio per axis: about 1 means seamless, above 2 means a visible seam. It also warns about flat channels. The recipe runs this check itself; ask for it again after you change the stack:
get_texture_stats(channels=["basecolor", "height"])
Letting the AI look
get_material_preview exports the maps at a low resolution and returns one labelled contact sheet (by default base colour, normal, roughness, metallic, height and ambient occlusion), so the model sees what you see. get_viewport_capture grabs Sampler's 3D view (or the 2D view or the whole window); it is a screenshot of Sampler's UI, so a dialog on top is captured too.
Step by step instead
The recipe is a shortcut. The same work can be done with single tools when you want control:
import_images(paths=["D:/photos/wall.jpg"], mode="ai_material", new_asset="M_Wall")
add_filter(filter="Delighter (AI Powered)", position=0)
add_filter(filter="Equalize", position=1)
add_filter(filter="Tiling")
wait_for_computation()
get_material_preview()
Other import modes: b2m_material, multiangle_material, bitmap, channels, hdr_merge and environment, with resolution, crop, upscale and physical size options. Import modes apply to empty assets only, which is why the tools create a new asset for them (new_asset=). import_textures takes ready-made maps with explicit channels.
Dirt#2 being the second "Dirt" from the bottom.A whole folder: recipe_batch_photos
recipe_batch_photos(folder="D:/scans/bark", export_dir="D:/out",
engine="unreal", name_template="M_Bark_{index}")
Every photo in the folder goes through the same pipeline. name_template understands {stem}, {index} and {parent}; each material is exported into its own folder; the result is a per-photo report and a contact sheet of the base colours. Options include pattern, recursive and limit (default 50).

Limits to know
- AI filters take tens of seconds: the AI photo recipe took 59 s at 1024 px in the stdio smoke test. Raise short client timeouts.
- Sampler's Python API has no undo. Save the project first.
- Assets created through the tools also show up in Sampler's material library (Sampler behaviour).
Get MCP Pro for Sampler
$12 once on itch.io (Early Access), updates included.