BM

bigchx/mcp_3d_relief

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

24 stars 6 forks 品質 54 トレンド 10MIT

3DリリーフSTLモデルへのイメージ

概要

このプロジェクトでは、2D画像をSTL形式で3Dリリーフモデルに変換し、3Dプリンティングやレンダリングに適したMCPサーバーを提供します。 - 3Dリリーフモデルに任意のイメージを変換 - 制御モデル寸法(幅、厚さ) - 3Dモデルにオプションベースを追加 - 異なるリリーフ効果の深さを反転 - すぐにダウンロードリンクで高速処理 - image path: 入力イメージファイルへのローカルパスまたはWeb URL - model width: mm の 3D モデルの幅 (デフォルト: 50.0) - model thickness: mm の 3D モデルの最大厚さ/高さ (デフォルト: 5.0) - base thickness: mm のベースの厚さ (デフォルト: 2.0) - skip : イメージを直接使用するか、深さのマップを生成するかどうか (デフォルト: true) - invert depth: 緩和を反転 (右領域は高ではなく低くなります) (デフォルト: false) - Details level: 処理されたイメージの解像度を制御 (デフォルト: 1.0)。 Details level = 1.0 では、画像は 320px の解像度で処理され、通常 100MB 未満の STL ファイルが生成されます.

概要(AI 翻訳)

スタッフ ・ MCPの紹介 ・ メニュー

このプロジェクトでは、2D画像をSTL形式で3Dリリーフモデルに変換し、3Dプリンティングやレンダリングに適したMCPサーバーを提供します。

##特徴

  • 任意の画像を3Dリリーフモデルに変換する
  • 制御モデル次元(幅、厚さ)
  • 3Dモデルにオプションベースを追加
  • 異なる救済効果のための深さを反転
  • すぐにダウンロードリンクで迅速な処理

インストール

前提条件

  • Python 3.10 +
  • 紫外線

##Option 1: ローカルインストール

  1. リポジトリのクローン化:

  2. 依存関係を取付けて下さい:

3.サーバーの実行/点検:

使用法

##JSON の設定

MCP ツール パラメータ

  • [image_path]: ローカルパスまたはWeb URLを入力イメージファイルへ
  • [model_width]: mm の 3D モデルの幅 (デフォルト: 50.0)
  • [model_thickness: mm の 3D モデルの最大厚さ/高さ (デフォルト: 5.0)
  • [base_thickness]: mm のベースの厚さ (デフォルト: 2.0)
  • [invert_depth:救済を反転(右領域は、高の代わりに低くなります)(デフォルト:false)
  • [detail_level: 処理された画像の解像度(デフォルト:1.0)を制御します。 詳細 レベル = 1.

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

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

  1. Clone the repository:
git clone https://github.com/bigchx/mcp_3d_relief.git
cd mcp_3d_relief
  1. Install dependencies:
uv pip sync requirements.txt
  1. 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 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: 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:

  1. Visit https://huggingface.co/spaces/depth-anything/Depth-Anything-V2
  2. Upload your image to generate a depth map
GitHub で README 全文を見る

インストール

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"] } } }