Material Sync
The node that pushes your PBR maps into Blender, Maya, or Unreal so you don't
- base_color
- normal
- roughness
- metallic
- ao
- height
- opacity
- emission
- success
You've got a working PBR pipeline in ComfyUI - a base-color pass, a Marigold depth pass, some map extraction - and out the far end you're holding eight texture maps that need to live inside a DCC. That's the moment the fun stops. The handoff is the same ritual every asset: save each map, tab over to Blender, make a Principled BSDF, drag in each texture, wire the normal into a Normal Map node. Ten minutes of plumbing, repeated forever.
Material Sync is that handoff in one node. Connect your maps, pick a destination from a dropdown, and it exports them as PNGs and pushes the whole thing over localhost TCP to a lightweight server running inside Blender, Maya, or Unreal - which then creates or updates the material graph for you. No API keys, no cloud, no HTTP stack - just your machine talking to itself.
How it works
The node is deliberately boring on the ComfyUI side. It saves whatever maps you've wired in as PNGs into output/<destination>PBR/<material_name>/ with fixed filenames (BaseColor.png, Normal.png, AO.png...), writes a manifest.json, and sends one newline-delimited JSON packet to the DCC's server.
The interesting part is the handshake. The protocol is acknowledgement-based: the DCC add-on processes the request on its main thread, builds the material, and only then sends back an ack. The node's success output fires after that ack, not when the packet leaves. So you don't get a cheerful green "success" while Blender is silently choking - if the DCC rejects the request, the node raises an error and the run fails loudly instead. The add-ons also reuse existing materials and shader nodes rather than piling up duplicates on every re-sync - the difference between a nice tool and one you'd delete after a week.
The inputs that matter
All the texture inputs are optional, so wire up only what your workflow produces. Nothing stops you from syncing a material with no normal map and getting a flat-shaded object.
- destination -
blender,maya, orunreal. Defaults toblender. - material_name - the name of the material in the target app. A blank one is an error, not a silent skip.
- port / output_folder - leave at
0/ empty to use the destination defaults: Blender 8765 →output/BlenderPBR, Maya 8766 →output/MayaPBR, Unreal 8767 →output/UnrealPBR.
The eight optional IMAGE inputs are base_color, normal, roughness, metallic, ao, height, opacity, and emission. The output is a single BOOLEAN, success - handy for gating downstream nodes.
Installing it
The ComfyUI half is the easy half. It's in the registry, so search "Material Sync" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/jaisurya-dev-art/ComfyUI-MaterialSync
Python dependencies are light - just numpy and Pillow - so no model downloads, no Torch surprise waiting in requirements.txt:
pip install -r ComfyUI/custom_nodes/ComfyUI-MaterialSync/requirements.txt
The actual work is the DCC side, and this is where people get burned. Blender: install BlenderPBRSync.zip from Edit > Preferences > Add-ons, then configure host/port and hit Start Server. Maya: run maya_plugin_setup.bat (or copy the plugin manually), and it needs Arnold (mtoa) installed or you'll hit errors about missing Arnold nodes. Unreal: drop UnrealMaterialSync/ into your project's Plugins/ folder and enable it alongside Python Editor Script Plugin and Editor Scripting Utilities - note that 5.5 is the validated version, and later 5.x releases are officially unverified.
The provided example workflow also wants qornflex/ComfyUI-QFX-PBRGenerator and kijai/ComfyUI-Marigold. Both are optional for the node itself - you just need some PBR-map source - but install them if you want the demo graph to run as-is.
Gotchas worth knowing
- Same machine, same paths. ComfyUI writes the PNGs and manifest to its output folder, and the DCC has to read that exact path. If you've moved ComfyUI's output directory or run the two on different machines, the sync "succeeds" but nothing shows up - check the DCC's console for manifest or image-path errors.
- Batch size 1. The exporter saves only the first frame of any image batch; everything past frame zero gets dropped.
- Connection refused almost always means the DCC's server isn't started, or host/port don't match between the node and the add-on preferences.
- Want the same maps in two apps at once? Drop in two Material Sync nodes with different destinations - same maps, both engines, one queue. That alone is worth the install for game-asset people.
It's an opinionated little node that assumes ComfyUI and your DCC live on one box, but it stays in its lane. For the render-handoff chore that everyone else hand-waves, that's exactly what you want.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| destination | COMBO | blender | 3 options: blender, maya, unreal |
| material_name | STRING | Material | — |
| output_folder | STRING | Leave empty to use the destination's default output folder. | |
| host | STRING | 127.0.0.1 | — |
| port | INT | 00–65535 | 0 uses the destination's default port. |
| base_coloropt | IMAGE | — | |
| normalopt | IMAGE | — | |
| roughnessopt | IMAGE | — | |
| metallicopt | IMAGE | — | |
| aoopt | IMAGE | — | |
| heightopt | IMAGE | — | |
| opacityopt | IMAGE | — | |
| emissionopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| success | BOOLEAN | — |