Abstract
Creating realistic 3D environments requires high-quality, "holistic" textures—flat, rectangular, and unobstructed images of surfaces. However, real-world texture acquisition is often hindered by perspective distortion, geometric deformation, and foreground occlusions. This paper introduces a novel framework that leverages Latent Diffusion Models (LDM) combined with an occlusion-aware transformer to simultaneously rectify geometric distortions and synthesize missing data. By operating in a compressed latent space and utilizing partial convolutions, the system transforms degraded observations into pristine texture samples suitable for professional digital art and 3D modeling.
Introduction
In the field of computer graphics, the transition from a real-world photograph to a usable digital texture map is rarely straightforward. A photo of a brick wall or a fabric swatch is typically subject to perspective warping, non-rigid deformations, or physical obstructions like trees or pedestrians. Traditional texture synthesis tools generally require pre-cleaned, perfectly planar samples to function effectively. While specialized tools exist for inpainting or expansion, they often fail when faced with the simultaneous requirement of un-warping a surface while filling in large occluded gaps.
This research addresses the "holistic" rectification problem: the ability to take a messy, obstructed, and warped observation and produce a professional-grade, flat texture map in a single automated process.
Methodology
Latent Diffusion Models
The framework is built upon Latent Diffusion Models (LDM). Unlike standard diffusion models that operate on raw pixel data, LDMs function within a compressed "latent space." This approach significantly reduces computational overhead and memory requirements while maintaining the high generative fidelity required for complex textures.
Occlusion-aware Latent Transformer
The core innovation of this work is the Occlusion-aware Latent Transformer. Standard neural networks often suffer from "feature poisoning" when processing images with missing data, as the empty or masked pixels can corrupt the surrounding valid information. To mitigate this, the authors implemented three specific architectural strategies:
- Partial Convolutional Layers: These layers are designed to ignore masked-out areas, ensuring the model only processes and propagates valid texture information.
- Self-Attention Mechanisms: This allows the model to leverage global context. If a portion of a texture is hidden, the model can "attend" to distant, visible parts of the image to understand the underlying pattern and structure.
- Dual Conditioning: The generation process is guided by both the direct input of the degraded image and refined guidance features produced by the latent transformer, ensuring the output remains structurally faithful to the original observation.
Data Generation and Training
Because no large-scale dataset of paired "distorted" and "perfect" textures exists, the researchers developed a synthetic training pipeline. Using a source set of 22,043 clean, planar texture images from databases such as Brodatz and OpenSurfaces, they simulated real-world degradation through:
- Homography Transformations: To simulate camera perspective.
- Thin Plate Spline (TPS) Transformations: To simulate non-rigid warping and curvature.
- Free-form Masks: To simulate random foreground occlusions.
This resulted in a robust training set of over 15,000 images, allowing the model to learn the complex relationship between distorted inputs and their rectified counterparts.
Results and Discussion
The framework was benchmarked against industry-standard baselines, including pix2pix, VQGAN, and MAT (a leading inpainting transformer). The results demonstrated a clear advantage for the diffusion-based approach:
- Quantitative Superiority: On the Fréchet Inception Distance (FID) metric—a standard for measuring image realism—the proposed method scored 15.50, vastly outperforming VQGAN (45.21) and MAT (187.40).
- Structural Fidelity: The model achieved a Structural Similarity (SSIM) of 0.5096, indicating a superior ability to preserve the "bones" and geometric consistency of the original texture compared to GAN-based methods.
- Perceptual Quality: In a user study, human participants preferred the results of this method 90.56% of the time over MAT and 75.32% of the time over VQGAN.
One of the key insights of the study is that Diffusion models are inherently better suited for texture synthesis than Generative Adversarial Networks (GANs). GANs often suffer from "mode collapse," leading to repetitive or blurry patterns, whereas diffusion models more accurately capture the stochastic, complex nature of real-world materials.
Limitations and Future Work
Despite its success, the current framework has limitations. It is currently trained for 256x256 resolutions, which is lower than the requirements for many high-end professional applications. Furthermore, the model can struggle with extreme lighting gradients or very harsh shadows. Future research will focus on integrating "arbitrary-sized" image generation techniques to allow for the synthesis of much larger, tileable texture maps directly from small, degraded samples.
Summary updated