|
|
--- |
|
|
title: SAM3D |
|
|
emoji: π» |
|
|
colorFrom: pink |
|
|
colorTo: blue |
|
|
sdk: gradio |
|
|
sdk_version: 6.0.1 |
|
|
app_file: app.py |
|
|
pinned: false |
|
|
license: mit |
|
|
short_description: Creating and editing 3d models using text prompts |
|
|
tags: |
|
|
- text-to-3d |
|
|
- mcp |
|
|
- gemini |
|
|
- sam-3d |
|
|
- building-mcp-track-multimodal |
|
|
--- |
|
|
|
|
|
# π¨ Text to 3D β MCP Server |
|
|
|
|
|
Generate and edit 3D models from text prompts using **Gemini** + **Meta SAM-3D**. |
|
|
|
|
|
π¬ **Demo:** [[YouTube Link](https://drive.google.com/file/d/1tghBt4iaNEMtUT9Er0UdkfQrsy-3FxD0/view?usp=sharing)] |
|
|
π± **Post:** [[X/LinkedIn Link](https://www.linkedin.com/feed/update/urn:li:activity:7401045673531420672/)] |
|
|
|
|
|
## π‘ Use Cases |
|
|
|
|
|
This tool enables rapid 3D asset creation through natural language: |
|
|
- **Game Developers** β Quickly prototype 3D assets by describing them ("a medieval sword", "a sci-fi helmet") |
|
|
- **Designers & Artists** β Generate concept models and iterate with text edits ("make it larger", "change color to gold") |
|
|
- **E-commerce** β Create product mockups from descriptions for visualization |
|
|
- **Education** β Generate 3D models for teaching (anatomy, architecture, objects) |
|
|
- **AI Agents** β Claude/Cursor can autonomously create 3D assets as part of larger workflows via MCP |
|
|
|
|
|
## π Future Scope |
|
|
|
|
|
- Multi-object scene generation |
|
|
- Style transfer for 3D models |
|
|
- Animation support |
|
|
- Direct 3D file editing without regeneration |
|
|
- Integration with game engines (Unity/Unreal) |
|
|
|
|
|
## ποΈ Architecture |
|
|
|
|
|
``` |
|
|
βββββββββββββββββββ MCP Protocol βββββββββββββββββββββββ |
|
|
β Claude Desktop β ββββββββββββββββββββββΊ β Gradio MCP Server β |
|
|
β Cursor / Cline β β (HF Space) β |
|
|
βββββββββββββββββββ ββββββββββββ¬βββββββββββ |
|
|
β |
|
|
βββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββ |
|
|
βΌ βΌ βΌ |
|
|
βββββββββββββββ βββββββββββββββ βββββββββββββββ |
|
|
β Gemini β β Gemini β β SAM-3D β |
|
|
β Generate ββββββββββββββββ Edit ββββββββββββββββ (Modal) β |
|
|
β Image β β / Remove β β 3D Recon β |
|
|
βββββββββββββββ βββββββββββββββ βββββββββββββββ |
|
|
``` |
|
|
|
|
|
**Flow:** `Text β Image β Remove BG β Grayscale Mask β SAM-3D β 3D Model (GLB/PLY)` |
|
|
|
|
|
## π MCP Tools |
|
|
|
|
|
| Tool | Description | |
|
|
|------|-------------| |
|
|
| `generate_3d` | Text prompt β 3D model | |
|
|
| `edit_3d` | Edit existing model with text | |
|
|
|
|
|
### Connect from Claude Desktop |
|
|
|
|
|
```json |
|
|
{ |
|
|
"mcpServers": { |
|
|
"text-to-3d": { |
|
|
"command": "npx", |
|
|
"args": ["mcp-remote", "https://MCP-1st-Birthday-text-to-3d-SAM3D.hf.space/gradio_api/mcp/sse"] |
|
|
} |
|
|
} |
|
|
} |
|
|
``` |
|
|
|
|
|
## π οΈ Tech Stack |
|
|
|
|
|
| Component | Purpose | |
|
|
|-----------|---------| |
|
|
| Gemini 2.5 Flash | Image generation | |
|
|
| Gemini 3 Pro | Background removal & editing | |
|
|
| SAM-3D (Meta) | 3D reconstruction | |
|
|
| Modal | Serverless GPU | |
|
|
| Gradio | UI + MCP server | |
|
|
|
|
|
## π¦ Outputs |
|
|
|
|
|
- **GLB** β 3D mesh |
|
|
- **PLY** β Gaussian splat |
|
|
|
|
|
--- |
|
|
|
|
|
**Built for [MCP 1st Birthday Hackathon](https://huggingface.co/MCP-1st-Birthday)** π |