DirectUV: Image-Conditioned UV Texture Generation with Surface-Aware Positional Encoding

Jiantao Lin, Yingjie Xu, Mingzhi Sheng, Yangkai Wei, Hao Chen, Ying-Cong Chen

TL;DR

DirectUV is a diffusion-based framework that generates high-quality 3D textures directly in UV space by embedding 3D surface geometry into the model's attention mechanism. By replacing standard 2D positional encodings with Surface-Aware Positional Encoding (SAPE), the model maintains global consistency and sharp details even across disconnected UV islands and complex seams.

What Problem Does This Paper Address?

Generating textures for 3D meshes usually involves a trade-off. You can project 2D images onto a mesh (multi-view projection), but this often leads to visible seams, blurring in occluded regions (like the inside of a cup), and inconsistencies between views. Alternatively, you can generate textures directly in the 2D UV space.

However, UV maps are inherently "broken"—they flatten a continuous 3D surface into 2D "islands." Standard Transformers and CNNs treat these as 2D grids, meaning two points that are neighbors in 3D might be miles apart in the UV layout. Because the model's attention mechanism only "sees" 2D distance, it struggles to coordinate details across these artificial seams, leading to misaligned textures and "seam artifacts."

Methods

DirectUV operates as a latent diffusion process within the space of a pretrained image VAE (specifically, the Flux VAE). The pipeline takes a single reference image and a 3D mesh as input.

The core innovations are:

  • Surface-Aware Positional Encoding (SAPE): Instead of using a standard 2D grid for positional encoding, the authors use a Canonical Coordinate Map (CCM). The CCM is essentially an image where each pixel's "color" represents its actual $(x, y, z)$ coordinate on the 3D mesh. By injecting these 3D coordinates into the Rotary Positional Encoding (RoPE), the Transformer's attention mechanism calculates token proximity based on true 3D surface distance rather than 2D UV distance.
  • Multi-Level SAPE: To handle different scales of detail, the authors subdivide latent UV patches into finer grids (e.g., $1\times1$, $2\times2$, $4\times4$). Different attention heads are assigned to different subdivision levels, allowing the model to reason about broad surface correspondence and fine-grained geometric variations simultaneously.
  • Soft Conditioning: The model is conditioned on a reference image (via CLIP and DINOv2) and a "coarse UV map" generated by an off-the-shelf multi-view generator. Crucially, the model treats the coarse UV as a suggestion rather than a hard target, allowing it to "fix" projection errors during the denoising process.
The DirectUV architecture for training and inference.

Datasets

The authors trained DirectUV on a massive consolidated dataset of approximately 100,000 textured meshes derived from:

  • TexVerse
  • PartNext
  • Objaverse

For evaluation, they used the Google Scanned Objects (GSO) dataset, which served as an out-of-distribution test set to prove the model's generalization capabilities.

Key Insights and Ideas

  • Attention is Geometry: The most profound insight is that positional encoding is the distance metric for attention. By changing the encoding from 2D to 3D, you fundamentally change how the Transformer "sees" the data, effectively healing the topological breaks caused by UV unwrapping.
  • Healing Seams via Communication: In Figure 2, the authors illustrate how SAPE allows tokens on different UV islands to "talk" to each other directly if they are adjacent in 3D space. This eliminates the need for complex post-processing to fix seams.
  • Robustness to Occlusion: Because the model generates the entire UV map at once in a surface-aware way, it can hallucinate plausible textures for regions that were never visible in the input image or the coarse projection, such as the interior of a well or a trash bin.
Figure 2: Mechanism of SAPE and Multi-Level SAPE. Left. Tokens i and j are adjacent on the mesh but separated onto different UV islands by a seam. SAPE measures their attention distance on the surface, allowing direct interaction across the seam. Right. Multi-Level SAPE reads the CCM at L resolutions and assigns the resulting positional encodings to the H heads, organized into G groups (one cell per head, color denotes group).

Key Results

DirectUV outperforms state-of-the-art baselines like TEXGen, FlexPainter, and Hunyuan3D-2.1 across both quantitative and qualitative metrics.

  • Quantitative: On the GSO dataset, DirectUV achieved the highest PSNR (25.13) and SSIM (0.9527), indicating superior reconstruction accuracy. It also showed strong performance in distributional similarity (FID and KID).
  • Qualitative: The model produces significantly sharper high-frequency details (like text or fine patterns) and maintains better consistency in complex cases. For example, in a fan model where other methods might "bleed" the back texture onto the front blades, DirectUV correctly separates them.
Figure 3: Qualitative comparison with state-of-the-art texture generation methods. (i) Finer details: our results preserve sharper high-frequency patterns, e.g., the line strokes in the number block. (ii) Occluded regions: for heavily occluded interiors such as the well and the trash bin, our method produces coherent and plausible content, while others yield blurry or incomplete textures. (iii) Robustness to multi-view inconsistency: by denoising directly in latent UV space, our method avoids being misled by conflicting views. In the fan case, UniTEX incorrectly transfers the back-cover texture onto the front blades, whereas ours preserves the correct appearance.
Quantitative comparison table showing DirectUV leading in PSNR and SSIM.

Limitations and Future Work

The primary limitation is the model's sensitivity to UV parameterization quality. If a mesh has a highly fragmented UV layout (e.g., thousands of tiny "slivers"), the per-token coordinate aggregation in SAPE can become noisy, leading to local blurriness or color leakage.

The authors suggest that future work could involve UV-aware preprocessing or developing learned tokenization strategies specifically designed for UV-space data, rather than relying on standard image-based VAEs.

Summary updated

BibTeX
@inproceedings{lin2026directuv,
  author = {Jiantao Lin and Yingjie Xu and Mingzhi Sheng and Yangkai Wei and Hao Chen and Ying-Cong Chen},
  title = {{DirectUV: Image-Conditioned UV Texture Generation with Surface-Aware Positional Encoding}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=NWZOrQHECk},
}
Figure