Because your 3D models aren't going to lose weight on their own.
A high-performance optimisation service that takes your bloated, overweight 3D models and puts them through a rather aggressive diet programme. Supports a frankly unreasonable number of formats, fixes geometry that should never have existed in the first place, and compresses everything until it begs for mercy.
docker compose up -d
linux/amd64. The optional USDZ/FBX/DAE/KTX toolchain relies on amd64 binaries and wheels; Apple Silicon hosts run this image through Docker emulation.--build-arg INSTALL_CAD_SUPPORT=false to skip STEP/CAD packages, or tune --build-arg CAD_INSTALL_TIMEOUT_SECONDS=240 for slower networks.npm install
npm run dev
Local environment only supports GLB/GLTF/OBJ/STL. Everything else requires Docker and its menagerie of external tools. Sorry about that. Actually, no, we're not sorry.
| Format | Local | Docker | Conversion Tool |
|---|---|---|---|
| GLB / GLTF | ✅ | ✅ | gltf-transform |
| OBJ | ✅ | ✅ | obj2gltf |
| STL | ✅ | ✅ | Built-in parser |
| DAE | ❌ | ✅ | COLLADA2GLTF |
| FBX | ❌ | ✅ | FBX2glTF |
| USDZ | ❌ | ✅ | usd-core (Python) |
| STEP / STP | ❌ | ✅ | trimesh + cadquery |
| PRT (Creo) | ❌ | ✅ | trimesh + OCP |
| CATPart / CATProduct | ❌ | ✅ | trimesh + OCP |
| ASM (Creo Assembly) | ❌ | ✅ | trimesh + OCP |
curl -X POST http://localhost:3000/api/analyze -F "file=@model.glb"
Find out exactly how bad things are before we intervene.
curl -X POST http://localhost:3000/api/optimize \
-F "file=@model.glb" \
-F 'options={"clean":{"enabled":true},"draco":{"enabled":true,"compressionLevel":7}}'
curl -X POST http://localhost:3000/api/optimize \
-F "file=@model.glb" \
-F "preset=balanced"
Available presets: fast, balanced, maximum. Choose your fighter.
curl -X POST http://localhost:3000/api/optimize/stream \
-F "file=@model.glb" \
-F "preset=balanced"
Returns a Server-Sent Events stream. Each event is another step in your model's rehabilitation.
curl -O http://localhost:3000/api/download/{taskId}
curl http://localhost:3000/api/status/{taskId}
repair-input → clean → merge → simplify → quantize → draco → texture → repair-output
| Step | What It Does | Default |
|---|---|---|
| repair-input | Fixes NaN vertices, dodgy normals, mangled tangents | Always |
| clean | Removes unused nodes, materials, textures — the dead weight | Optional |
| merge | Combines meshes sharing materials. Efficiency through conformity | Optional |
| simplify | Mesh decimation. Fewer triangles, fewer problems | Optional |
| quantize | Vertex attribute quantisation. Close enough is good enough | Optional |
| draco | Draco geometry compression. The main event | Optional |
| texture | KTX2 texture compression (ETC1S/UASTC) | Optional |
| repair-output | Final validation and repair. Trust, but verify | Always |
| Preset | Philosophy | Steps |
|---|---|---|
fast |
Just the essentials | clean + draco (level 3) |
balanced |
The sensible middle ground | clean + merge + simplify (75%) + draco (level 7) + texture (ETC1S) |
maximum |
Scorched earth | clean + merge + simplify (50%) + draco (level 10) + texture (ETC1S) |
{
"clean": { "enabled": true },
"merge": { "enabled": true },
"simplify": { "enabled": true, "targetRatio": 0.5, "lockBorder": false },
"draco": { "enabled": true, "compressionLevel": 7 },
"texture": { "enabled": true, "mode": "ETC1S" }
}
Because someone has to be the responsible adult.
services/payment-servicesrc/
├── components/ # The organs
│ ├── optimization-pipeline.ts # Pipeline orchestration (SSE progress)
│ ├── geometry-fixer.ts # Geometry repair (input/output stages)
│ ├── format-converter.ts # Multi-format → GLB (12 formats)
│ ├── draco-singleton.ts # Draco codec singleton
│ ├── resource-cleaner.ts # Resource cleanup
│ ├── mesh-merger.ts # Mesh merging
│ ├── mesh-simplifier.ts # Mesh decimation
│ ├── vertex-quantizer.ts # Vertex quantisation
│ ├── draco-compressor.ts # Draco compression
│ └── texture-compressor.ts # Texture compression
├── routes/ # API routes
├── cloud/ # Object storage and queue provider contracts
├── jobs/ # Async job store, state machine, service
├── database/ # Shared MySQL/Postgres state stores and migrations
├── tasks/ # Extensible heavy task registry and model.optimize handler
├── worker/ # Docker worker runtime
├── billing/ # WeChat Native/mock billing contracts
├── callbacks/ # Customer callback signing/delivery helpers
├── middleware/ # Error handling, API Key auth
├── models/ # Data models
├── utils/ # File validation, storage, logging
└── config/ # Swagger config
public/ # Web UI
scripts/ # Python conversion scripts
tests/ # Unit tests (231 of them, we're thorough)
The async Tencent Cloud version is specified separately so the current local service can remain stable while the cloud runtime is built.
POST /api/v1/jobs, POST /api/v1/jobs/:jobId/complete-upload, GET /api/v1/jobs/:jobId, GET /api/v1/jobs/:jobId/result-urlnpm run worker or node dist/worker/run-worker.jsdocker compose -f docker-compose.cloud.yml up --buildSTATE_STORE_PROVIDER=mysql or STATE_STORE_PROVIDER=postgres with DATABASE_URL to make API, workers, orders and worker heartbeats use a shared database instead of local JSON files..env.cloud.examplenpm test
231 tests. All passing. We checked.
Apache License 2.0 — see LICENSE for details.
🤖 AI-Friendly Summary — One-stop 3D model compression and optimisation: 12 formats to GLB (including CAD formats PRT/CATIA/ASM), with geometry repair + Draco compression + texture compression + mesh decimation. Three presets, SSE real-time progress, REST API, Docker deployment, Swagger docs. Built for agent integration, because even robots deserve nice things.
$ claude mcp add 3D-Model-Optimizer \
-- python -m otcore.mcp_server <graph>