AI-powered interactive 3D model generation, inspection, and presentation studio.
AI-powered interactive 3D model generation, inspection, and presentation studio.
AI-powered interactive 3D model generation, inspection, and presentation studio.
3D Model Studio is a React + Three.js prototype for turning uploaded reference images or GLB files into a polished interactive 3D workspace. It supports live WebGL orbit controls, a left model library / center stage / right tools workbench, screenshots, GLB export, collapsed upload history, demo presentation mode, a generation queue, and optional image-to-3D providers for generating real 3D models from uploaded reference images.
Open the demo video: Demo MP4
.env.local; it is never exposed to the frontend bundle.npm install
npm run dev
Open the Vite URL shown in the terminal.
The default screen is intentionally quiet:
Model Library rail.Saved Assets until expanded.Asset Source rail to choose the generation provider or import a local .glb / .gltf.Generation Queue panel.Info or Inspect only when you need the part detail drawer.Library for the full asset catalog with previews, provider state, task ids, GLB URL copy, provider comparison, and deletion.Demo in the top navigation to enter a clean presentation mode for screenshots and recordings.Useful validation commands:
npm run lint
npm run build
npm run test
npm run test:visual
npm run test:visual runs Playwright layout and screenshot regression checks for the workbench, the Model Library drawer, and Demo Mode. Use npm run test:visual:update only when an intentional UI change needs new screenshot baselines.
To enable image-to-3D generation, create .env.local:
cp .env.example .env.local
Then set:
TRIPO_API_KEY=your_tripo_key
FAL_API_KEY=your_fal_key
RODIN_API_KEY=your_rodin_api_key
OPENAI_API_KEY=your_openai_key
API_HOST=127.0.0.1
OPENAI_API_KEY enables optional image understanding through /api/3d/analyze. When configured, uploads are classified by vision into asset type, material focus, inspection notes, scene profile, tags, and a better image-to-3D prompt. Without it, the app keeps using local filename/metadata heuristics.
For Hunyuan3D local backup mode, start your local Hunyuan3D API server and set:
HUNYUAN_API_BASE=http://127.0.0.1:8081
HUNYUAN_CREATE_PATH=/send
HUNYUAN_STATUS_PATH=/status
The 3D generation backend supports these provider paths:
Hyper3D Hyper3D Rodin cloud generation only (default)
Tripo Tripo cloud generation only
Fal Fal.ai queue generation; model is selected in Settings
Auto Hyper3D first, then Tripo, Fal, Hunyuan, and JS Depth backup
Hunyuan Local Hunyuan3D generation only
The upload panel exposes the full generation mode choice before picking a file:
Hyper3D Hyper3D Rodin GLB generation
Tripo Tripo cloud GLB generation
Fal Fal.ai queue GLB generation
Hunyuan Local Hunyuan3D GLB generation
JS Depth Browser-side image relief with layered PNG fallback
Auto Hyper3D, Tripo, Fal, Hunyuan, then JS Depth fallback
Local GLB Import an existing .glb or self-contained .gltf
Tripo uploads use the current STS object-storage flow (/upload/sts/token) before creating an image_to_model task.
Fal uploads use the official @fal-ai/client storage and queue APIs. Supported Fal models are Hunyuan3D v2, TRELLIS, TripoSR, Tripo3D v2.5, and Hyper3D Rodin. Pick the active Fal model in Settings.
Rodin uploads use Hyper3D's multipart /rodin task API, then poll /status and cache the GLB returned by /download.
Generated GLBs are cached by the Node backend under .generated-models/, so later views use the local copy instead of temporary provider URLs.
The frontend model library is saved in IndexedDB, so successful generated/imported model records survive page refreshes.
You can also import a local .glb or self-contained .gltf from the New Upload button. Imported models become custom workspace models and are served from the same local cache.
Expected Hunyuan3D local API shape:
POST /send
GET /status/:uid
The status response can return either a remote model URL or a base64 GLB field such as model_base64 / glb_base64. Base64 GLBs are cached under .generated-models/ and served by the Node backend.
Start the backend:
npm run dev:api
Then start the frontend:
npm run dev
The frontend talks to the local Node backend at http://127.0.0.1:8787 by default.
The repository includes cached generated GLB files under:
public/generated-models/
These make the demo usable without spending API credits on every run.
The Library panel includes remote Khronos glTF Sample Models as auxiliary references for material and loader checks:
These are loaded from the archived Khronos sample repository and are not bundled into this repo.
Do not put real API keys in frontend code. Keep secrets in .env.local, which is ignored by git.
MIT
No open issues yet, or sync has not completed.