任务不是生成图片,而是生成一个可执行、可编辑的程序图
给定 source / target image \(x\),目标是恢复一个 procedural material graph \(G\),使其能够生成与目标外观相符的材质,同时仍保留节点图的可编辑性、参数化能力与任意分辨率渲染优势。
\(V\) · Nodes
节点集合,例如 Noise、Blend、Warp、Levels、Tile Generator 等。
\(E\) · Edges
节点之间的连接关系,决定数据如何从一个节点流向另一个节点。
\(\theta\) · Parameters
所有节点参数,如 scale、rotation、contrast、opacity、roughness 等。
为什么纯文本 program synthesis 不够?
Procedural material graph 本质上既是程序,又是视觉空间结构。节点之间的拓扑、局部中间结果以及最终外观,都是人类材质设计师理解 graph 的关键。纯文本序列会丢掉这种视觉状态。
神经 procedural material graph generation 的重要前作。
将 text / image conditioning 引入 procedural material synthesis。
从搜索与策略学习角度生成 graph。
使用视觉语言模型生成 procedural material program,是 MultiMat 最直接的 baseline。
把 partial graph 的视觉执行状态重新纳入下一步 program synthesis。
6,878 个 production-quality Substance Designer graphs
CompactSBS
Paper fact作者构建 SBS ↔ CompactSBS 的双向 transpiler。CompactSBS 采用类似 YAML 的紧凑表示,并按 topological order 序列化节点。
s4:
function: tile_generator
outputs:
output: grayscale
s7:
function: multi_directional_warp_grayscale
connections:
input:
node: s4
id: output逐节点生成、执行、观察,再生成下一节点
MultiMat 的核心循环可以理解为“program synthesis + executor feedback”。
训练目标
其中 \(x\) 在 unconditional setting 为空,在 conditional setting 中为目标图像。
Mixed Conditioning vs. Graph Conditioning
Structured text + node previews
当前 graph 以 CompactSBS 文本表示,同时把每个节点的 intermediate image embedding 插入对应节点附近。
node text → preview node text → preview node text → preview
对应关系显式,结构信息清楚。历史节点参数可省略,因为它们的视觉效果已经通过 preview 表达。
Full graph visualization
模型只条件于整个 node graph 的视觉化结果,其中包含节点框、空间布局、连接关系以及节点 preview。
[ rasterized node graph ] node A ─────┐ preview ├→ Blend node B ─────┘
更直接保留 graph 的视觉空间结构,但 node name 和 function type 需要从图像中读取,因此更容易产生类似 OCR 的错误。
一个 BOS 如何生成多个独立 source branches?
关键是区分“sequence 的起点”和“graph 的 root”。BOS 只是自回归 token sequence 的开始,不是 procedural DAG 的唯一根节点。
Linear serialization
<BOS> v1 = Noise A v2 = Levels(v1) v3 = Noise B v4 = Blend(v2, v3)
Recovered DAG
Noise A → Levels ┐
├→ Blend
Noise B ─────────┘模型可以在任意 generation step 输出一个没有 upstream input 的 generator,从而开启新的 independent branch。当后续生成 Blend / Combine 等节点时,再通过 backward node references 引用此前已经存在的多个 branch。
节点参数如何产生?
VLM 自回归生成完整的新节点定义,因此 node type、参数以及 connections 都属于 token prediction 的输出。完整 graph 生成后,continuous parameters 还可以用 DiffMat refinement。
MultiMat 检查“程序是否合法”,不是“这一步是否更像 target”
Repeated error 会触发更深的 backtracking。论文采用指数式回退,在第 \(i\) 次 backtracking 时丢弃最近的 \(2^{i-1}\) 个节点。
目标图像参与 graph synthesis,参数优化发生在完整 graph 之后
Conditional setting 中,每个训练样本前加入一张 \(512\times512\) 的 material rendering,约增加 324 个 image patches。模型学习在目标图像 \(x\) 与当前 graph state 的共同条件下预测下一个 node。
训练与推理设置
| Backbone | Qwen2.5-VL 7B |
|---|---|
| Maximum sequence length | 8192 |
| Epochs | 5 |
| Optimizer | AdamW |
| Learning rate | \(5\times10^{-5}\) |
| Batch size | 128 |
| Inference temperature | 0.8 |
| Top-p | 0.95 |
| Hardware | 8 × NVIDIA A100 80GB |
Mixed Conditioning 的 unconditional node previews 使用 \(140\times140\) 图像,每张约 25 个 patch embeddings;Graph Conditioning 整图最多使用 6144 visual tokens。
Graph Conditioning 的视觉质量最好,Mixed 的节点稳定性更强
Unconditional generation
| Model | KID ↓ | ROUGE-L | NER ↓ |
|---|---|---|---|
| VLMaterial (SBS) | 14.155 | 3.641 | 14.846 |
| MultiMat (Mixed) | 6.752 | 2.195 | 8.923 |
| MultiMat (Graph) | 2.365 | 1.915 | 15.024 |
Conditional generation
| Model | DreamSim ↑ | CLIP ↑ | Style ↓ | KID ↓ | NER ↓ |
|---|---|---|---|---|---|
| VLMaterial | 31.344 | 65.678 | 3.211 | 14.976 | 16.933 |
| Mixed | 34.922 | 66.737 | 3.199 | 3.675 | 12.388 |
| Graph | 36.609 | 67.907 | 3.178 | 2.801 | 17.046 |
| Mixed+ | 40.258 | 69.687 | 3.093 | 17.792 | — |
| Graph+ | 40.367 | 70.114 | 3.046 | 14.886 | — |
关闭 tree search 时,VLMaterial 的 NER 从 14.846 恶化到 33.953,说明 constrained execution-aware inference 对 program validity 非常重要。
这篇论文真正强在哪里,又缺什么?
核心贡献
- 把 procedural material graph 明确视为 visual-spatial program。
- 提出 Mixed 与 Graph 两种 multimodal conditioning representation。
- CompactSBS 显著降低长程序 token 成本。
- execution-aware tree search 显著提升可执行性。
- 同时覆盖 unconditional 与 source-image conditional generation。
主要缺口
- 没有显式 global graph planner。
- search 主要是 validity-aware,而不是 target-aware。
- 完整 graph 生成后主要优化参数,而非 topology。
- 训练 graph 数量仅 6,878。
- conditional training 主要来自干净 material rendering,与真实照片存在 domain gap。
- evaluation 更关注最终 render,缺少 editability / controllability / structural quality 指标。
从 MultiMat 走向 target-aware hierarchical material synthesis
1 · Target-aware Value Model
不是要求当前 preview 立即像 target,而是估计当前 state 最终能否通向高质量 graph。
2 · Hierarchical Graph Planning
先决定需要哪些 branches、各 branch 的功能以及 merge 关系,再生成具体 node 和参数。
3 · Structure Refinement
增加 add / delete / replace / reconnect / split / merge 等 graph editing operations。
4 · Hybrid Conditioning
融合 structured graph tokens、node previews 和 full graph visualization,让文本负责精确 node identity,视觉负责 appearance 与 topology。
5 · Multi-scale Conditioning
把 target image 分解为 global / meso / micro features,并根据 node type 动态选择视觉尺度。
6 · Data Scaling
利用生成 graph、参数扰动以及 graph-equivalent augmentation 扩展 paired data。
7 · Real-photo Adaptation
处理 lighting、geometry、shadow、camera response 后,实现 in-the-wild photo → editable material graph。
8 · Better Evaluation
加入 graph complexity、editability、semantic modularity、parameter controllability 与 structural quality。
复现时需要确认什么?
数据
获得合规的 Substance Designer procedural graphs;复现预处理;限制 graph complexity;保留目标 PBR outputs。
表示
实现 SBS ↔ compact graph serialization;确保 lossless、topologically ordered、token-efficient。
视觉状态
执行 partial graph 并缓存 intermediate previews;分别构造 Mixed 和 Graph conditioning input。
训练
Qwen2.5-VL 7B;8192 sequence length;5 epochs;AdamW;learning rate \(5\times10^{-5}\);batch size 128。
推理
temperature 0.8;top-p 0.95;逐节点 transpile + execute;automatic repair;resampling;exponential backtracking。
Conditional refinement
完整 graph 生成后接 DiffMat 做 differentiable parameter optimization,并分别报告 refinement 前后结果。
主要资料
- MultiMat: Multimodal Program Synthesis for Procedural Materials using Large Multimodal Models
- Generating Procedural Materials from Text or Image Prompts
- DiffMat
“Paper fact”表示论文明确陈述;“Interpretation”表示基于论文机制与本次讨论所做的技术解释;“Limitations / Research Opportunities”属于审稿与研究延伸视角,并非作者原文结论。