Geometrically grounded programmatic modeling of everyday 3D assets for simulation
USDCraft is an agentic framework for generating and reconstructing simulation-ready 3D assets
as Python programs. This branch hosts USDCraft v2, which extends articulated rigid objects to
cloth, soft solids, inflated bodies, cables and liquids, with PhysX action tests. USDCraft
v1 is on the v1 branch.
- 🔥 [2026/12] USDCraft v2 is released! Assets go beyond rigid parts and joints to cloth, soft solids, inflated bodies, cables and liquids, checked with PhysX action tests. See Project Page | arXiv | Code
- 🔥 [2026/10] USDCraft v1 is released! Agentic generation and reconstruction of articulated rigid 3D assets as programs. See Project Page | arXiv | Code
USDCraft turns a text prompt, a reference image, or a mesh plus a photo into a simulation-ready 3D asset: an AI agent writes the asset as a Python program with the USDCraft SDK, checks it against renders and geometry measurements, and exports it to URDF, USD and USDZ.
What v2 adds:
- Soft and flexible bodies: cloth, soft solids, inflated bodies, cables and liquids.
- PhysX action tests: drop, pick, squeeze, fold, hang, pour and more (Run the action tests).
- Simulation in the viewer and training-ready interaction annotations.
- Newton engine support
- Multi-view image input
- More stable simulation
- Self-improvement: for a capability the user asks for, design the experiments, wait for approval, then iterate and update the local code
- Asset editing: edit an existing record in place instead of regenerating it
- Robot-in-the-loop evaluation: tests with a partner object (a plug in its socket) and robot policies beyond scripted grips
Open this repository in Codex and ask:
- "Install USDCraft.": Codex checks the prerequisites and installs the dependencies.
- "Help me generate a cotton tote bag with two shoulder straps via Codex."
- "Help me reconstruct assets/reconstruction/egg_carton/mesh.glb with assets/reconstruction/egg_carton/photo.jpg via Codex."
- "Help me run assets/generation/generation_batch.csv via the API."
- "Set up the action tests.": Codex checks your GPU and walks you through Isaac Sim and Isaac Lab.
- "Run the action tests on my latest asset." or "Open the viewer."
Codex reads AGENTS.md and runs the matching command. "Via Codex" runs the agent on
your Codex account (no API key, no time or turn limit): Codex first shows a short summary and starts
after you approve, or right away if you ask it to start directly. The agent uses the same model and
reasoning effort as your Codex conversation; to use others, name them in your request (for example
"... via Codex with gpt-6.2-astra, low effort"). "Via the API" runs the API-key workflow
below and starts immediately.
- macOS or Linux, Python 3.12
uv- Node.js ^20.19 or >=22.12 with npm (builds the viewer and the renderer)
From the repository root:
uv sync
uv run usdcraft setupusdcraft setup installs the Chromium browser used for rendering (Playwright downloads it together
with its FFmpeg build, which USDCraft does not use; see
THIRD_PARTY_NOTICES.md), builds the viewer and creates the data/
folders. Rerun it after pulling changes to viewer/web. On Ubuntu, if Chromium reports missing
system libraries, run uv run playwright install-deps chromium once.
Copy the example file and set OPENAI_API_KEY in .env:
cp .env.example .env
# edit .env: OPENAI_API_KEY=your-keyOPENAI_MODEL and OPENAI_BASE_URL in .env change the model and the endpoint (for example an
OpenAI-compatible proxy).
The default model in v2 is GPT-6.2 Astra (gpt-6.2-astra) with reasoning effort low. We
recommend low effort: it is faster and cheaper, and avoids the over-working observed at
--reasoning high (also noted in the v1 paper), where runs
take much longer and the agent struggles to balance mesh fit against overall structure.
Choose another model with --model and the reasoning effort with --reasoning on any command.
On the same 36 prompts, generated 12 at a time with reasoning effort low:
| Model | Cost per asset | Time per asset (median) | Whole batch |
|---|---|---|---|
| GPT-6.2 Astra (default) | $0.30 | 2.1 min | 9 min |
| GPT-6 Astra | $0.81 | 2.6 min | 12 min |
| DeepSeek V4.1 Flash | $0.09 | 8.3 min | 35 min |
Requests use the OpenAI Responses API by default; for an endpoint that only offers Chat Completions,
add --api-style chat-completions.
No API key? See Quickstart with Codex.
NOTICE AND DISCLAIMER: This software automatically retrieves, accesses or interacts with external materials. Those retrieved materials are not distributed with this software and are governed solely by separate terms, conditions and licenses. You are solely responsible for finding, reviewing and complying with all applicable terms, conditions, and licenses, and for verifying the security, integrity and suitability of any retrieved materials for your specific use case. This software is provided "AS IS", without warranty of any kind. The author makes no representations or warranties regarding any retrieved materials, and assumes no liability for any losses, damages, liabilities or legal consequences from your use or inability to use this software or any retrieved materials. Use this software and the retrieved materials at your own risk.
From text, from an image, or both (the text then adds to or overrides what the image shows):
uv run usdcraft generation "A kitchen base cabinet with two hinged doors and one drawer on top"
uv run usdcraft generation "a cotton tote bag with two shoulder straps"
uv run usdcraft generation --image assets/generation/plush_elephant.jpg
uv run usdcraft generation --image assets/generation/teapot.jpg "a teapot with a bamboo handle"Progress streams to the terminal. With the default model a run usually takes about 2 to 5 minutes and
ends with the new record_id.
Give the mesh and one photo of the same object:
uv run usdcraft reconstruction assets/reconstruction/egg_carton/mesh.glb --image assets/reconstruction/egg_carton/photo.jpgThe mesh can be GLB, glTF, OBJ, STL, PLY, OFF, XYZ or USD. Useful options:
| Option | Use |
|---|---|
--up-axis +Z, --front-axis=-Y |
Axes, when the file does not carry them (write a negative axis with =) |
--meters-per-unit 0.001 |
Unit scale, when the file does not carry it; otherwise a unitless mesh is sized from the photo |
--guidance "..." |
Your own notes for the agent |
--mesh-cleanup |
First remove background and detached clutter from the mesh (off by default) |
--image-observation |
Add a separate photo inventory step before the agent (off by default; the photo is always used) |
--photo-evidence photo_evidence.json |
A registered photo package (calibrated photo, object mask and the mesh pose in that camera); see the Reconstruction reference |
--label |
Display name |
A batch runs one CSV row per asset. The example CSVs in assets/ cover every example input:
uv run usdcraft generation-batch assets/generation/generation_batch.csv --concurrency 4
uv run usdcraft reconstruction-batch assets/reconstruction/reconstruction_batch.csv --concurrency 2assets/reconstruction/reconstruction_batch.csv:
row_id,source_path,image_path,label,mesh_cleanup
egg_carton,egg_carton/mesh.glb,egg_carton/photo.jpg,Egg carton,
burger_bun,burger_bun/mesh.glb,burger_bun/photo.jpg,Burger bun,Paths resolve from the CSV's folder and an empty cell means the default. Generation rows use
row_id,prompt,image_path,label. Add --validate-only to check a CSV without running it. Rows run
independently, and each may take up to 32 minutes (--run-timeout SECONDS, 0 for no limit).
Every column is listed in the Generation and
Reconstruction references.
New in v2: usdcraft eval puts an asset into PhysX and checks that it behaves as the real object
would. It needs an NVIDIA GPU and a separate Python environment with Isaac Sim 6.2.0 and Isaac Lab
44.0.1.
-
Set up the environment, about 30 GB, in
usdcraft-isaac-env/of the repository, where USDCraft finds it by default:git clone https://github.com/isaac-sim/IsaacLab.git usdcraft-isaac-env/IsaacLab git -C usdcraft-isaac-env/IsaacLab checkout bb4d9915f48e0529b6fc5c2982629aed0891b574 (cd usdcraft-isaac-env/IsaacLab && UV_PROJECT_ENVIRONMENT=../venv uv sync --frozen --extra isaacsim) uv pip install --python usdcraft-isaac-env/venv/bin/python imageio-ffmpeg==0.6.0 usdcraft-isaac-env/venv/bin/python -c "import isaacsim" # accept the Isaac Sim license once
Or ask Codex to "set up the action tests". An environment elsewhere works too: set
USDCRAFT_ENGINE_PYTHONto its Python. -
Test a record, or a compile output:
uv run usdcraft eval --record <record_id> # drop, pick and the asset's declared tests uv run usdcraft eval --record <record_id> --probe fold # one test (repeat --probe for more) uv run usdcraft eval --usd /tmp/out/isaac/asset.usda # an asset from usdcraft compile
Every asset gets
dropandpick; the agent lists the other tests the asset is meant to pass when it builds it (model.action_tests(...)):gravity_hold,joint_sweep,open_close,squeeze,fold,cloth_drape,hang,stretch,turn_page,place_in,rod_root_holdandliquid_carry_pour. -
Read the results in
data/cache/record_evals/<record_id>/<time>/:summary.csvhas one row per run (pickruns three times, the others once), with the failed rule inproblem(for exampleR2 penetrationorR10 not lifted) and warnings inflag(for exampleR17 partly folded); each run also leaves arun.jsonand, when it failed or was flagged, a video (--video allrecords every run). The viewer's Simulation tab lists the record's test runs too, and replays each one in 3D.
The test catalog and the rules R0–R20 are described in
usdcraft/simulation/README.md.
uv run usdcraft viewer # http://127.0.0.1:8770
uv run usdcraft viewer --read-only --host 0.0.0.0 # a review copy others can open: no rating, no deletionTo run simulations from the viewer, set up the Isaac Sim environment first
(Run the action tests). The viewer finds usdcraft-isaac-env/ in the
repository by itself; for an environment elsewhere, set USDCRAFT_ENGINE_PYTHON or pass
--engine-python /path/to/python. Then open a record's Simulation tab: it lists the asset's
action tests (drop, pick and the tests it declares), runs the one you start and plays the result on
the model with its test fixtures. Each result is stored under data/cache/record_simulations/ and
replays from then on without running again, also in a --read-only viewer or on a machine without a
GPU.
assets/ holds the inputs used above so you can try USDCraft right away. They come from assets
USDCraft v2 generated and that pass all their action tests:
assets/generation/: renders of a plush elephant and a teapot as reference images, andgeneration_batch.csv(two text requests, two image requests).assets/reconstruction/: an egg carton with a hinged lid and a soft burger bun, each withmesh.glb(the generated asset's visual mesh) andphoto.jpg(a render of it), andreconstruction_batch.csv.
They are NVIDIA material released under the repository license (see NOTICE).
Everything a run keeps lives under data/ (ignored by git):
data/records/<record_id>/: the record, with the generatedmodel.py, its inputs and history.data/cache/record_materialization/<record_id>/: the exportedmodel.urdf,model.usdzand the USD assetisaac/model.usdc. Rebuild them frommodel.pywithuv run usdcraft rematerialize <record_id>.data/cache/record_training/<record_id>/: training-ready annotations, written after every Generation or Reconstruction run and byuv run usdcraft training-annotate <record_id>(the declared interactions as end-effector poses and motions, and rest poses).data/cache/record_simulations/<record_id>/: simulations run from the viewer's Simulation tab, stored for playback; safe to delete.data/cache/record_evals/<record_id>/: action test results fromusdcraft eval; safe to delete.data/cache/refusals/: notes recorded when an agent refuses an unsupported request (status: blocked, exit code 3); safe to delete.data/local/: working folders of failed runs (or of any run with--keep-workspace).
uv run usdcraft check /abs/model.py # run a model's own tests and checks
uv run usdcraft compile /abs/model.py --output /tmp/out # export URDF/USD/USDZ from a model.py
uv run usdcraft generation-validate --all # re-check every stored record
uv run usdcraft reconstruction-validate --all
uv run usdcraft training-annotate <record_id> # training-ready interaction annotationstraining-annotate also accepts a compile output folder or a USD file. See
usdcraft/training/README.md for the annotation format.
uv run usdcraft <command> --help lists every option. AGENTS.md maps each component
to its documentation, and sdk/README.md describes the SDK used in model.py.
USDCraft builds on Articraft
(arXiv:2605.15187), whose articulated-object SDK and viewer were
our starting point; we thank its authors for releasing their work openly. We also thank
CadQuery and
cq_gears, whose documentation, examples and gear generator
our SDK adapts. NOTICE lists the details.
If you use USDCraft in your research, please cite the papers.
USDCraft v2:
@article{zhang2026usdcraftv2,
title={USDCraft v2: Self-Improving Physics-Typed Programmatic Modeling of Everyday Objects for Simulation},
author={Zhang, Chuanrui and Wang, Duomin and Yang, Zaijia and Shi, Lu and Zhou, Daquan and Zhang, Ruihua and Wang, Ziwei},
journal={arXiv preprint arXiv:2612.03411},
year={2026}
}USDCraft v1:
@article{zhang2026usdcraft,
title={USDCraft: Geometrically Grounded Programmatic Modeling of Articulated 3D Assets for Simulation},
author={Zhang, Chuanrui and Yang, Zaijia and Wang, Duomin and Shi, Lu and Zhou, Daquan and Zhang, Ruihua and Wang, Ziwei},
journal={arXiv preprint arXiv:2610.11322},
year={2026}
}This repository is licensed under the Apache 2.0 License. Third-party attributions are
in NOTICE and THIRD_PARTY_NOTICES.md. Contributions: see
CONTRIBUTING.md.

