A macOS app that converts a single image into a rigged 3D model (GLB) using a local pipeline with TRELLIS.2, mesh simplification, UV baking, hole filling, texture projection, and auto-rigging.

Stars

157

7-day growth

No data

Forks

12

Open issues

0

License

MIT

Last updated

2026-07-26

Why it is worth attention

It provides a complete end-to-end local pipeline from image to rigged 3D asset on Apple Silicon, with detailed analysis and tuning of texture quality, mesh repair, and auto-rigging heuristics.

Who it is for

  • 3D artists and game developers working on macOS
  • Machine learning practitioners exploring image-to-3D on Apple hardware
  • Indie developers needing quick 3D prototypes from images
  • Researchers evaluating end-to-end 3D generation pipelines

Use cases

  • Quickly generating textured 3D models from reference images for game assets
  • Creating rigged characters for animation previews without cloud dependencies
  • Testing and comparing mesh simplification and texture baking parameters
  • Offline rendering of turntable animations for portfolio or documentation

Strengths

  • Fully local pipeline runs on Apple Silicon with up to 14-minute generation times for high quality
  • Modular stage architecture makes it easy to add new steps like LOD generation or format conversion
  • Extensive texture quality analysis (gamma, alpha, texel density) and user-controllable settings
  • Auto-rigging with fallback strategies works on non-watertight meshes, outputting GLB with skeletal animation

Considerations

  • Requires Apple Silicon (M1+) with at least 24GB unified memory and macOS 12+; no GPU support on other platforms
  • Generation results vary significantly with seed; multiple runs may be needed for desirable textures
  • Known issues: GPU watchdog on long Metal kernels, single-view projection can cause texture misalignment, and mesh cracks remain at ~4%

README quick start

Image to 3D

1枚の画像から 3Dモデル (GLB) をローカル生成し、ブラウザで確認するアプリ。 生成エンジンは TRELLIS.2 (Microsoft) の Apple Silicon / MPS ポートを使う。

形状生成のあとに ポリゴン削減 → UV再展開 → メッシュ修復 → 入力画像の投影 → オートリグ をつなげられるステージ式パイプラインになっていて、リグ付き GLB (スキン + アニメーション) まで一気に出力できる。

画像 ─> 前処理 ─> 3D生成 ─> ポリゴン削減 ─> UV展開/リベイク ─> メッシュ修復 ─> 投影 ─> オートリグ ─> GLB
          (TRELLIS.2/MPS) (fast-simplification) (xatlas)      (numpy)              (Blender headless)

必要なもの

ハードApple Silicon (M1以降)、unified memory 24GB以上
OSmacOS 12以降 (Metal 拡張を使う場合は 26以降)
Python3.11以上 (uv があると楽)
Node.js20以上
Blender5.x (オートリグに使用。無くても生成はできる)
ディスク約20GB (依存1GB + モデル重み約15GB)

セットアップ

1. アプリ本体

make setup

uv.venv を作り、バックエンドの依存とフロントエンドの npm パッケージを入れる。

2. TRELLIS.2 (生成エンジン)

TRELLIS.2 は torch + Metal 拡張 + Python 3.11 という重い専用環境を要求するので、 アプリ本体とは別の venv に隔離して入れる。

先に Metal Toolchain を入れておくと生成が大幅に速くなる (数GBのダウンロード):

xcodebuild -downloadComponent MetalToolchain

続いて:

make setup-trellis

最後に Hugging Face の認証を通す。TRELLIS.2 本体 (MIT) は自由に落とせるが、 内部で使う特徴抽出器と背景除去モデルがゲート付きのため必要:

vendor/trellis-mac/.venv/bin/hf auth login

その上で以下のアクセス申請をする (通常は即時承認):

認証を通してから make setup-trellis をもう一度流すと、最後の工程で重み (合計約15GB) を取得する。中断しても再実行で再開する。SKIP_WEIGHTS=1 を 付ければ飛ばせるが、その場合は初回生成時にまとめて落ちてくる。

セットアップ状況の確認:

PYTHONPATH=backend .venv/bin/python -m app.engines.trellis

未充足の前提条件は起動後の画面左上「セットアップ」パネルにも出る。

3. 起動

make serve

を開く。フロントを触りながら開発する場合は make dev (Vite が :5173 で立ち、/api を :8100 にプロキシする)。

使い方

  1. 左パネルに画像をドラッグ&ドロップする (リポジトリ直下の images/samples/ は初回起動時に自動で取り込まれる)
  2. サムネイルを選ぶ
  3. 生成プリセットを押す
プリセット内容
形状のみ生成テクスチャベイクを省略。形の確認用
テクスチャ付き生成 (標準)PBRテクスチャをベイク。生成の標準
最高品質 (低速)カスケード(1024) + 25ステップ + 入力画像の投影。細部が必要なとき。約14分
高ポリゴン (最大)面数48万 + 4096テクスチャ。ディテールは +5% 程度、51MB
ゲーム向け最適化+ ポリゴン削減 (既定2万面) + UV再展開・リベイク
リグ付き生成+ ヒューマノイド骨格の自動生成とスキニング

メッシュ修復 (repair_mesh) は全プリセットで既定オン。入力画像の投影 (project_texture) は 最高品質 のみ既定オンで、他は詳細設定から有効にできる。

所要時間はプリセットごとに実測平均を記録して表示する (未計測のうちは「未計測」と出る。 推測値は表示しない)。

「詳細設定」でシード、解像度 (512/1024/1024_cascade/1536_cascade)、目標面数、 テクスチャ解像度などを個別に上書きできる。エンジンに mock を選ぶと、 TRELLIS.2 を使わずシルエット押し出しのダミーメッシュで パイプラインとビューワの挙動を確認できる。

サーバを立てずに CLI から回すこともできる:

.venv/bin/python scripts/run_pipeline.py images/usa.png --pr

Related repositories

Similar projects matched by category, topics, and programming language.

xai-org
Featured
xai-org GitHub avatar

grok-build

Grok Build is SpaceXAI's terminal-based AI coding agent that runs as a full-screen TUI, understands codebases, edits files, executes commands, searches the web, and manages tasks interactively or headlessly.

AI & Machine LearningAI Agents
20,399
mereyabdenbekuly-ctrl
Featured
mereyabdenbekuly-ctrl GitHub avatar

clodex-ide

Clodex is an open-source, local-first agentic IDE that combines persistent AI tasks, code, terminal, browser, Git, models, memory, and governed execution in one Electron workspace, currently in technical preview.

AI & Machine LearningAI Agents
833
jamesob
Featured
jamesob GitHub avatar

local-llm

A comprehensive guide for building and configuring a high-end local machine to run state-of-the-art LLMs, with detailed hardware choices, BIOS tuning, and Docker-based model serving.

AI & Machine LearningLarge Language Models
1,520