Procedura README

项目的 README,来自 github.com/SpatiaOS/Procedura。合并为一个 markdown 文件: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)

正在搜索数据库…

这是什么?Procedura 是一个 agent 式的 3D 建模管线,把文本提示(可选加一张参考图)变成可编辑的程序化程序——一个由命名零件通过类型化配合连接而成的参数化脚本,由 LLM 编写,可选支持每个零件的 PBR 材质和铰接装配,导出为 OpenUSD/URDF。
它输出的是 3D 网格,还是我事后真正能编辑的东西?它输出的是真正的源代码,而不是网格或点云:一个 OpenSCAD 风格的参数化程序,可以打开、编辑、重新编译,而且零件分解天然内置其中。
怎么让它跑起来?运行自带的安装器(bun run setup / bash scripts/install-deps.sh),它会安装 Bun、支持 Manifold 的 OpenSCAD、Blender、管线的各个 npm 包以及一个起始 .env——然后用一个提示词和一个输出目录运行 bun run scripts/procedura.ts。
需要我自己准备 LLM API 密钥吗?需要——Procedura 不带任何密钥,也没有托管后端,你需要配置 OPENAI_BASE_URL / OPENAI_API_KEY(走 Gemini 原生路径则用 GEMINI_API_KEY / GEMINI_BASE_URL),指向 OpenAI API、OpenRouter、企业网关或本地 vLLM/Ollama/LM Studio 服务器。
有什么常见的安装陷阱需要知道吗?有:OpenSCAD 必须以 Manifold 后端构建,否则会静默回退到 CGAL,慢到灾难级——一次 hull() 调用在 CGAL 下耗时 1774 秒,而 Manifold 下只要 1.77 秒。Procedura 会在启动时检查这一点,不满足就拒绝运行。
--motion 标志实际产出什么?它会规划铰接(零件之间可动的关节),导出到 OpenUSD,配合 --motion-urdf 还能导出为带逐连杆网格的 URDF,并可以在 NVIDIA Isaac Sim 中以无头模式验证运动。
Procedura Studio 是什么?它是同一条管线的网页前端:你用提示词、可选的参考图和各阶段的开关来组织一次运行,看着它逐个零件构建,并检查每一个中间产物——规划、零件、细化循环、最终网格、材质和铰接。
最省钱的试用方式和最高质量的运行分别是什么?完全不带任何标志时,它以纯文本方式逐个零件运行,流程里没有图像 API 也没有 Blender——这是最便宜的可用配置。最高质量的运行则同时开启 --image、--3d-feedback、--assembly、--paint 和 --motion,代价是更多的时间和金钱。
LLM harness 是从零构建的吗?不是——vendor/harness/ 里内置的 harness 是对借鉴自 MIT 许可的 opencode 和 openclaw 项目的架构模式所做的独立实现。
作者
SpatiaOS
大小
1.5 MB
星标
482
更新
提交Oct 20
时长
3个月
提交 · 90 天