Blender MCP
ทางการเซิร์ฟเวอร์ MCP (Model Context Protocol) น้ำหนักเบาสำหรับ Blender มีอินเทอร์เฟซภาษาธรรมชาติกับ Python API ของ Blender ช่วยเพิ่มการเข้าถึงเอกสาร และให้ผู้ใช้สำรวจและทำความเข้าใจการตั้งค่าที่ซับซ้อน
คุณทำอะไรได้บ้างด้วย Blender MCP?
- การวิเคราะห์ประสิทธิภาพของฉาก — ให้ AI ของคุณวิเคราะห์ฉาก Blender ที่เปิดอยู่ และระบุวัตถุที่มีจำนวนโพลีกอนสูงเมื่อเทียบกับขนาดบนหน้าจอ เช่น การตรวจจับค่าผิดปกติในตัวอย่างห้องเรียน
- การเปลี่ยนชื่อ data-block — ให้ผู้ช่วยแก้ไขคำที่พิมพ์ผิดหรือแนะนำชื่อที่สื่อความหมายสำหรับ data-block ทั้งหมดในไฟล์ปัจจุบัน โดยจะนำการเปลี่ยนแปลงไปใช้หลังจากที่คุณอนุมัติเท่านั้น
- การสอบถามฉากด้วยภาษาธรรมชาติ — ถามคำถามเกี่ยวกับความสัมพันธ์ของวัตถุ เช่น "วัตถุใดบ้างที่ใช้วัสดุ 'pebbles'?" หรือระบุวัตถุที่มีจำนวนโพลีกอนสูงที่สุดในฉาก
- เอกสารประกอบ Geometry Nodes — ขอคำอธิบายเกี่ยวกับการตั้งค่า geometry nodes หลัก พร้อมด้วยเอกสารประกอบแบบ inline frame และ data-block ข้อความที่สรุปการวิเคราะห์
- การดีบักฉาก — ขอความช่วยเหลือในการแก้ไขปัญหา เช่น เมชที่ถูกปรับขนาดแบบไม่สม่ำเสมอ, normal ที่ผิดปกติ, หรือวัตถุที่ผิดรูปไม่ถูกต้องเมื่อใช้กับ armature
เอกสาร
เซิร์ฟเวอร์ MCP (Model Context Protocol) น้ำหนักเบาสำหรับ Blender โดยนำเสนออินเทอร์เฟซภาษาธรรมชาติกับ Python API ของ Blender ช่วยเพิ่มการเข้าถึงเอกสารประกอบ และช่วยให้ผู้ใช้สำรวจและทำความเข้าใจการตั้งค่าที่ซับซ้อนได้
สำหรับรายละเอียดทางเทคนิคและเอกสารประกอบเกี่ยวกับสถาปัตยกรรม โปรดดู ซอร์สโค้ด
[!warning] คำเตือน คำเตือนด้านความปลอดภัย
เซิร์ฟเวอร์ MCP จะดำเนินการโค้ดที่สร้างโดย LLM ใน Blender โดยไม่มีกลไกป้องกันใดๆ เพื่อปกป้องข้อมูลของคุณจากการถูกลบหรือถูกส่งไปยังตำแหน่งระยะไกล เพื่อความปลอดภัยของข้อมูล ขอแนะนำให้ใช้เครื่องเสมือน หรือระบบที่ไม่มีการเข้าถึงข้อมูลที่ละเอียดอ่อน
การติดตั้ง
Blender ไม่มีฟังก์ชันในตัวสำหรับการเชื่อมต่อกับ LLM
เพื่อให้ Blender เชื่อมต่อกับ LLM ได้ ต้องดาวน์โหลด ติดตั้ง และรันเครื่องมือภายนอกสามรายการด้วยตนเอง
ส่วนเสริม (Add-on)
เพื่อโต้ตอบกับเซสชัน Blender ของคุณ คุณต้องติดตั้งส่วนเสริมเฉพาะสำหรับการรวมเข้ากับ MCP Server
…หรือ ดาวน์โหลด และ ติดตั้งจากดิสก์
หากคุณลากและวางลงใน Blender คุณจะต้องทำสองครั้ง ครั้งแรกเพื่อเพิ่มที่เก็บ Blender Lab ครั้งที่สองเพื่อติดตั้งส่วนเสริมเอง วิธีนี้ช่วยให้คุณได้รับการแจ้งเตือนการอัปเดตเมื่อมีเวอร์ชันใหม่ของส่วนเสริมนี้
ไคลเอนต์ LLM
เซิร์ฟเวอร์ MCP เป็นไปตามมาตรฐานที่กำหนดไว้อย่างชัดเจนและเข้ากันได้กับไคลเอนต์จำนวนมาก โปรดปฏิบัติตามเอกสารประกอบของ LLama.cpp หรือติดตั้งไคลเอนต์ LLM ที่คุณต้องการ
เซิร์ฟเวอร์ MCP
มีหลายวิธีในการติดตั้งเซิร์ฟเวอร์ MCP ขึ้นอยู่กับความสามารถของไคลเอนต์ LLM ของคุณ
- MCP Bundle: สำหรับไคลเอนต์รุ่นใหม่ที่รองรับไฟล์
.mcpbให้ดาวน์โหลด แพ็คเกจล่าสุด จากหน้าเผยแพร่ Llama.cpp ยังไม่รองรับสิ่งนี้ - MCP Server: หากต้องการติดตั้งจากซอร์สโค้ด โปรดดู เอกสารประกอบของ Llama.cpp หรือ คำแนะนำการตั้งค่า
การรัน
เมื่อคุณตั้งค่า MCP Server ภายในไคลเอนต์ LLM ของคุณแล้ว คุณสามารถเริ่มสำรวจฉาก Blender ของคุณได้

อินเทอร์เฟซเว็บของ llama.cpp ที่รันเซิร์ฟเวอร์ blender-mcp
ตัวอย่างที่ 1: การวิเคราะห์ฉาก
MCP สามารถใช้วิเคราะห์ฉากเพื่อหาจุดคอขวดด้านประสิทธิภาพได้โดยอัตโนมัติ ตัวอย่างเช่น ไฟล์เดโม Classroom:

ไฟล์เดโม Classroom
ฉากนี้เป็นหนึ่งในไฟล์ เกณฑ์มาตรฐาน Blender เหตุผลที่ไฟล์เหล่านี้อยู่ในเกณฑ์มาตรฐานก็เพราะเป็นตัวแทนที่ดีของไฟล์การผลิตจริงที่สร้างโดยศิลปิน และไม่น่าแปลกใจที่ไฟล์เหล่านี้อาจมีวัตถุที่ควรได้รับการปรับให้เหมาะสม
แม้ว่าการตรวจสอบจำนวนรูปหลายเหลี่ยมมักจะเพียงพอ แต่สิ่งที่น่าสนใจยิ่งกว่าคือการพล็อตจำนวนรูปหลายเหลี่ยมตามขนาดที่ปรากฏในการเรนเดอร์สุดท้าย ซึ่งสามารถทำได้ด้วยพรอมพ์ต่อไปนี้
Analyze the scene and list the outliers: objects with highest polygon count but smaller size from the camera point of view.
ข้อมูลที่พล็อตออกมาแสดงให้เห็นวัตถุสองชิ้นที่โดดเด่นจากส่วนอื่นอย่างชัดเจน: alphabet และ coat 1:

กราฟวิเคราะห์จำนวนรูปหลายเหลี่ยมต่อพื้นที่หน้าจอสำหรับฉากเดโม classroom
วัตถุ alphabet มีรูปหลายเหลี่ยม 20,000 ชิ้น เนื่องจากการจัดวางแบบแบน จึงสามารถแทนที่ด้วยพื้นผิวโดยมีผลกระทบต่อผลลัพธ์สุดท้ายเพียงเล็กน้อย วัตถุ coat 1 มีรูปหลายเหลี่ยม 37,000 ชิ้นเนื่องจากโมดิฟายเออร์ Subsurf การลดระดับการแบ่งย่อยลงอาจช่วยลดภาระของฉากได้ หากหน่วยความจำเป็นคอขวดในระบบของคุณ

ตัวอักษรอยู่ด้านหลังของฉากและสามารถแทนที่ด้วยพื้นผิวได้ง่าย เสื้อโค้ทก็อยู่ไกลพอที่จะทำให้ตาข่ายถูกทำให้เรียบง่ายลงได้
[!info] ข้อมูล ผลลัพธ์เหล่านั้นเชื่อถือได้แค่ไหน?
การวิเคราะห์เบื้องต้นที่ส่งคืนโดย LLM พิจารณาเฉพาะโมดิฟายเออร์ที่มีผลต่อวิวพอร์ตเท่านั้น วัตถุ
coat 1มีโมดิฟายเออร์ Solidify ซึ่งเพิ่มจำนวนรูปหลายเหลี่ยมเป็นสองเท่า ทำให้เป็นค่าผิดปกติยิ่งขึ้น และแม้ว่าฉากนี้จะไม่ได้เปิดใช้งาน Simplify แต่การตั้งค่านี้ก็จะส่งผลต่อการวิเคราะห์ขั้นสุดท้ายเช่นกัน
ตัวอย่างที่ 2: พรอมพ์ต่างๆ
ต่อไปนี้เป็นกรณีการใช้งานอื่นๆ ที่ได้รับการทดสอบแล้ว คุณจะต้องวางเนื้อหา "พรอมพ์" ทั้งหมดเพื่อให้ทำงานได้ ควรใช้ไฟล์เดโมที่เกี่ยวข้องเป็นจุดเริ่มต้น ความสำเร็จของการดำเนินการจะขึ้นอยู่กับโมเดลที่ใช้
| กรณีการใช้งาน | พรอมพ์ | ไฟล์เดโม | ผลลัพธ์ |
|---|---|---|---|
| การเปลี่ยนชื่อ data-block: แก้ไขการพิมพ์ผิด | With the current open Blender file fix the name of all the data-blocks to remove typos. Report back which data-blocks got fixed. | Scattering Pebbles | GRP-rocks → GRP-pebble, LGT-Lights → LGT-lights, Compositing Nodetree → Compositing Node Tree |
| การเปลี่ยนชื่อ data-block: ชื่อที่ดีขึ้น | With the current open Blender file suggest descriptive names for all data-blocks, and apply if approved. | Scattering Pebbles | Camera → CAM-main, Area → LGT-sun-key, Area.001 → LGT-sun-fill, Area.002 → LGT-area-rim, GEO-pebble.001 → GEO-pebble-B, … |
| การสอบถามความสัมพันธ์ของข้อมูลด้วยภาษาธรรมชาติ | Which objects are using the following material: pebbles | Scattering Pebbles | วัตถุ 7 ชิ้น: GEO-pebble, GEO-pebble.001, GEO-pebble.002, GEO-pebble.003, GEO-pebble.004, GEO-pebble.005, GEO-pebble.006 |
| การดีบักฉาก | What is the object with the highest poly-count on this file? Ignore objects which are not linked to any scene. | Scattering Pebbles | GEO-ground ที่มี 4,096 หน้า |
| เอกสารประกอบ Geometry Nodes | With the current open Blender file explain what the main geometry nodes setup is doing. Add inline documentation for it with frame elements. Create a Text data-block with the result of analysis. | Scattering Pebbles | เฟรมที่เข้ารหัสสีหลัก 4 เฟรม + ไฟล์ข้อความพร้อมคำอธิบาย |
พรอมพ์อื่นๆ ที่ยังต้องสำรวจ:
- แปล data-block ทั้งหมดจากภาษาฝรั่งเศสเป็นภาษาอังกฤษ
- ตาข่ายของฉันไม่ถูกเปลี่ยนรูปโดย armature ของฉัน ฉันจะแก้ไขได้อย่างไร?
- Blender หน่วยความจำไม่เพียงพอในการเรนเดอร์ฉากนี้ ฉันจะปรับให้เหมาะสมได้อย่างไร?
- ตาข่ายนี้มีสิ่งผิดปกติในการแรเงา ฉันจะแก้ไขได้อย่างไร?
- ค้นหาวัตถุที่มีตาข่ายที่มี normal ไม่ดี
- ตรวจสอบฉากของฉันสำหรับวัตถุตาข่ายที่ถูกแปลงแบบไม่สม่ำเสมอ
- วิดีโอที่ฉันส่งออกไม่เล่นในเว็บเบราว์เซอร์ของฉัน ฉันควรเปลี่ยนการตั้งค่าใด?
- ควรใช้แปรงปั้นแบบใดสำหรับการสร้างและเก็บรายละเอียดกิ่งไม้?
- ตั้งค่าโหนด compositing เพื่อบันทึกรูปภาพทั้งแบบ SDR และ HDR
- ตรวจสอบรายการตรวจสอบนี้: ตาข่ายต้องเป็น manifold วัตถุทั้งหมดต้องมีวัสดุ การตั้งชื่อต้องเป็นไปตามข้อกำหนด ไม่มีพาธสัมบูรณ์ … การเปลี่ยนชื่อ data-block: แก้ไขการพิมพ์ผิด
GRP-rocks → GRP-pebbles (ฉากมีเฉพาะวัตถุ pebble ไม่ใช่ rocks)
LGT-Lights → LGT-lights (ตัวพิมพ์ไม่สอดคล้องกัน)
Compositing Nodetree → Compositing Node Tree (Nodetree เป็นข้อผิดพลาดของคำประสม)
การเปลี่ยนชื่อ data-block: ชื่อที่ดีขึ้น
วัตถุ:
Camera→CAM-mainArea→LGT-sun-keyArea.001→LGT-sun-fillArea.002→LGT-area-rimGEO-pebble.001→GEO-pebble-BGEO-pebble.002→GEO-pebble-CGEO-pebble.003→GEO-pebble-DGEO-pebble.004→GEO-pebble-EGEO-pebble.005→GEO-pebble-FGEO-pebble.006→GEO-pebble-G
Data-Block แสง:
Area→LGT-sun-keyArea.001→LGT-sun-fillArea.002→LGT-area-rim
Data-Block กล้อง:
Camera→CAM-main
พื้นผิว:
Texture→TEX-ground-cloudsTexture.001→TEX-ground-image
ฉากและโลก:
World→WLD-environmentScene→SCN-mainเอกสารประกอบ Geometry Nodes
เฟรมใหม่ที่สร้างขึ้น:

เฟรมเอกสารประกอบที่เพิ่มลงในการตั้งค่า geometry nodes
Data-Block ข้อความ:
GEOMETRY NODES ANALYSIS -- "Pebble Scattering Nodes"
Applied to object: GEO-ground | Modifier: Pebbles
========================================================
OVERVIEW
--------
This node group scatters three size categories of pebble meshes across
the faces of a ground mesh. Each category uses its own density mask
and a global Factor multiplier so that coverage can be art-directed
per-layer without touching the raw mask textures. The three resulting
instance layers are merged with the original ground geometry and sent
to the Group Output.
INPUTS (Group Interface)
------------------------
Geometry -- The ground mesh to scatter pebbles on.
Large Pebbles Mask -- Float mask (e.g. vertex colour / texture) that
defines WHERE large pebbles may appear.
Medium Pebbles Mask-- Float mask for medium pebble placement regions.
Small Pebbles Mask -- Float mask for small pebble placement regions.
Factor -- Global density multiplier shared by all three
lanes (appears three times in the interface,
one per lane).
NODE GRAPH -- LANE BY LANE
--------------------------
+- LARGE PEBBLES LANE -----------------------------------------------------+
| Source object : GEO-pebble |
| Group Input.001 |
| +- Geometry ------------------------> Distribute Points on Faces |
| +- Large Pebbles Mask ------------> Distribute Points on Faces |
| | (Density Factor socket) |
| +- Factor --> Math.003 (x) -------> Distribute Points on Faces |
| (Density Max socket) |
| Distribute Points on Faces ----------> Instance on Points |
| Object Info (GEO-pebble) -----------> Instance on Points (Instance) |
| Random Rotation.001 [-pi, +pi] -----> Instance on Points (Rotation) |
| Random Value [0.25 - 0.60] -------> Instance on Points (Scale) |
| Instance on Points ------------------> Join Geometry.003 |
+--------------------------------------------------------------------------+
+- MEDIUM PEBBLES LANE ----------------------------------------------------+
| Source object : GEO-pebble.004 |
| Group Input.002 |
| +- Geometry ------------------------> Distribute Points on Faces.001 |
| +- Medium Pebbles Mask -----------> Math.004 (x) --> Math.005 (x) |
| +- Factor ------------------------> Math.005 (x) |
| Math.005 output --------------> Distribute Points on Faces.001 |
| (Density socket) |
| Distribute Points on Faces.001 -----> Instance on Points.001 |
| Object Info.001 (GEO-pebble.004) --> Instance on Points.001 |
| Random Rotation.002 [-pi, +pi] ----> Instance on Points.001 |
| Random Value.002 [0.25 - 0.45] -----> Instance on Points.001 |
| Instance on Points.001 -------------> Join Geometry.003 |
+--------------------------------------------------------------------------+
+- SMALL PEBBLES LANE -----------------------------------------------------+
| Source object : GEO-pebble.002 |
| Group Input.003 |
| +- Geometry ------------------------> Distribute Points on Faces.002 |
| +- Small Pebbles Mask -----------> Math.006 (x) --> Math.007 (x) |
| +- Factor ------------------------> Math.006 (x) |
| Math.007 output --------------> Distribute Points on Faces.002 |
| (Density socket) |
| Distribute Points on Faces.002 -----> Instance on Points.002 |
| Object Info.002 (GEO-pebble.002) --> Instance on Points.002 |
| Random Rotation [-pi, +pi] ----> Instance on Points.002 |
| Random Value.003 [0.10 - 0.35] -----> Instance on Points.002 |
| Instance on Points.002 -------------> Join Geometry.003 |
+--------------------------------------------------------------------------+
+- MERGE & OUTPUT ---------------------------------------------------------+
| Group Input.004 |
| +- Geometry (pass-through) --------> Join Geometry.003 |
| Join Geometry.003 |
| (inputs: large instances + medium instances + |
| small instances + original ground geo) |
| +- Geometry -----------------------> Group Output |
+--------------------------------------------------------------------------+
SCALE RANGES (uniform, per lane)
---------------------------------
Large pebbles : 0.25 - 0.60
Medium pebbles : 0.25 - 0.45
Small pebbles : 0.10 - 0.35
ROTATION (all lanes)
---------------------
All three axes randomised independently over [-pi, +pi],
giving each pebble instance a fully random orientation.
DENSITY CONTROL PATTERN (Medium & Small lanes)
-----------------------------------------------
The mask value and the Factor are first multiplied together
(Math.004 / Math.006), then that product is multiplied again
by a second value (Math.005 / Math.007) before being fed into
the Density socket. This two-stage multiply gives a non-linear
response curve, making the density fall off more aggressively
near the mask edges.
The Large lane uses a different (single-stage) approach:
the Density Factor socket receives the mask directly, and the
Factor is only used to scale Density Max via Math.003.
NOTES & SUGGESTIONS
--------------------
* The node group has no Seed input exposed; adding one would allow
re-randomising all three layers simultaneously without touching
individual nodes.
* The Factor input currently appears three times (once per lane).
Merging them into a single shared socket would simplify the
modifier panel.
* Consider labelling the unlabelled Math nodes (Math.003-.007)
and Random Value nodes to aid future maintenance.