# MeshAxiom: An Agent-Native 3D Foundation Stack for Programmable Worlds **[AlayaLab](https://github.com/AlayaLab)** [![arXiv](https://img.shields.io/badge/arXiv-2611.36484-b31b1b)](https://arxiv.org/abs/2611.36484) [![Hugging Face](https://img.shields.io/badge/%F0%9F%A4%97-Hugging%20Face-FFD21E)](https://huggingface.co/AlayaLab/MeshAxiom-Base) [![Project Page](https://img.shields.io/badge/Project-Page-1683D8)](https://alaya-lab.github.io/MeshAxiom/) [![3D Asset Library](https://img.shields.io/badge/3D-Asset%20Library-5B6EE1)](https://alaya-lab.github.io/MeshAxiom/space-kit.html) MeshAxiom teaser: generated meshes with explicit topology and example programmable scenes
## Overview **MeshAxiom-Base** generates a triangle mesh from one image and a target face count. It places vertices on a sparse octree, then predicts which vertices form each triangle. MeshAxiom links each mesh to its reference image and generation settings. Agents can inspect and edit the mesh, and scene programs can place and animate multiple instances of it. ## Explore Space Saga Explore 123 downloadable meshes and 19 assemblies in the [3D asset library](https://alaya-lab.github.io/MeshAxiom/space-kit.html). In *Siege of the Dyson sphere*, 134 copies of one panel form the shell around a star. Compare geometry and material views of all 12 animated scenes in [Space Saga](https://alaya-lab.github.io/MeshAxiom/#saga). ## Release Status > **2026-11-30 — We released updated MeshAxiom-Base checkpoints with improved image-to-mesh performance.** [Model weights](https://huggingface.co/AlayaLab/MeshAxiom-Base) - [x] Project website and Space Saga showcase - [x] Interactive 3D asset library and asset downloads - [x] MeshAxiom-Base Exact inference code - [x] Public model weights - [x] Paper - [ ] MeshAxiom workflow tools and documentation ## Install Use Linux with Python 3.11 or 3.12 and a CUDA build of PyTorch 2.7. Download the Base weights once for the CLI, Python API and local web interface. ```bash git clone https://github.com/AlayaLab/MeshAxiom.git cd MeshAxiom python -m pip install -e '.[geometry,hub,background,postprocess]' hf download AlayaLab/MeshAxiom-Base --local-dir models/MeshAxiom-Base ``` ## Generate a mesh The example requests 4,000 triangles for a cockpit image with a black background. For photos or transparent PNGs, omit `--background keep` to use the default foreground processing. ```bash meshaxiom generate --config models/MeshAxiom-Base/config.json \ --image examples/reference.png --background keep \ --face-budget 4000 --output outputs/cockpit ``` If you run out of GPU memory, set [`runtime.geometry_worker_residency`](docs/ROCM.md#release-one-geometry-worker-before-loading-the-next) to `"sequential"` in your local `config.json`. Open `outputs/cockpit/mesh.glb` in a 3D viewer. The GLB uses glTF’s Y-up convention. The same directory contains the Z-up mesh in `mesh.obj` and `mesh.json`, along with the `vertices.npz` and `topology.npz` arrays. ### Python Keep the pipeline open across calls to reuse the loaded models. Use a fresh output directory for each mesh. ```python from meshaxiom import MeshAxiomPipeline with MeshAxiomPipeline.from_pretrained("models/MeshAxiom-Base") as pipeline: result = pipeline.generate( "examples/reference.png", "outputs/cockpit-python", face_budget=4000, background="keep", ) print(result["artifacts"]["obj"]["path"]) ``` ### Local web interface ```bash meshaxiom serve --config models/MeshAxiom-Base/config.json --workspace outputs/server ``` Open `http://127.0.0.1:7860` to upload an image and download the generated mesh. ## Documentation - [Agent tools and local HTTP API](docs/AGENT_USAGE.md) - [Texture generation with Pixal3D and 2× upscaling with Real-ESRGAN](docs/MATERIALS.md) - [Exact inference](docs/EXACT.md) - [ROCm geometry smoke test and sequential low-VRAM workers](docs/ROCM.md) - [Loading a pinned model revision from Hugging Face](docs/HUGGINGFACE.md) ## License The authors' original MeshAxiom code is licensed under Apache-2.0. Model weights and third-party components have separate terms. [Code license and scope](LICENSE.md) · [Model weight terms](https://huggingface.co/AlayaLab/MeshAxiom-Base/blob/main/LICENSE.md) · [Third-party notices](docs/THIRD_PARTY.md) ## Acknowledgements MeshAxiom-Base’s geometry pipeline reimplements the two-stage vertex and topology diffusion method described in [Nexus](https://arxiv.org/abs/2607.13563). We thank the Nexus authors for this foundation.