diff --git a/ROADMAP.md b/ROADMAP.md index 6be828b..3561d79 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -92,6 +92,7 @@ This priority combines dead-code deletion and task decomposition because both ar | Action | Path | |---|---| +| ADD pip install | `render-worker/Dockerfile` — `usd-core>=24.11` (provides `pxr` module) ✅ decided | | CREATE | `render-worker/scripts/export_step_to_usd.py` — XCAF → USD, hierarchy + metadata + partKey | | ADD enum value | `backend/app/domains/media/models.py` — `usd_master` to `MediaAssetType` | | CREATE migration | `backend/alembic/versions/060_usd_master_asset_type.py` | diff --git a/docs/plans/0001-step-to-usd-implementation.md b/docs/plans/0001-step-to-usd-implementation.md index 8f82cd0..3747f35 100644 --- a/docs/plans/0001-step-to-usd-implementation.md +++ b/docs/plans/0001-step-to-usd-implementation.md @@ -9,7 +9,7 @@ ## Prerequisites - [ ] Priority 1 complete (step_tasks.py decomposed, blender_render.py decomposed) -- [ ] Decision: USD authoring library (see Open Questions below) +- [x] Decision: USD authoring library → **`usd-core` (pip)** — provides `pxr` module, no GPU tools needed, pip-installable in render-worker - [ ] Decision: seam/sharp payload encoding (primvars vs. JSON sidecar) --- @@ -18,6 +18,21 @@ **Goal:** Export a valid `usd_master` alongside the existing GLB pipeline without changing any browser behavior. +### Task 1.0 — Install `usd-core` in render-worker + +**File:** `render-worker/Dockerfile` + +```dockerfile +# OpenUSD Python bindings — provides pxr module for USD authoring +RUN pip3 install --no-cache-dir "usd-core>=24.11" +``` + +Add after the `gmsh` line. `usd-core` is the Pixar-maintained pip distribution of OpenUSD — no GPU, no USD imaging, just the core authoring/scene APIs (`pxr.Usd`, `pxr.UsdGeom`, `pxr.Sdf`, `pxr.Vt`). + +**Acceptance gate:** `docker compose exec render-worker python3 -c "from pxr import Usd; print(Usd.GetVersion())"` → `(24, 11, 0)` or later. + +--- + ### Task 1.1 — `export_step_to_usd.py` scaffolding **File:** `render-worker/scripts/export_step_to_usd.py` @@ -304,11 +319,10 @@ Clicking an unassigned part in the viewer auto-focuses it in the MaterialPanel. | # | Question | Options | Default recommendation | |---|---|---|---| -| 1 | USD authoring library | `pxr` (full OpenUSD, heavy) / `usda` text templating (no deps) / `usd-core` pip | Start with `pxr` — pip-installable, same OCC kernel available | +| 1 | USD authoring library | ~~`pxr` full / `usda` text / `usd-core` pip~~ | ✅ **`usd-core` pip** — `pip install usd-core` in render-worker Dockerfile | | 2 | Seam/sharp payload encoding | Custom primvars on mesh prim / separate JSON sidecar / GLB extras (current) | Index-space primvars — cleaner, survives transforms | | 3 | Preview GLB derivation | USD → GLB export pass / co-author from same tessellation pass | Co-author during migration (avoid round-trip loss) | | 4 | Single-file USD or override layers | Flat single file / canonical + overlay layers (flattened for delivery) | RFC recommends Option B (overlay layers, flatten for delivery) | -| 5 | `pxr` install in render-worker | Add to `render-worker/Dockerfile` / use system package | `pip install usd-core` — no NVIDIA/Pixar GPU tools needed | ---