Photo to tileable PBR material in Substance 3D Sampler with AI

Updated 2026-12-01 · MCP Pro for Sampler 0.1.0

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.

Six maps produced from a stone-wall test image
Output of the recipe in the live test (Sampler 6.0.4), as the model sees it. The input was a synthetic stone-wall test image, not a real photo.

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:

  1. A new asset is created from the photo with AI Image to Material (method="ai", the default) or classic B2M (method="b2m").
  2. Delighter (AI Powered) and Equalize go on the photo (delight and equalize, both on by default) to remove baked-in light and even out the brightness.
  3. A tiling filter goes on top (see below).
  4. 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

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.

Layer positions count from the bottom (0 = bottom, -1 = top); layers can also be named, 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).

Base colours of two materials from two test images
The contact sheet of a two-image batch in the live test (glTF layout).

Limits to know

Get MCP Pro for Sampler
$12 once on itch.io (Early Access), updates included.

itch.io · $12

More guides