💬

Blender MCP + Hunyuan3D Setup Guide | Generate AI Game Characters with Local LLM

Published by KGP Talkie on

Repo: https://github.com/ahujasid/blender-mcp


Part 1 — Blender MCP (Windows)

1. Install Blender Addon

Download addon.py from the repo and install in Blender:

Edit → Preferences → Add-ons → Install → select addon.py

In the 3D Viewport press NBlenderMCP tab → Start MCP Server (port 9876)

2. Create Python 3.12 Conda Env

The default uvx blender-mcp fails on Python 3.14 due to a pyiceberg build issue. Use a dedicated Python 3.12 env:

conda create -n py312 python=3.12 -y
conda activate py312
pip install uv

3. Claude Desktop Config

%APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "blender": {
      "command": "C:\\Users\\laxmi\\anaconda3\\envs\\py312\\Scripts\\uvx.exe",
      "args": [
        "--python",
        "C:\\Users\\laxmi\\anaconda3\\envs\\py312\\python.exe",
        "blender-mcp"
      ]
    }
  }
}

4. Startup Order

1. Open Blender → Start MCP Server
2. Start Claude Desktop
3. Open a fresh conversation (not continued from browser)

Always start a fresh Claude Desktop conversation — browser sessions expose only a subset of tools, not execute_blender_code.


Part 2 — Hunyuan3D (WSL2)

Setup

conda create -n hunyuan3d_312 python=3.12 -y
conda activate hunyuan3d_312
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu128
cd ~
git clone https://github.com/Tencent/Hunyuan3D-2
cd Hunyuan3D-2
pip install -r requirements.txt
pip install -e .
pip install sentencepiece tiktoken pybind11 ninja
pip install "pybind11[global]"
pip install huggingface_hub
cd hy3dgen/texgen/differentiable_renderer
pip install -e .
cd ~/Hunyuan3D-2

Download Weights

huggingface-cli download tencent/Hunyuan3D-2mini --local-dir ~/Hunyuan3D-2/weights

Fix api_server.py for Text-to-3D

Open ~/Hunyuan3D-2/api_server.py and uncomment lines 166-168:

self.pipeline_t2i = HunyuanDiTPipeline(
    'Tencent-Hunyuan/HunyuanDiT-v1.1-Diffusers-Distilled',
    device=device
)

Without this, text prompts fail with:

AttributeError: 'ModelWorker' object has no attribute 'pipeline_t2i'

Run the Server (for Blender MCP)

conda activate hunyuan3d_312
cd ~/Hunyuan3D-2
python api_server.py --host 0.0.0.0 --port 8081 --model_path ~/Hunyuan3D-2/weights --device cuda

WSL2 auto-forwards ports to Windows — no extra config needed.

Blender MCP Panel Settings

In Blender N-panel → BlenderMCP tab:

SettingValue
Use Tencent Hunyuanchecked
Hunyuan API URLhttp://localhost:8081
Octree Resolution256

Octree Resolution vs VRAM

ResolutionVRAMTime
128~8 GB~30s
256~16 GB~90s
512~24 GB~3 min

Note — Gradio UI (optional, for browser testing only)

python gradio_app.py --model_path ~/Hunyuan3D-2/weights --device cuda --disable_tex --port 8080 --enable_t23d

Access at http://localhost:8080. This is only for manually testing generation in the browser. For Blender MCP, always use api_server.py on port 8081.


0 Comments

Leave a Reply

Avatar placeholder