TL;DR
This paper introduces MatFormer, a novel transformer-based generative model capable of creating complex, editable procedural material graphs. By addressing the challenges of irregular graph structures and semantic constraints, MatFormer significantly advances the state-of-the-art in procedural material generation and offers a new paradigm for artist-guided material authoring.
What Problem Does This Paper Address?
Creating realistic virtual assets for games, movies, and AR/VR relies heavily on high-quality materials. Procedural material graphs offer a powerful, resolution-independent way to represent these materials, allowing for fine-grained control and infinite variations. However, authoring these graphs is a complex and time-consuming task, requiring significant expertise. Consequently, publicly available libraries of procedural materials are limited, hindering accessibility for many artists. Existing methods for generating procedural materials struggle with their inherent complexity: arbitrary graph structures, heterogeneous nodes with diverse parameters, and intricate, often long-range connections between nodes. This paper aims to bridge this gap by developing a generative model that can automatically produce diverse, high-quality procedural material graphs.
Methods
MatFormer tackles the complexity of procedural material graphs using a multi-stage, transformer-based autoregressive approach. Instead of generating the entire graph in one go, it breaks down the process into three sequential steps, each handled by a specialized transformer:
- Node Generation: This stage generates the sequence of operator types (nodes) that will form the material graph. The authors explore different node ordering strategies (e.g., back-to-front, front-to-back) to optimize for different applications, finding that a back-to-front ordering is most effective for unconditional generation.
- Node Parameter Generation: For each generated node, this stage produces its parameters. This is challenging because parameters are heterogeneous (scalars, vectors, arrays) and depend on the node type. MatFormer conditions this generation on the previously generated node types and uses a sequence representation that only includes non-default parameters to manage complexity.
- Edge Generation: The final stage connects the nodes by generating edges between their input and output slots. This is crucial for ensuring semantic validity, as incorrect connections can lead to invalid or suboptimal graphs. MatFormer employs a Pointer Network-like mechanism to generate indices into a set of learned slot embeddings, effectively handling the combinatorial nature of edge connections.
The use of transformers is key, as their attention mechanism excels at capturing long-range dependencies, which are prevalent in procedural material graphs.
Datasets
The authors trained MatFormer on a subset of the Substance Source dataset [Adobe 2021b], which contains approximately 4,000 procedural graphs created by experienced artists. After filtering for quality and complexity, the dataset was reduced to around 2,800 graphs. To augment this dataset and improve robustness, they generated approximately 280,000 graphs by applying random parameter variations to the original dataset. A smaller validation set of 500 graphs was also created.
Key Insights and Ideas
- Transformer's Suitability for Graph Structures: The paper highlights that transformers, with their attention mechanisms, are well-suited for modeling the long-range dependencies found in procedural material graphs, outperforming traditional recurrent networks.
- Multi-Stage Generation for Complexity: Breaking down graph generation into distinct stages (nodes, parameters, edges) is crucial for managing the complexity and ensuring semantic validity, especially given the irregular and heterogeneous nature of these graphs.
- Node Ordering Matters: The choice of node ordering strategy significantly impacts generation quality, with a back-to-front traversal proving most effective for unconditional generation and a front-to-back traversal beneficial for guided authoring.
- Editable Materials as a Core Feature: The procedural nature of the generated graphs means they are inherently editable. This opens up new possibilities for artist workflows, allowing for interactive exploration and refinement of generated materials.
- Guided Authoring Workflow: MatFormer enables a novel "autocomplete" feature for material graphs, allowing artists to provide partial graphs and receive multiple suggestions for completion, significantly simplifying the authoring process.
Key Results
- Qualitative Improvements: MatFormer generates diverse and realistic materials with complex spatial patterns, normal variations, and specular highlights, visually outperforming baseline methods.
- Quantitative Performance: In quantitative comparisons, MatFormer achieved significantly better results across various metrics, including graph statistics (lower Earth Mover's Distance), material sample quality (lower FID scores), and novelty (normalized nearest neighbor distances closer to 1.0). For instance, the full MatFormer model achieved an FID score of 48.6, compared to 232.0 for the Macro-nodes baseline and 86.9 for the Pairwise Statistics baseline.
- User Study Validation: A user study with professional material artists showed a significant preference for MatFormer-generated graphs, with an average usability score of 1.82 compared to much lower scores for baselines.
- Editable Materials: The paper demonstrates that generated materials can be edited efficiently (under 10 minutes) by adjusting a small number of node parameters, leading to diverse changes like weathering, color shifts, and structural modifications.
Limitations and Future Work
- Dataset Dependency: The diversity and quality of generated materials are inherently limited by the diversity and quality of the training dataset. As datasets of procedural graphs expand, MatFormer's capabilities will improve.
- Independent Generation Stages: Currently, parameter and edge generation are independent of each other. Future work could explore conditioning parameter generation on edges or vice-versa, potentially using graph neural networks.
- Image-to-Graph Projection: A significant future direction is enabling MatFormer to generate graphs conditioned on target material images. This would require developing efficient schemes to backpropagate from image evaluations to graph structures, potentially enabling image-conditioned generation and training on larger image datasets.
- Semantic Control: Exposing a subset of parameters with semantic associations, similar to latent spaces in GANs, could further enhance the usability and controllability of generated materials.
- Hierarchical Generation: The authors suggest exploring hierarchical graph generation, starting with coarse structures and progressively adding finer details, which could lead to more structured and interpretable material graphs.
- Discovered Macros: Identifying and reusing recurring subgraphs (macros) across generated graphs could lead to more abstract and efficient material representations.
Summary updated