Abstract
Procedural material graphs are a cornerstone of modern digital content creation, offering resolution independence and immense flexibility. However, automatically tuning these graphs to match real-world photographs is challenging because many core "generator" nodes are non-differentiable. This paper introduces a framework that replaces these black-box nodes with neural network "proxies." By making the entire material graph differentiable, the system enables end-to-end, gradient-based optimization that significantly outperforms previous methods in both speed and structural accuracy.
Introduction
In film and game production, materials are often defined procedurally—using a graph of interconnected nodes rather than static texture maps. While powerful, these graphs are difficult to author. An artist seeking to match a specific brick pattern or cobblestone layout must manually adjust dozens of parameters, such as mortar width, stone scale, and surface roughness.
Previous attempts to automate this process, such as the MATch system, were limited to optimizing simple "filter" nodes (e.g., color adjustments or blurs). They failed when encountering "generator" nodes, which create the fundamental shapes and patterns of a material. Because these generators often involve discrete logic or stochastic processes, they are non-differentiable, preventing the use of standard gradient-based optimization techniques. This research bridges that gap by introducing differentiable neural approximations for these complex nodes.
Methodology: The Differentiable Proxy
The core innovation of this work is the Differentiable Proxy. Instead of attempting to rewrite complex procedural code to be differentiable, the authors train a neural network to act as a "stunt double" for the original node.
Neural Approximation
The authors utilized a modified StyleGAN2 architecture to mimic specific generator nodes (e.g., Brick Generator, Tile Generator, Arc Pavement). To ensure the proxy could be used for precise parameter mapping, they removed the stochastic noise typical of GANs, making the architecture deterministic. This ensures a one-to-one mapping between input parameters and the resulting output pattern.
Three-Stage Optimization Pipeline
The system optimizes a material graph in three distinct phases:
- Stage I (Pre-optimization): Calibrates global material properties like average color, albedo, and roughness using existing differentiable filters.
- Stage II (Global Optimization): This is the primary structural phase. The system swaps the real, non-differentiable generator nodes for their neural proxies. It then performs joint optimization across all parameters to match the target image's layout, scale, and structure.
- Stage III (Post-optimization): The proxies are replaced with the original high-quality procedural nodes. A final fine-tuning pass is performed on the remaining differentiable parameters to polish the final output.
Datasets and Training
To train the proxies effectively, the authors generated a synthetic dataset of 300,000 images (256x256) for each proxy type. To ensure the training data reflected realistic usage, they analyzed a database of over 7,000 professional material graphs from Substance Source. By sampling parameters based on distributions found in artist-designed assets, they avoided training the networks on "garbage" parameter combinations that would never occur in a production environment.
Key Results
The proposed method demonstrates significant improvements over the state-of-the-art in both visual fidelity and computational efficiency.
Visual Fidelity
As shown in the results, the proxy-based approach excels at matching the underlying structure of materials. While previous methods often failed to capture the correct scale of tiles or the specific curvature of cobblestones, this method "stretches" and "resizes" the internal logic of the procedural graph to fit the target photo accurately.
Performance
By enabling gradient-based optimization, the framework is approximately 40x faster than semi-automatic methods that rely on gradient-free optimization. A typical material can be matched in roughly 30 seconds, compared to 20 minutes for previous approaches. Quantitatively, the method achieved a feature/style loss score of 0.408/0.261, a marked improvement over MATch’s 0.548/1.038 (where lower scores indicate higher similarity).
Limitations and Future Work
Despite its success, the system has limitations. Like many gradient-based solvers, it can fall into local minima if the initial parameter guess is too far from the target. Additionally, the proxies are currently limited by their training data; if a target photograph contains a pattern far outside the range seen during training (e.g., an extremely high density of bricks), the optimization may fail to converge.
Future research may focus on "image-conditioned" proxies that can generalize across a wider variety of node types without requiring individual pre-training for every specific generator in a library.
Summary updated