Procedura README

The project's README from github.com/SpatiaOS/Procedura. As one markdown file: README.md.

Procedura

Build editable 3D models

Project page   Paper (PDF)

3D models made with Procedura, shown with their parts and colors

Procedura turns text or a reference image into a 3D model you can edit. It builds one part at a time, checks and improves the shape, adds materials, and exports files for moving parts.

Run it inside Codex or Claude Code through MCP. It uses the model in your current session. You do not need a separate model API key. Your agent's usual usage limits and billing apply.

News

Quick start

You need Git, curl, Python 3.11+ with venv support, and Codex or Claude Code. Sign in to your agent before you start.

The setup script supports Linux x86_64. It installs Bun, OpenSCAD, Blender, and the Python packages. See the MCP guide for other platforms and setup options.

1. Install

curl -fsSL https://raw.githubusercontent.com/SpatiaOS/Procedura/main/scripts/install-mcp.sh \
  | bash -s -- --agent both

This installs into ~/.local/share/Procedura and sets up both agents. Use --agent codex or --agent claude to set up just one.

For an existing clone, run this from its folder:

bash scripts/install-mcp.sh --agent both

2. Open your agent

cd ~/.local/share/Procedura
codex

Run claude instead of codex for Claude Code. If you used a clone, open the agent from that folder instead.

Choose your model and reasoning effort in the agent. Follow its project and MCP trust prompts. Restart the agent if it was open during setup.

3. Ask for a model

Describe what you want and give the path to a PNG image:

Use Procedura to build the rover in /absolute/path/rover.png. Run the full pipeline. Show me the preview, output files, and any warnings or failed checks.

You can also use $procedura in Codex or /procedura in Claude Code. Keep the session open until the run ends. Large models can take hours.

For a model without an image, ask for a text-only run. You can also ask the agent to make a reference image if it has a built-in image tool.

Output files

Find your files in outputs/mcp/<run_name>/ inside the project folder.

File What it contains
final.scad Source code you can edit in OpenSCAD
final.obj The 3D mesh
final_painted.* The model with materials
preview_final/, preview_painted/ Preview images
motion/ USD and URDF files for moving parts, plus motion test results
.cx/completion.json Run result, warnings, and a list of output files

The final report lists any failed or skipped steps. Check the previews and the report to see what the run produced.

Good to know

Guides

Credits

The code that connects to models uses design ideas from opencode and openclaw. Both projects use the MIT license.

License

MIT. See LICENSE. OpenSCAD and Blender are separate tools with GPL licenses.

Procedura (SpatiaOS/Procedura)

Searching Database…

What is this?Procedura is an agentic 3D modeling pipeline that turns a text prompt (and optionally a reference image) into an editable procedural program — a parametric script with named parts joined by typed mates — written by an LLM, with optional per-part PBR materials and articulation exported to OpenUSD/URDF.
Does it output a 3D mesh, or something I can actually edit afterward?It outputs real source code, not a mesh or point cloud: an OpenSCAD-style parametric program you can open, edit, and re-compile, with the part decomposition built in for free.
How do I get it running?Run the bundled installer (bun run setup / bash scripts/install-deps.sh), which installs Bun, a Manifold-capable OpenSCAD, Blender, the pipeline's npm packages, and a starter .env — then run bun run scripts/procedura.ts with a prompt and an output directory.
Do I need to bring my own LLM API key?Yes — Procedura ships with no keys and no hosted backend, so you configure OPENAI_BASE_URL / OPENAI_API_KEY (or GEMINI_API_KEY / GEMINI_BASE_URL for Gemini's native path) pointing to the OpenAI API, OpenRouter, a corporate gateway, or a local vLLM/Ollama/LM Studio server.
Is there a common install pitfall I should know about?Yes: OpenSCAD must be built with the Manifold backend, or it silently falls back to CGAL and becomes catastrophically slow — one hull() call took 1774 seconds under CGAL versus 1.77 seconds under Manifold. Procedura checks for this at startup and refuses to run without it.
What does the --motion flag actually produce?It plans articulation (moving joints between parts), exports it to OpenUSD and, with --motion-urdf, to URDF with per-link meshes, and can validate the motion headlessly in NVIDIA Isaac Sim.
What is Procedura Studio?A web front-end for the same pipeline: you compose a run with a prompt, optional reference image, and per-stage toggles, watch it build part by part, and inspect every intermediate artifact — plan, parts, refine loop, final mesh, materials, and articulation.
What's the cheapest way to try it versus the best-quality run?With no flags at all it runs text-only, part-by-part, with no image API or Blender in the loop — the cheapest useful config. The best-quality run turns on --image, --3d-feedback, --assembly, --paint, and --motion together, at the cost of more time and money.
Is the LLM harness built from scratch?No — the vendored harness in vendor/harness/ is an independent implementation of architectural patterns borrowed from the MIT-licensed opencode and openclaw projects.
Creator
SpatiaOS
Size
1.5 MB
Stars
482
Updated
CommitOct 20
Age
3mo
Commits · 90 Days