[Epic] ProArt 3D Art Studio — student asset pipeline (concept → model → texture → rig → animate → game-ready GLB) #346

Open
opened 2026-07-04 05:09:57 +00:00 by spikerj · 5 comments
Owner

Goal

Turn Eric Spiker's donated ProArt (art_pipe) routed-art pipeline into a student-facing 3D Art Studio on learn.spikersoft.com: a student types a prompt or uploads a drawing and walks their asset through the same stages a real game studio uses — concept art → 3D model → PBR textures → rig/bones → animation → game-ready GLB — then uses that asset in our game playgrounds. This ties together the platform's three pillars: learning, coding, and video games, and gives students a genuine 3D-art-pipeline mental model.

Current state (verified in code)

  • A single-stage vertical already exists end-to-end — this epic generalizes it, it does not start from zero: SpikerSoft.Api/Domain/ThreeDModel/ThreeDModelController.csSpikerSoft.Business/Domain/ThreeDModel/{Commands,Queries}SpikerSoft.Data/Mongos/ThreeDModel.cs (already has Status/CurrentStage/ProgressPercentage) → Python GPU worker SpikerSoft.EventHandlers.Trellis3D.Python → Angular libraries/features/trellis-3d-generator (three.js GLB viewer, SignalR Receive3DModelProgress).
  • ProArt decomposes cleanly. Stages are declared data, not code: art_pipe/src/artpipe/config.py::ASSET_TYPE_STAGES (concept / modeling / texturing / rigging / animation / export / enrichment). Every model backend runs as a subprocess worker (src/artpipe/worker.py: stdin JSON in → stdout NDJSON started|progress|result|error events) in its own per-model venv with a manifest (models/*/artpipe.json); results follow src/artpipe/result_contract.py. Model coverage: TRELLIS / Hunyuan3D-2 / SF3D / TripoSR (modeling), SDXL-Lightning / FLUX.schnell (concept), Hunyuan3DPaint / SD-Turbo (texturing), UniRig → RigNet → Mesh2Rig fallback chain (rigging, 56-bone canonical humanoid), MDM / HY-Motion (animation), headless Blender (export/enrichment).
  • What we replace: art_pipe's Flask + SQLite batch orchestrator (src/artpipe/batch/) — its job is done by our CQRS + RabbitMQ + Mongo orchestration. What we keep: the per-stage worker protocol, model manifests/venvs, and Blender headless tooling.
  • Platform primitives are ready: IRemoteCommand + RemoteDispatchBehavior (MediatR → RabbitMQ job dispatch), SpikerSoft.EventHandlers.GpuCoordinator VRAM lease broker (24 GB budget, single GPU host SERVER), GridFS blob services (IGridFsImageService pattern), SignalR hubs with Redis backplane, the lesson-video community-content moderation pipeline as template (#336–#339), infra GPU stack template (spikersoft-embeddings/docker-stack-gpu.yml), and the add-event-handler-worker scaffolding skill.

Constraints (drive the phase order)

  • One 24 GB CUDA card. TRELLIS and HY-Motion each want ~24 GB → stage jobs serialize behind GpuCoordinator VRAM leases; queue position must be visible to students, and model choice per stage is a cost decision (spike below).
  • art_pipe is CUDA-only today (its own TRELLIS backend is stubbed "until CUDA exts build"); Apple-Silicon dev path exists only via the separate trellis-mac port (spike below).
  • Students are minors. Text-to-image stages (concept, texture prompts) need prompt filtering + NSFW output checking, and anything shared beyond the owning student goes through staff moderation — safety is a phase, not a footnote.

Architecture (decomposition approach)

Command side: SubmitArtAssetCommand / RunStageCommand as IRemoteCommands → RabbitMQ (art.asset.lifecycle exchange, per-stage routing keys) → GPU worker leases VRAM → drives the art_pipe backend via its worker protocol → artifacts (GLB, textures, thumbnails, previews) into GridFS → publishes art.asset.stage.completed → next stage or SignalR notify. State: ArtAsset + per-stage workflow docs in Mongo (mirroring BlogMediaWorkflowState), read side via MediatR queries. Frontend: new libraries/features/art-studio lib copying the trellis-3d-generator structure.

Phases

Phase Scope
P1 Backend foundation — ArtAsset domain + stage workflow docs, CQRS slice, submit/list/get/cancel/restart-from-stage endpoints, GridFS artifact storage
P2 ProArt GPU worker — RabbitMQ stage consumer wrapping art_pipe's worker protocol, GpuCoordinator leases, infra GPU stack; modeling stage first (parity with today's TRELLIS flow)
P3 Concept + texturing stages — SDXL concept image (with safety checker), PBR texturing, stage chaining
P4 Rigging + animation stages — bone fallback chain, canonical humanoid schema, animation presets + MP4/GIF previews
P5 Frontend Art Studio — pipeline wizard UI, three.js viewer (model/skeleton/animation), SignalR progress + queue position, my-assets library, downloads
P6 Safety, quotas & fairness — prompt moderation, NSFW output gating, per-student GPU-minute quotas, queue fairness
P7 Class gallery + staff moderation + use-your-asset-in-games handoff, curriculum tie-in
Spike Model × VRAM fit matrix on the 24 GB host (which art_pipe backends we actually enable per stage; cold-start vs keep-warm)
Spike Apple Silicon dev path — can trellis-mac (MPS port) back the modeling stage for local dev?

Credit: ProArt is Eric Spiker's open-source routed art project, donated as the foundation of this feature.

Sub-issues are linked in a comment below as they are filed.

## Goal Turn Eric Spiker's donated **ProArt** (`art_pipe`) routed-art pipeline into a student-facing **3D Art Studio** on learn.spikersoft.com: a student types a prompt or uploads a drawing and walks their asset through the same stages a real game studio uses — **concept art → 3D model → PBR textures → rig/bones → animation → game-ready GLB** — then uses that asset in our game playgrounds. This ties together the platform's three pillars: learning, coding, and video games, and gives students a genuine 3D-art-pipeline mental model. ## Current state (verified in code) - **A single-stage vertical already exists end-to-end** — this epic generalizes it, it does not start from zero: `SpikerSoft.Api/Domain/ThreeDModel/ThreeDModelController.cs` → `SpikerSoft.Business/Domain/ThreeDModel/{Commands,Queries}` → `SpikerSoft.Data/Mongos/ThreeDModel.cs` (already has `Status`/`CurrentStage`/`ProgressPercentage`) → Python GPU worker `SpikerSoft.EventHandlers.Trellis3D.Python` → Angular `libraries/features/trellis-3d-generator` (three.js GLB viewer, SignalR `Receive3DModelProgress`). - **ProArt decomposes cleanly.** Stages are declared data, not code: `art_pipe/src/artpipe/config.py::ASSET_TYPE_STAGES` (concept / modeling / texturing / rigging / animation / export / enrichment). Every model backend runs as a subprocess worker (`src/artpipe/worker.py`: stdin JSON in → stdout NDJSON `started|progress|result|error` events) in its **own per-model venv** with a manifest (`models/*/artpipe.json`); results follow `src/artpipe/result_contract.py`. Model coverage: TRELLIS / Hunyuan3D-2 / SF3D / TripoSR (modeling), SDXL-Lightning / FLUX.schnell (concept), Hunyuan3DPaint / SD-Turbo (texturing), UniRig → RigNet → Mesh2Rig fallback chain (rigging, 56-bone canonical humanoid), MDM / HY-Motion (animation), headless Blender (export/enrichment). - **What we replace:** art_pipe's Flask + SQLite batch orchestrator (`src/artpipe/batch/`) — its job is done by our CQRS + RabbitMQ + Mongo orchestration. What we keep: the per-stage worker protocol, model manifests/venvs, and Blender headless tooling. - **Platform primitives are ready:** `IRemoteCommand` + `RemoteDispatchBehavior` (MediatR → RabbitMQ job dispatch), `SpikerSoft.EventHandlers.GpuCoordinator` VRAM lease broker (24 GB budget, single GPU host `SERVER`), GridFS blob services (`IGridFsImageService` pattern), SignalR hubs with Redis backplane, the lesson-video community-content moderation pipeline as template (#336–#339), infra GPU stack template (`spikersoft-embeddings/docker-stack-gpu.yml`), and the `add-event-handler-worker` scaffolding skill. ## Constraints (drive the phase order) - **One 24 GB CUDA card.** TRELLIS and HY-Motion each want ~24 GB → stage jobs serialize behind GpuCoordinator VRAM leases; queue position must be visible to students, and model choice per stage is a cost decision (spike below). - **art_pipe is CUDA-only today** (its own TRELLIS backend is stubbed "until CUDA exts build"); Apple-Silicon dev path exists only via the separate `trellis-mac` port (spike below). - **Students are minors.** Text-to-image stages (concept, texture prompts) need prompt filtering + NSFW output checking, and anything shared beyond the owning student goes through staff moderation — safety is a phase, not a footnote. ## Architecture (decomposition approach) Command side: `SubmitArtAssetCommand` / `RunStageCommand` as `IRemoteCommand`s → RabbitMQ (`art.asset.lifecycle` exchange, per-stage routing keys) → GPU worker leases VRAM → drives the art_pipe backend via its worker protocol → artifacts (GLB, textures, thumbnails, previews) into GridFS → publishes `art.asset.stage.completed` → next stage or SignalR notify. State: `ArtAsset` + per-stage workflow docs in Mongo (mirroring `BlogMediaWorkflowState`), read side via MediatR queries. Frontend: new `libraries/features/art-studio` lib copying the `trellis-3d-generator` structure. ## Phases | Phase | Scope | |---|---| | P1 | Backend foundation — `ArtAsset` domain + stage workflow docs, CQRS slice, submit/list/get/cancel/restart-from-stage endpoints, GridFS artifact storage | | P2 | ProArt GPU worker — RabbitMQ stage consumer wrapping art_pipe's worker protocol, GpuCoordinator leases, infra GPU stack; modeling stage first (parity with today's TRELLIS flow) | | P3 | Concept + texturing stages — SDXL concept image (with safety checker), PBR texturing, stage chaining | | P4 | Rigging + animation stages — bone fallback chain, canonical humanoid schema, animation presets + MP4/GIF previews | | P5 | Frontend Art Studio — pipeline wizard UI, three.js viewer (model/skeleton/animation), SignalR progress + queue position, my-assets library, downloads | | P6 | Safety, quotas & fairness — prompt moderation, NSFW output gating, per-student GPU-minute quotas, queue fairness | | P7 | Class gallery + staff moderation + use-your-asset-in-games handoff, curriculum tie-in | | Spike | Model × VRAM fit matrix on the 24 GB host (which art_pipe backends we actually enable per stage; cold-start vs keep-warm) | | Spike | Apple Silicon dev path — can `trellis-mac` (MPS port) back the modeling stage for local dev? | Credit: ProArt is Eric Spiker's open-source routed art project, donated as the foundation of this feature. Sub-issues are linked in a comment below as they are filed.
spikerj added the enhancement label 2026-07-04 05:09:57 +00:00
Author
Owner

Sub-issues filed:

  • #347 — P1 Backend foundation (ArtAsset domain, stage workflow docs, CQRS slice + endpoints)
  • #348 — P2 ProArt GPU worker (RabbitMQ stage consumer, GpuCoordinator leases, modeling stage first)
  • #349 — P3 Concept + texturing stages (SDXL + safety checker, PBR texturing, stage chaining)
  • #350 — P4 Rigging + animation stages (bone fallback chain, presets + previews)
  • #351 — P5 Frontend Art Studio (wizard, three.js viewer, SignalR progress, my-assets)
  • #352 — P6 Safety, quotas & fairness ← gate for opening to all students
  • #353 — P7 Gallery + moderation + games handoff + curriculum tie-in
  • #354 — Spike: model × VRAM fit matrix (run before/with P2)
  • #355 — Spike: Apple Silicon dev path via trellis-mac

Suggested order: #354 spike → #347#348 → #349/#350 (backend) with #351 in parallel off P1 contracts → #352#353. #355 anytime.

Sub-issues filed: - #347 — P1 Backend foundation (ArtAsset domain, stage workflow docs, CQRS slice + endpoints) - #348 — P2 ProArt GPU worker (RabbitMQ stage consumer, GpuCoordinator leases, modeling stage first) - #349 — P3 Concept + texturing stages (SDXL + safety checker, PBR texturing, stage chaining) - #350 — P4 Rigging + animation stages (bone fallback chain, presets + previews) - #351 — P5 Frontend Art Studio (wizard, three.js viewer, SignalR progress, my-assets) - #352 — P6 Safety, quotas & fairness ← **gate for opening to all students** - #353 — P7 Gallery + moderation + games handoff + curriculum tie-in - #354 — Spike: model × VRAM fit matrix (run before/with P2) - #355 — Spike: Apple Silicon dev path via trellis-mac Suggested order: #354 spike → #347 → #348 → #349/#350 (backend) with #351 in parallel off P1 contracts → #352 → #353. #355 anytime.
Author
Owner

Mac workstream added (2026-07-04): target is the entire stack — infra, backend, GPU pipeline, Angular — on one MacBook (M5 Pro Max, 128 GB unified memory). The MPS portability audit (#355 comment) showed this is realistic: platform services already run on Apple Silicon via docker-compose.mac.yml, .NET 10/Angular are arm64-native, and enough model backends are portable for a full Tier-A pipeline. 128 GB unified memory removes the 24 GB VRAM ceiling that constrains SERVER — the flagship models that queue behind GpuCoordinator leases there fit comfortably on the Mac.

Phase Scope Issue
M1 Device abstraction (cuda/mps/cpu) in art_pipe core — upstream PR to ProArt #356
M2 Mac-native pipeline profile — full Tier-A chain on MPS, benchmarked on the M5 #357
M3 Metal extension reuse — TRELLIS via trellis-mac, then InstantMesh / Hunyuan paint / UniRig via mtldiffrast/mtlgemm #358
M4 Entire stack on the MacBook — native ArtPipeProcessor (no GPU in Docker on macOS), one-command bring-up, dev-mode GpuCoordinator #359

Strategic upside beyond dev velocity: M4 doubles as the school-demo rig (whole platform + 3D generation on one laptop, no NVIDIA server), and M1/M3 are upstream contributions back to Eric's ProArt.

Ordering vs the P-phases: M1 can start immediately (pure art_pipe work, independent of #347/#348); M2/M3 feed the model choices in #354; M4 needs the worker skeleton from #348.

**Mac workstream added** (2026-07-04): target is the entire stack — infra, backend, GPU pipeline, Angular — on one MacBook (M5 Pro Max, 128 GB unified memory). The MPS portability audit (#355 comment) showed this is realistic: platform services already run on Apple Silicon via `docker-compose.mac.yml`, .NET 10/Angular are arm64-native, and enough model backends are portable for a full Tier-A pipeline. 128 GB unified memory removes the 24 GB VRAM ceiling that constrains SERVER — the flagship models that queue behind GpuCoordinator leases there fit comfortably on the Mac. | Phase | Scope | Issue | |---|---|---| | M1 | Device abstraction (cuda/mps/cpu) in art_pipe core — upstream PR to ProArt | #356 | | M2 | Mac-native pipeline profile — full Tier-A chain on MPS, benchmarked on the M5 | #357 | | M3 | Metal extension reuse — TRELLIS via trellis-mac, then InstantMesh / Hunyuan paint / UniRig via mtldiffrast/mtlgemm | #358 | | M4 | Entire stack on the MacBook — native ArtPipeProcessor (no GPU in Docker on macOS), one-command bring-up, dev-mode GpuCoordinator | #359 | Strategic upside beyond dev velocity: M4 doubles as the school-demo rig (whole platform + 3D generation on one laptop, no NVIDIA server), and M1/M3 are upstream contributions back to Eric's ProArt. Ordering vs the P-phases: M1 can start immediately (pure art_pipe work, independent of #347/#348); M2/M3 feed the model choices in #354; M4 needs the worker skeleton from #348.
Author
Owner

Deployment topology decision (Joey, 2026-07-04): Mac is the development path only; production deploys to NVIDIA CUDA hardware.

  • Dev (Mac, M5 Pro Max): everything native/non-container for the GPU path — ArtPipeProcessor as a host process on MPS (#359), platform services via docker-compose.mac.yml. No Mac deployment target.
  • Prod (CUDA Swarm): the pipeline ships as additional GPU-passthrough microservices in spikersoft-infrastructure, each an independent Swarm service with its own docker-stack-gpu.yml (nvidia device reservation, GpuCoordinator VRAM leases), communicating with the .NET API side exclusively over RabbitMQ (art.asset.lifecycle exchange) — same contract the API publishes via RemoteDispatchBehavior. No HTTP coupling between API and GPU services.
  • One codebase, N deployments: a single SpikerSoft.EventHandlers.ArtPipeProcessor project/image whose consumed stage-queue set is config (ArtPipe:Stages). Prod runs it as multiple services (e.g. artpipe-modeling, artpipe-imaging for concept+texture, artpipe-rigging for rig+animate+export) so stages scale/restart/place independently; the Mac dev process runs the same binary consuming all stages. Details on #348.

This keeps the P-phase tickets intact — #348 builds the worker + first (modeling) swarm service; #349/#350 each add their stage services' stack files to spikersoft-infrastructure as they land.

**Deployment topology decision** (Joey, 2026-07-04): Mac is the *development* path only; production deploys to NVIDIA CUDA hardware. - **Dev (Mac, M5 Pro Max):** everything native/non-container for the GPU path — `ArtPipeProcessor` as a host process on MPS (#359), platform services via `docker-compose.mac.yml`. No Mac deployment target. - **Prod (CUDA Swarm):** the pipeline ships as **additional GPU-passthrough microservices in `spikersoft-infrastructure`**, each an independent Swarm service with its own `docker-stack-gpu.yml` (nvidia device reservation, GpuCoordinator VRAM leases), communicating with the .NET API side **exclusively over RabbitMQ** (`art.asset.lifecycle` exchange) — same contract the API publishes via `RemoteDispatchBehavior`. No HTTP coupling between API and GPU services. - **One codebase, N deployments:** a single `SpikerSoft.EventHandlers.ArtPipeProcessor` project/image whose consumed stage-queue set is config (`ArtPipe:Stages`). Prod runs it as multiple services (e.g. `artpipe-modeling`, `artpipe-imaging` for concept+texture, `artpipe-rigging` for rig+animate+export) so stages scale/restart/place independently; the Mac dev process runs the same binary consuming all stages. Details on #348. This keeps the P-phase tickets intact — #348 builds the worker + first (modeling) swarm service; #349/#350 each add their stage services' stack files to spikersoft-infrastructure as they land.
Author
Owner

Status: DEMO-READY (2026-07-05). All seven P-phases closed against merged PRs. The full student loop is in master and runs end-to-end on the M5 via scripts/mac-dev-up.sh + mac-dev-smoke.sh (prompt → 7 stages → game-ready GLB in 45–72 s; safety gate, quotas, moderation, gallery, and the hex-tower-defence "use your asset" integration all live).

What the remaining open tickets represent (none block the demo):

  • Prod-hardware evidence: #348 acceptance run + #354 matrix — need the art_pipe checkout/venvs on SERVER (~half a day, ops only).
  • Decisions: #356/#357 close on the art_pipe push-destination call (11 verified commits waiting); #358 has the RMBG-2.0 licensing call + the deliberately deferred port half.
  • Scoped remainder: #359 — Keycloak-local + browser-in-the-loop validation (~1 h).
  • Growth: #365 curriculum content; #367 elastic GPU capacity (U1 in PR now).

Closed today against merged work: #347, #349–#353, #355, #360–#364, #366.

**Status: DEMO-READY (2026-07-05).** All seven P-phases closed against merged PRs. The full student loop is in `master` and runs end-to-end on the M5 via `scripts/mac-dev-up.sh` + `mac-dev-smoke.sh` (prompt → 7 stages → game-ready GLB in 45–72 s; safety gate, quotas, moderation, gallery, and the hex-tower-defence "use your asset" integration all live). What the remaining open tickets represent (none block the demo): - **Prod-hardware evidence:** #348 acceptance run + #354 matrix — need the art_pipe checkout/venvs on SERVER (~half a day, ops only). - **Decisions:** #356/#357 close on the art_pipe push-destination call (11 verified commits waiting); #358 has the RMBG-2.0 licensing call + the deliberately deferred port half. - **Scoped remainder:** #359 — Keycloak-local + browser-in-the-loop validation (~1 h). - **Growth:** #365 curriculum content; #367 elastic GPU capacity (U1 in PR now). Closed today against merged work: #347, #349–#353, #355, #360–#364, #366.
Author
Owner

Status update (end of 2026-07-05 session): code-complete across the board. Since the last status: browser click-through validated (51.7 s, live SignalR — #359), viewer render + nav bugs found and fixed (#370), legacy-doc 500 fixed with a model guard (#369), ProArt mirrored as spikersoft-artpipe and the whole Mac workstream merged (#356/#357 closed), TrellisMac cleared for student use on non-profit licensing grounds (#358), elastic GPU capacity U1 merged (#367), and the model-resident architecture (#368) built through R4: persistent --serve workers (SDXL 4.2 s warm, safety 20 ms), resident leases, per-model queues, per-model swarm stacks, soak-backed recycle policy.

Nothing further is buildable from the laptop. Remaining, by owner:

  • SERVER (~half a day, ops): art_pipe checkout + venv bootstrap → deploy artpipe-modeling (+ optionally the four model stacks) → #348 acceptance smoke → #354 matrix → #368 cutover.
  • Content: #365 curriculum lesson.
  • Deliberate deferrals: #358 port half; #367 U2–U5.

Demo-day runbook: spikersoft-backend/docs/mac-local-stack.md §6 (fresh login, never hard-refresh — #345).

**Status update (end of 2026-07-05 session): code-complete across the board.** Since the last status: browser click-through validated (51.7 s, live SignalR — #359), viewer render + nav bugs found and fixed (#370), legacy-doc 500 fixed with a model guard (#369), ProArt mirrored as `spikersoft-artpipe` and the whole Mac workstream merged (#356/#357 closed), TrellisMac cleared for student use on non-profit licensing grounds (#358), elastic GPU capacity U1 merged (#367), and the model-resident architecture (#368) built through R4: persistent `--serve` workers (SDXL 4.2 s warm, safety 20 ms), resident leases, per-model queues, per-model swarm stacks, soak-backed recycle policy. **Nothing further is buildable from the laptop.** Remaining, by owner: - **SERVER (~half a day, ops):** art_pipe checkout + venv bootstrap → deploy artpipe-modeling (+ optionally the four model stacks) → #348 acceptance smoke → #354 matrix → #368 cutover. - **Content:** #365 curriculum lesson. - **Deliberate deferrals:** #358 port half; #367 U2–U5. Demo-day runbook: `spikersoft-backend/docs/mac-local-stack.md` §6 (fresh login, never hard-refresh — #345).
Sign in to join this conversation.