跪拜 Guibai
← All articles
Three.js · MCP · AI Programming

Talk to Blender: A Conversational Modeling Pipeline from Qoder to Three.js Web Showcase

By 誰在花里胡哨 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

This workflow makes AI-driven Blender modeling safe and practical for asset production by forcing human approval before any script runs and keeping safe mode enabled, so the risk of destructive operations stays under the developer's control instead of being delegated to the model.

Summary

Qoder's MCP integration turns Blender into a conversational modeling tool. The article walks through configuring a Blender plugin, uvx, and the Qoder MCP server so that an AI assistant can create, modify, and validate 3D models entirely in a chat window. The workflow loops through script approval, execution, and render validation before exporting a GLB file and presenting it in a web page built with three.js and GSAP. No step runs automatically; the user confirms each script, and safe mode blocks risky operations.

The setup requires pinning specific versions: Blender 5.2.1, uvx with an absolute path, mcp-for-blender 2.2.7, and an mcp.json that enables safe mode and disables telemetry. The author lays out a project structure with AGENTS.md rules, backup copies per stage, and a clear separation of scripts, renders, and exports. On the web side, GLB goes to object storage with public read and CORS, while three.js 0.169.0 and GSAP 3.12.5 load from jsDelivr with pinned versions.

Pitfalls are practical: metallic materials need IBL environment maps, glTF only preserves PBR materials, ES modules require an HTTP server, and Chinese UI node names break lookups unless you use bl_idname. The result is a repeatable process for producing interactive 3D web assets without leaving the chat interface, as long as the human stays in the approval loop.

Takeaways
— Blender 5.2.1 is the pinned stable version for this workflow.
— uvx must be referenced by absolute path in mcp.json because GUI-launched Qoder doesn't inherit the shell PATH.
— The mcp-for-blender plugin version is 2.2.7 and must match the Blender plugin protocol.
— Setting BLENDER_MCP_SAFE_MODE=1 restricts scripts and blocks operations like os, datetime, and nonlocal.
— The Blender-side MCP server listens on port 9876; a successful connection shows 'Connected on localhost:9876'.
— Model generation proceeds in stages: body, parts, materials, lights/camera, render; each stage requires explicit confirmation.
— The user must reply 'confirm execution' before any generated script runs once via MCP; errors return verbatim with no auto-retry.
— Export GLB with Y-up, selecting only model objects, excluding lights and cameras.
— three.js loads the GLB and needs an environment map for IBL; metallic materials otherwise render black.
— Use ACES tone mapping and moderate exposure to avoid highlight blowout in the web render.
— GSAP scroll-driven rotation and text animations power the showcase page; an orbit controller is for the preview page.
— Web assets use three.js 0.169.0 and GSAP 3.12.5 via jsDelivr with pinned versions.
— ES modules in the web page require an HTTP server; double-clicking the HTML file fails to load them.
— For Chinese UI nodes, look up by bl_idname instead of display name.
— Procedural materials degrade on GLB export and need parameter fixes after loading.
Conclusions

The strict approval loop—every script waits for a typed 'confirm execution' and errors are returned verbatim—is what makes this practical for real work; it trades convenience for control, and the author treats that trade as non-negotiable.

Safe mode's block list (os, datetime, nonlocal) shows that the risk isn't the model's intent but its tool reach; limiting the Python surface is a more effective guard than trusting the AI to behave.

The article's web-side troubleshooting (IBL for metals, rebuilding lights in glTF, HTTP requirement for ES modules) reflects a common mismatch between Blender's render environment and the browser's real-time constraints.

Pinning exact versions of Blender, uvx, mcp-for-blender, three.js, and GSAP is presented as the default, which suggests that MCP toolchains still break often enough that reproducibility depends on lockstep upgrades.

Concepts & terms
MCP (Model Context Protocol)
A protocol that lets an AI assistant (like Qoder) connect to external tools and services through a server, exposing operations as callable tools. Here it bridges Qoder to Blender so the assistant can execute Blender Python scripts.
GLB
The binary container format for glTF, a standard for transmitting 3D models and scenes. GLB packs geometry, materials, and textures into a single file, suitable for web loading.
IBL (Image-Based Lighting)
Lighting a 3D scene using an environment map (a 360-degree image) instead of explicit light sources. In three.js, it provides ambient reflection so metallic and glossy materials don't render black.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗