Logo Blender To Unity

Blender To Unity

Tổ chứcPhổ biến
CoplayDev
blender-to-unity

Hand off a model from Blender (via BlenderMCP) into Unity (via MCP for Unity) — export the current Blender model, import it through import_model_file, and place it in the open scene. Use when the user has BlenderMCP and MCP for Unity both connected and wants to bring a Blender model into Unity. Does NOT drive Blender's own generators; BlenderMCP owns how the model got into Blender.

Tổng quan

Nhà phát hànhCoplayDev
Kho mãunity-mcp
Tên kỹ năngblender-to-unity
Sao
15.3K
Bản fork
1.6K
Tệp đi kèm
2
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 2 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được CoplayDev công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Blender To Unity trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/CoplayDev/unity-mcp/tree/beta/.claude/skills/blender-to-unity
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/CoplayDev/unity-mcp.git /tmp/unity-mcp
mkdir -p .claude/skills
cp -r /tmp/unity-mcp/.claude/skills/blender-to-unity .claude/skills/blender-to-unity
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Blender To Unity trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Blender To Unity ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Blender To Unity với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Blender → Unity Model Handoff

Bring whatever model is currently in Blender into the open Unity scene. The seam is the local filesystem: Blender exports a file, Unity imports it. The two servers never talk directly.

Preconditions

  • Both mcp__blender__* tools and MCP for Unity tools are connected.
  • A model exists in the Blender scene (confirm with mcp__blender__get_scene_info / mcp__blender__get_object_info). If empty, stop and tell the user — this skill does not generate models.
  • import_model_file is in the asset_gen tool group, which is off by default (only core loads). Enable it first with manage_tools (enable the asset_gen group), or call the C# handler straight through batch_execute — {"tool":"import_model_file","params":{"sourcePath":...,"name":...,"outputFolder":...}} (camelCase) — which dispatches by name regardless of group gating.

Steps

  1. Resolve the Unity project path. Read mcpforunity://editor/state for the project root (the editor dataPath's parent). Decide the export format:
    • GLB (glTFast) when the model has a rig, animation, PBR (metallic/roughness), emission, or transparency — glTFast carries all of these automatically, no post-processing (see references/bridge-fidelity.md). Multi-material zones survive either format, so they alone don't force GLB.
    • FBX otherwise — when glTFast isn't installed, the model is plain geometry, or you specifically need the built-in importer's humanoid-avatar pipeline. FBX drops emission/metallic (Step 5 restores emission) and surfaces animation only with animation_type set (Step 3).
  2. Export from Blender to a temp path via mcp__blender__execute_blender_code:
    python
    import bpy, os, tempfile
    out = os.path.join(tempfile.gettempdir(), "blender_to_unity.fbx")
    # Export the selection if any, else the whole scene:
    bpy.ops.export_scene.fbx(filepath=out, use_selection=bool(bpy.context.selected_objects),
                             apply_unit_scale=True, bake_space_transform=True)
    print(out)
    (glTF branch: out_glb = os.path.join(tempfile.gettempdir(), "blender_to_unity.glb"), then bpy.ops.export_scene.gltf(filepath=out_glb, export_format='GLB', use_active_scene=True) — its default use_active_scene=False can silently export a different open scene.)
  3. Import into Unity with import_model_file: import_model_file(source_path=<temp path>, name=<asset name>, target_size=<final size in meters>). For a rigged/animated FBX, also pass animation_type="generic" (or "humanoid"; "legacy" targets the old Animation-component system) — the importer defaults to "none", which deliberately imports the mesh with zero animation clips. GLB ignores this (glTFast imports animation itself), so it's an FBX-only knob. It returns { asset_path, asset_guid }. Pass target_size as the intended final size, but treat it only as a hint: it rescales at import solely when the project's Auto-normalize pref is on, and even then is unreliable for Blender FBX (see the Scale note). Step 4 does the reliable normalization.
  4. Place it in the scene, normalized to size. Ensure the scene has a camera + directional light (manage_scene / manage_gameobject). Instantiate the model at the chosen position via manage_gameobject(action="create", prefab_path=<asset_path>, name=<asset name>, position=[x,y,z]). Then normalize its size deterministically — Blender FBX commonly imports ~100× too large — by measuring the placed model's world bounds and scaling so its largest dimension equals your target size. Run via execute_code (substitute your object name and target meters):
    csharp
    var go = GameObject.Find("<asset name>");
    var rs = go.GetComponentsInChildren<Renderer>();
    var b = rs[0].bounds; for (int i = 1; i < rs.Length; i++) b.Encapsulate(rs[i].bounds);
    float maxDim = Mathf.Max(b.size.x, Mathf.Max(b.size.y, b.size.z));
    float target = 2f; // intended size in meters
    if (maxDim > 0.0001f) go.transform.localScale *= target / maxDim;
  5. Restore emission FBX dropped (FBX path). Blender scenes commonly store their color/glow in material emission (and other Principled-node inputs). FBX carries base/diffuse color but not emission, so neon / "Tron" scenes import as dark bodies with black accents. If the import looks flat vs. Blender, restore it: a. Dump the emissive materials from Blender via execute_blender_code:
    python
    import bpy, json
    out = {}
    for m in bpy.data.materials:
        if not (m.use_nodes and m.node_tree): continue
        col, s = (0, 0, 0), 0.0
        p = next((n for n in m.node_tree.nodes if n.type == 'BSDF_PRINCIPLED'), None)
        es = next((k for k in ('Emission Color', 'Emission') if p and k in p.inputs), None)  # 4.x / 3.x name
        if es:
            col = tuple(p.inputs[es].default_value)[:3]
            s = float(p.inputs['Emission Strength'].default_value)
        e = next((n for n in m.node_tree.nodes if n.type == 'EMISSION'), None)
        if e and s == 0:
            col = tuple(e.inputs['Color'].default_value)[:3]; s = float(e.inputs['Strength'].default_value)
        if s > 0 and sum(col) > 0.01:
            out[m.name] = [round(col[0], 3), round(col[1], 3), round(col[2], 3), round(s, 3)]
    print(json.dumps(out))
    b. In Unity (execute_code): extract the FBX's materials so they're editable (AssetDatabase.ExtractAsset per Material, then ImportAsset(fbx, ForceUpdate)), then for each dumped name set _EmissionColor = color * Mathf.Clamp(strength*0.45f, 1.5f, 5f), EnableKeyword("_EMISSION"), and globalIlluminationFlags = RealtimeEmissive. Match names case-insensitively — FBX mangles case and can split one material into variants (EdgeCyan → EdgeCyan + EDGE_CYAN); set every match. Add a global Bloom volume and enable the camera's renderPostProcessing so the emission actually glows.
  6. Verify with manage_camera(action="screenshot", include_image=true) and report the asset path + a screenshot.

Notes

  • Scale. Models from Blender almost always arrive at the wrong scale — its FBX unit handling makes them land ~100× too large in Unity. import_model_file's target_size only rescales at import when the project's Auto-normalize pref is enabled, and its importer-level normalization is unreliable for Blender FBX (it can over- or under-shoot, e.g. a target_size=2 model measured 200 m). The robust fix is the Step 4 measure-bounds-then-set-localScale routine, which hits the target size deterministically regardless of the import scale or the Auto-normalize pref.
  • Materials & emission. FBX carries base/diffuse color and transforms fine, but drops emission and any node-based color — so Blender neon / "Tron" scenes (color stored in emission) import as dark bodies with black accents. Two fixes: (a) prefer glTF/GLB when glTFast is installed — glTF's PBR model carries emissiveFactor + KHR_materials_emissive_strength natively, so emission survives with no post-step (bpy.ops.export_scene.gltf(filepath=out, export_format='GLB', use_active_scene=True)); (b) with FBX, run Step 5 to dump Blender's emission and reapply it. Also check the mesh for a color_attributes (vertex color) layer — the data survives FBX, but URP Lit won't display it; that needs a vertex-color-reading shader, not _EmissionColor.
  • FBX is the default because glTFast is optional in MCP for Unity. If the import errors with "GLB import requires glTFast", re-export as FBX (or install glTFast from the Dependencies tab).
  • Format fidelity. references/bridge-fidelity.md is a tested matrix of what each format carries. Summary: GLB (glTFast) keeps textures, metallic/roughness, emission, transparency, and animation automatically; FBX drops metallic + emission, needs ModelImporter.animationType = Generic to surface transform animation, and needs material/texture extraction to assign an embedded texture. Both bake modifiers and carry geometry + vertex-color data (URP Lit won't display vertex colors). Neither carries procedural/node materials — bake them to image textures in Blender first.
  • Animation doesn't auto-play. An imported clip won't move the model until an AnimatorController drives it — the placed model has an Animator with a null controller, so it looks frozen. Build one with manage_animation (controller_create → add the clip as a looping state → controller_assign onto the instance) rather than hand-rolling execute_code. See bridge-fidelity gotcha #7.
  • Multi-material zones survive. A mesh split into material slots in Blender (e.g. skin/shirt/pants regions) imports as submeshes with one material each — base colors carry over GLB natively — so you can "dress" a model with material zones and it arrives intact.
  • Keep one model per handoff; for batches, repeat the loop with distinct names.
  • This skill never sends API keys or file bytes over the MCP bridge — Unity reads the file from disk.
  • import_model_file copies only the single source file; for multi-file exports (a text .gltf with an external .bin, or an .obj with a sibling .mtl/textures), zip them first and pass the .zip — a bare .gltf/.obj will lose its sidecars.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Blender To Unity làm được gì?

Hand off a model from Blender (via BlenderMCP) into Unity (via MCP for Unity) — export the current Blender model, import it through import_model_file, and place it in the open scene. Use when the user has BlenderMCP and MCP for Unity both connected and wants to bring a Blender model into Unity. Does NOT drive Blender's own generators; BlenderMCP owns how the model got into Blender.

Vì sao nên dùng Blender To Unity trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Blender To Unity là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Blender To Unity trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/CoplayDev/unity-mcp/tree/beta/.claude/skills/blender-to-unity. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Blender To Unity?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Blender To Unity với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Blender To Unity với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Blender To Unity có miễn phí không?

Có. Kỹ năng này được CoplayDev phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇