Abstract
Polygon meshes are an efficient representation of 3D geometry, and are of central importance in computer graphics, robotics and games development. Existing learning-based approaches have avoided the challenges of working with 3D meshes, instead using alternative object representations that are more compatible with neural architectures and training approaches. We present an approach which models the mesh directly, predicting mesh vertices and faces sequentially using a Transformer-based architecture. Our model can condition on a range of inputs, including object classes, voxels, and images, and because the model is probabilistic it can produce samples that capture uncertainty in ambiguous scenarios. We show that the model is capable of producing high-quality, usable meshes, and establish log-likelihood benchmarks for the mesh-modelling task. We also evaluate the conditional models on surface reconstruction metrics against alternative methods, and demonstrate competitive performance despite not training directly on this task.
Introduction
In computer graphics and 3D modeling, polygon meshes are the gold standard for representing geometry. However, they are notoriously difficult for deep learning models to generate directly. Unlike images (regular grids of pixels) or voxels (regular 3D grids), meshes are "unstructured": they consist of a variable number of vertices connected in complex, discrete patterns to form faces.
Most existing 3D generative models dodge this complexity by producing point clouds, voxels, or implicit surfaces, which then require post-processing (like the Marching Cubes algorithm) to become a mesh. These resulting meshes are often "messy," consisting of thousands of tiny, uniform triangles that do not reflect how a human artist would model an object. PolyGen aims to bridge this gap by modeling the mesh representation directly using a Transformer-based architecture.
Methodology
PolyGen breaks the mesh generation task into two sequential stages, both powered by the Transformer architecture. This decomposition allows the model to first establish the "points" of the object and then decide how they should be connected.
The Vertex Model
The first stage generates a collection of 3D points. To turn an unordered cloud of vertices into a sequence a Transformer can process, the authors sort the vertices by their vertical ($z$) coordinate. The coordinates are quantized into 8-bit discrete bins. The model then autoregressively predicts the next coordinate ($z$, then $y$, then $x$) based on all previous ones, effectively building the object from the ground up.
The Face Model
Once the vertices are set, the Face Model determines the connectivity. It uses a Transformer encoder to process the vertices and a Transformer decoder to emit face sequences. Crucially, it employs Pointer Networks. Instead of predicting coordinate values, the model predicts the index of the vertices that form a face. This allows the model to support $n$-gons (polygons with any number of sides), enabling it to represent large flat surfaces with a single polygon, mirroring professional modeling practices.
Training and Datasets
The researchers utilized the ShapeNet Core V2 dataset, a standard repository of 3D CAD models. To keep sequence lengths manageable for the Transformer, models were simplified to a maximum of 800 vertices and 2800 face indices. Extensive data augmentation, including axis scaling and piecewise linear warping, was applied to prevent overfitting and improve the model's ability to generalize across different object categories.
Key Results
PolyGen establishes strong benchmarks for the mesh-modelling task. It achieved a negative log-likelihood of 4.26 bits per vertex on the test set, significantly outperforming baseline methods and standard compression algorithms like Google’s Draco.
When conditioned on images, PolyGen produced meshes competitive with specialized surface generation models like AtlasNet in terms of Chamfer distance, but with much more efficient and structured polygon layouts. The generated meshes demonstrate a remarkable ability to capture global structure, maintaining symmetry and sharp edges in complex objects like chairs and cabinets.
Limitations and Future Work
While PolyGen represents a significant step forward, it faces several challenges. The 8-bit quantization limits fine-grained detail, and the Transformer's quadratic memory scaling makes it difficult to handle high-resolution meshes with thousands of vertices. Occasionally, the model may produce "non-manifold" geometry or disconnected components. Future research may explore more efficient Transformer variants, such as Sparse Transformers, and improved quantization schemes to capture the high-fidelity details required for professional applications.
Conclusion
PolyGen demonstrates that direct autoregressive modeling of 3D meshes is a viable and powerful approach. By moving away from proxy representations, it produces clean, usable meshes with human-like topology, opening new possibilities for generative modeling in graphics, robotics, and game development.
Summary updated