
bigchx/mcp_3d_relief
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
3d рельефные модели STL
Обзор
Этот проект предоставляет MCP-сервер, который преобразует 2D-изображения в 3D-модели рельефа в формате STL, подходящие для 3D-печати или рендеринга. - Преобразовать любое изображение в 3D-модель рельефа - Размеры модели управления (ширина, толщина) - Добавить опциональное основание к 3D-модели - Перевернуть глубину для различных эффектов рельефа - Быстрая обработка с немедленными ссылками на загрузку - image path: Local path or web URL to the input image file - model width: Width of the 3D model in mm (default: 50.0) - model thickness: Maximum thickness/height of the 3D model in mm (default: 5.0) - base thickness: Толщина основания в мм (по умолчанию: 2.0) - skip depth: Используется ли изображение напрямую или генерируется карта глубины (по умолчанию: истинно) - invert depth: Invert рельеф (яркие области становятся низкими вместо высоких) (по умолчанию: ложными) - Detail level: Контролирует разрешение обработанного изображения (по умолчанию: 1.0). На уровне Detail level = 1.0 изображение обрабатывается с разрешением 320px, создавая STL-файл, как правило, менее 100 МБ.
Обзор (машинный перевод)
中 • Введение в MCP • Вики
Этот проект предоставляет MCP-сервер, который преобразует 2D-изображения в 3D-модели рельефа в формате STL, подходящие для 3D-печати или рендеринга.
Особенности
Преобразуйте любое изображение в 3D-модель рельефа
- Размеры модели управления (ширина, толщина) Добавить опциональную базу в 3D-модель
- Перевернуть глубину для различных эффектов рельефа Быстрая обработка с немедленными ссылками на загрузку
##Установка
Предпосылки
Python 3.10+
- Ув.
Вариант 1: локальная установка
-
Клонировать хранилище:
-
Установить зависимости:
-
Проверить/проверить сервер:
Использование
Конфигурация JSON
Параметры инструментов MCP
- [[Т0]]: Локальный путь или веб-URL к файлу ввода изображения
- [[Т1]]: Ширина 3D-модели в мм (по умолчанию: 50.0)
- [[Т2]]: Максимальная толщина/высота 3D модели в мм (по умолчанию: 5.0)
- [[Т3]]: Толщина основания в мм (по умолчанию: 2.0)
- [[Т4]]: Использовать изображение напрямую или генерировать карту глубины (по умолчанию: истинно) [[Т5]]: Перевернуть рельеф (яркие области становятся низкими вместо высоких) (по умолчанию: ложные)
- [[Т6]]: Контролирует разрешение обработанного изображения (по умолчанию: 1.0). На уровне детализация = 1.
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
MCP STL 3D Relief Generator
This project provides a MCP server that converts 2D images into 3D relief models in STL format, suitable for 3D printing or rendering.
Features
- Convert any image to a 3D relief model
- Control model dimensions (width, thickness)
- Add optional base to the 3D model
- Invert depth for different relief effects
- Fast processing with immediate download links
Installation
Prerequisites
- Python 3.10+
- uv
Option 1: Local Installation
- Clone the repository:
git clone https://github.com/bigchx/mcp_3d_relief.git
cd mcp_3d_relief
- Install dependencies:
uv pip sync requirements.txt
- Run/Inspect the server:
mcp run server.py
mcp dev server.py
Usage
JSON Configuration
{
"mcpServers": {
"mcp_3d_relief": {
"command": "uv",
"args": ["--directory", "{fill_in_your_path_here}", "run", "server.py"]
}
}
}
MCP Tool Parameters
image_path: Local path or web URL to the input image filemodel_width: Width of the 3D model in mm (default: 50.0)model_thickness: Maximum thickness/height of the 3D model in mm (default: 5.0)base_thickness: Thickness of the base in mm (default: 2.0)skip_depth: Whether to use the image directly or generate a depth map (default: true)invert_depth: Invert the relief (bright areas become low instead of high) (default: false)detail_level: Controls the resolution of the processed image (default: 1.0). At detail_level = 1.0, the image is processed at 320px resolution, producing an STL file typically under 100MB. Higher values improve detail quality but significantly increase both processing time and STL file size. For example, doubling the detail_level can increase file size by 4x or more. Use with caution.
Response
The MCP Tool returns a JSON response with:
{
"status": "success",
"depth_map_path": "path/to/yourimage_depth_map.png",
"stl_path": "path/to/yourimage.stl"
}
Where LLMs can access the generated files from this MCP server, using the provided URLs.
Command Line
You can also use the script directly from the command line to generate a relief model from an image:
python3 relief.py path/to/your/image.jpg
External Depth Map Generation
For higher quality depth maps, you can use external depth map generation services like Depth-Anything-V2. This service can generate more accurate depth maps that you can then use with this project:
- Visit https://huggingface.co/spaces/depth-anything/Depth-Anything-V2
- Upload your image to generate a depth map
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →Конфигурация
{
"mcpServers": {
"mcp_3d_relief": {
"command": "uv",
"args": ["--directory", "{fill_in_your_path_here}", "run", "server.py"]
}
}
}