NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

ShapeAssembly: Learning to Generate Programs for 3D Shape Structure Synthesis

R. Kenny Jones, Theresa Barton, Xianghao Xu, Kai Wang, Ellen Jiang, Paul Guerrero, Niloy J. Mitra, Daniel Ritchie · DOI

Abstract

Manually authoring 3D shapes is difficult and time consuming; generative models of 3D shapes offer compelling alternatives. Procedural representations offer high-quality and editable results but are difficult to author and often produce outputs with limited diversity. Conversely, deep generative models can learn to generate any class of shape but their outputs often contain artifacts and lack editability. We propose ShapeAssembly, a domain-specific "assembly-language" for 3D shape structures. ShapeAssembly programs construct shapes by declaring cuboid part proxies and attaching them to one another hierarchically. We train a hierarchical sequence VAE that learns to write novel ShapeAssembly programs, capturing interpretable variability and correlations across shape collections. Our generated shapes are more plausible and physically valid than those of existing methods, and our latent space allows for smoother, semantically meaningful interpolations.

Introduction

The creation of high-quality 3D models currently presents a choice between two paradigms. Procedural models, such as shape grammars, produce clean, editable, and structurally sound geometry by following strict rules. However, they are difficult to author manually and struggle to capture the diversity of real-world objects. Deep generative models (e.g., VAEs or GANs) learn from data to replicate complex shapes but often fail to understand physical connectivity, leading to "noisy" results like floating parts or unstable structures. ShapeAssembly seeks to combine the structural integrity of procedural code with the creative diversity of deep learning.

Methodology: The ShapeAssembly Framework

The core of our approach is the ShapeAssembly DSL, a domain-specific language designed for 3D structures. Unlike vertex-level definitions, this language uses commands like Cuboid for part creation and attach for snapping parts together at specific anchor points. It also incorporates "macros" for design patterns such as reflect (symmetry) and translate (repetition).

The ShapeAssembly pipeline: from DSL definition and hierarchical part graphs to a generative VAE model that outputs executable programs.

To generate these programs, we utilize a Hierarchical Sequence VAE. Unlike standard VAEs that output coordinates, this model learns to generate the text of a ShapeAssembly program. Its hierarchical nature allows it to expand high-level parts (e.g., a "base") into detailed sub-programs (e.g., legs and a frame). A key component is the Differentiable Interpreter, which executes the code to produce 3D geometry while allowing gradients to flow back through the parameters, enabling the optimization of generated programs to fit unstructured data like point clouds.

Key Insights: Programs as Latent Spaces

A significant advantage of generating programs rather than raw geometry is the nature of the resulting latent space. In traditional 3D latent spaces, interpolation often causes shapes to "melt" into one another. In ShapeAssembly, we interpolate between programs.

Interpolation and editing in ShapeAssembly program space. Interpolating between programs allows for discrete structural transitions while maintaining connectivity.

This approach enables discrete structural transitions—such as a chair back gaining additional slats—while other geometric features shift smoothly. Furthermore, by treating connectivity as a "first-class citizen" through the attach command, the model is biased toward creating physically connected structures, effectively eliminating the "floating part" artifacts common in previous deep learning models.

Evaluation and Results

We trained and evaluated ShapeAssembly using the PartNet dataset, focusing on chairs, tables, and storage units. Our model was compared against state-of-the-art baselines, including StructureNet and 3D-PRNN.

  • Physical Plausibility: ShapeAssembly significantly outperformed baselines in metrics such as Rootedness and Stability. For tables, ShapeAssembly achieved 85.9% stability in physics simulations, compared to 76.8% for StructureNet.
  • Latent Space Quality: The model produced smoother and more semantically meaningful interpolations than geometry-based methods.
  • Point Cloud Fitting: Using the differentiable interpreter, we successfully fit programs to unstructured point clouds with higher accuracy and physical validity (80.2% stability) than optimized baselines (71.9%).

Conclusion and Future Work

ShapeAssembly demonstrates that learning to write programs is a powerful path toward high-quality 3D synthesis. While current limitations include a complexity cap (12 cuboid declarations) and the use of simple proxy geometry (cuboids only), future extensions could incorporate more diverse primitives like spheres or cylinders. Additionally, incorporating semantic "common sense" rules could further refine the realism of generated designs.

Summary updated

BibTeX
@article{jones2020shapeassembly,
  author = {R. Kenny Jones and Theresa Barton and Xianghao Xu and Kai Wang and Ellen Jiang and Paul Guerrero and Niloy J. Mitra and Daniel Ritchie},
  title = {{ShapeAssembly: Learning to Generate Programs for 3D Shape Structure Synthesis}},
  journal = {ACM Trans. Graphics},
  year = {2020},
  doi = {10.1145/3414685.3417812},
}
Figure