# Repository Briefing: NVlabs/USDCraft
> Source: https://repoforai.com/repo/NVlabs/USDCraft (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/NVlabs/USDCraft
- **Official Docs / Website**: https://nvlabs.github.io/USDCraft/v1
- **Category**: Voice, Vision & Video (语音 / 视觉 / 视频生成)
- **Primary Language**: Python
- **License**: Apache-2.0
- **Engineering Health**: B+ (75/100 · Maintenance 35/35 · Adoption 9/25 · Releases 11/20 · License 20/20)
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: CLI, API, GPU
- **Momentum**: 92 ★ total (+13 24h / +24 7d) · 7 forks
- **When to Use**: Best for: Robotics and simulation teams turning prompts, reference images or single-photo mesh captures into editable asset programs, batch exports and repeatable PhysX checks. Skip if: You need fully offline generation out of the box, multi-view reconstruction, in-place asset editing, or validated material behavior in a non-Isaac simulator without doing your own qualification.

## Overview
```text
### Architecture & Core Mechanics
USDCraft separates asset authoring from export and physics evaluation. Generation takes text, an image or both; reconstruction takes a mesh and a reference photo. An AI agent authors a Python program against the USDCraft SDK and checks it against renders and geometry measurements. The persistent artifact is a record with `model.py`, inputs and run history. `check` runs the model's checks, `compile` exports standalone artifacts, and `rematerialize` rebuilds a record's cached exports.

The local Python stack includes CadQuery, trimesh, manifold3d and python-fcl for CAD, mesh, solid geometry and collision work, plus `usd-core` for OpenUSD. Rendering setup uses Playwright Chromium; the viewer is built with Node.js, and the Python manifest includes FastAPI and Uvicorn. Practical extension points are the SDK-authored model, its `model.action_tests(...)` declarations and the configurable model endpoint. Agent requests default to OpenAI Responses, with a Chat Completions option. PhysX evaluation runs separately through the configured Isaac environment's Python executable.

### Key Capabilities & Differentiators
Generation accepts text, reference images or both. Reconstruction supports GLB, glTF, OBJ, STL, PLY, OFF, XYZ and USD with one photo; it exposes axis and unit overrides, optional mesh cleanup, and registered photo evidence with a calibrated image, object mask and mesh pose. Export targets are URDF, USD and USDZ. V2 expands the asset model beyond articulated rigid objects to cloth, soft solids, inflated bodies, cables and liquids. Verify flexible-body behavior in the intended simulator rather than assuming equivalent physics across export formats.

Every evaluated asset gets `drop` and `pick`; models can declare extra probes such as `joint_sweep`, `fold`, `cloth_drape` and `liquid_carry_pour`. Evaluation writes CSV summaries and per-run JSON, with video for failures or flagged runs by default. CSV batches offer per-row validation and configurable concurrency. On the same 36-prompt generation batch, run 12 at a time at low reasoning effort, GPT-6.2 Astra cost $0.30 per asset at a 2.1-minute median, GPT-6 Astra $0.81 at 2.6 minutes, and DeepSeek V4.1 Flash $0.09 at 8.3 minutes. Those figures characterize that batch, not reconstruction or end-to-end physics evaluation.

### Trade-offs & Limitations
Compared with hand-authoring in CAD or a simulator, USDCraft takes on more of the work from incomplete references and leaves a source program that can be inspected and rebuilt. Compared with a visual-mesh-only workflow, action probes can catch failures that a render cannot, such as penetration or an unsuccessful lift. Those probes are discrete tests, not certification that an asset is physically faithful in another engine or interaction. Use manual authoring and targeted validation where dimensional tolerances or contact behavior need precise control. Multi-view input, in-place record editing and Newton support are planned rather than current capabilities.

Budget separately for model calls, local render and geometry work, and optional GPU evaluation. The batch results show a real cost–latency choice: the cheapest listed endpoint took longer on that workload. Higher reasoning effort can make runs longer without improving the balance between mesh fit and overall structure. The bundled reconstruction examples use generated meshes and renders, so qualify the pipeline on your own scans before committing. Apache-2.0 covers the project and its included NVIDIA examples, not all externally retrieved materials; review their terms, security and suitability before production use.

### Hardware & Deployment Guide
The base setup targets macOS or Linux with Python 3.12, `uv`, and Node.js ^20.19 or >=22.12 with npm. Run `uv sync` and `uv run usdcraft setup` to install dependencies, fetch Playwright Chromium, build the viewer and create the data directories. The viewer defaults to `127.0.0.1:8770` and offers a read-only mode for review. Agent authoring runs either through a Codex account or an API-key workflow using `OPENAI_API_KEY`; a configurable model and base URL allow a compatible endpoint. Local tooling and cached playback should not be mistaken for offline generation through those hosted routes.

New PhysX tests require an NVIDIA GPU and a separate, roughly 30 GB environment with Isaac Sim 6.2.0 and Isaac Lab 44.0.1. Point `USDCRAFT_ENGINE_PYTHON` at its interpreter when it is installed outside the default location. No exact VRAM requirement is specified; measure it on representative assets and probes. The package manifest identifies v2.0.0, but no GitHub release is listed. The current branch adds flexible materials and action testing; v1 remains on a separate branch.
```

## Key Capabilities
```text
- Source artifact: Stores agent-authored SDK code as `model.py` alongside inputs and run history; exports can be rebuilt from source.
- Reconstruction evidence: Accepts a mesh and one photo, with optional axis and scale overrides or calibrated photo, mask and mesh-pose data.
- Model API: Defaults to OpenAI Responses; supports a configurable model and base URL, with `--api-style chat-completions` for alternate endpoints.
- Batch control: Runs one independent asset per CSV row, with configurable concurrency, `--validate-only` and per-row `--run-timeout`.
- Physics validation: Exercises rigid, articulated and flexible assets in PhysX and records rule failures, flags, JSON results and applicable videos.
- Review and training: Replays cached simulations without a GPU and exports end-effector poses, motions and rest poses for declared interactions.
```

## Quick Start / Clone
```bash
uv sync
uv run usdcraft setup
```
