mcpField
M
multi-image-to-3d

multi-image-to-3d

github.com/kevinbadiCreative & media210149 installsUpdated 30w ago
Repository

About multi-image-to-3d

A Blender skill that turns 1–4 views of the same object into a textured 3D model using Meshy AI's Multi-Image to 3D API, then imports the result into the active scene. It is intended for users preparing models from multi-angle photos.

Key features

  1. 01Accept 1–4 images of one object
  2. 02Generate textured 3D models with Meshy AI
  3. 03Configure topology and polygon count
  4. 04Choose output formats including GLB and FBX
  5. 05Import generated models into Blender

Use cases

  1. 01Creating a 3D asset from product photos
  2. 02Generating a model from front, back, and side views
  3. 03Importing a Meshy-generated model into the current scene

MCP support

The skill requires Blender MCP to be connected and uses its `execute_blender_code` tool to import the generated model into Blender.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/kevinbadi/blender-skills --skill multi-image-to-3d

After installing, type/multi-image-to-3din Claude Code to confirm it loaded.

Details

From the project README

Multi-Image to 3D Blender Skill

Converts 1-4 photos of the same object (from different angles) into a textured 3D model using Meshy AI's Multi-Image to 3D API, then imports it into the active Blender scene. More angles = more accurate geometry and textures.

When to Use

Trigger this skill when:

  • User provides multiple photos of the same object and wants a 3D model
  • User says "multi-angle 3D", "convert these images to 3D", "make a 3D model from these photos"
  • User wants a more accurate 3D model than single-image can provide
  • User has front/back/side shots of a product, character, or object

Prerequisites

  • Meshy API Key: Retrieved from memory (reference_meshy_api.md)
  • Blender MCP: Must be connected (blender-mcp addon running on port 9876)
  • Images: 1-4 local file paths (.jpg, .jpeg, .png) or publicly accessible URLs
  • Same object: All images must depict the same object from different angles

Flow

Step 1: Prepare the Images

For each local file, base64 encode it into a data URI:

import base64, json

image_paths = ["front.png", "back.png", "side.png"]  # user-provided paths
image_urls = []

for path in image_paths:
    with open(path, 'rb') as f:
        b64 = base64.b64encode(f.read()).decode()
    ext = path.rsplit('.', 1)[-1].lower()
    mime = 'image/jpeg' if ext in ('jpg', 'jpeg') else 'image/png'
    image_urls.append(f"data:{mime};base64,{b64}")
Step 2: Create Multi-Image-to-3D Task

Write payload to a JSON file (base64 strings are too large for CLI args):

payload = {
    "image_urls": image_urls,  # array of 1-4 data URIs or public URLs
    "ai_model": "meshy-6",
    "enable_pbr": True,
    "should_texture": True,
    "target_formats": ["glb"]
}

with open("output/request.json", "w") as f:
    json.dump(payload, f)

Then POST:

curl -s https://api.meshy.ai/openapi/v1/multi-image-to-3d \
  -X POST \
  -H "Authorization: Bearer ${MESHY_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d @output/request.json

Response: {"result": "<task_id>"}

Step 3: Poll for Completion
curl -s https://api.meshy.ai/openapi/v1/multi-image-to-3d/<task_id> \
  -H "Authorization: Bearer ${MESHY_API_KEY}"

Poll every 15 seconds. Check status:

  • PENDING — queued (check preceding_tasks for queue position)
  • IN_PROGRESS — generating (check progress for %)
  • SUCCEEDED — done, download from model_urls.glb
  • FAILED — check task_error.message
Step 4: Download the GLB
curl -L -o "output/<filename>.glb" "<model_urls.glb>"
Step 5: Import into Blender

Use the Blender MCP execute_blender_code tool:

import bpy

# Clear scene (optional)
for obj in bpy.data.objects:
    bpy.data.objects.remove(obj, do_unlink=True)

# Import GLB
bpy.ops.import_scene.gltf(filepath="<path_to_glb>")

# Frame imported object
bpy.ops.object.select_all(action='SELECT')

# Add basic lighting
import math
from mathutils import Vector, Euler
bpy.ops.object.light_add(type='AREA', location=(2, -2, 3))
key = bpy.context.active_object
key.data.energy = 500
key.data.size = 3

# Set viewport to material preview
for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        for space in area.spaces:
            if space.type == 'VIEW_3D':
                space.shading.type = 'MATERIAL'

Configuration Options

OptionDefaultDescription
ai_modelmeshy-6meshy-5, meshy-6, or latest
topologytrianglequad or triangle mesh
target_polycount30000100–300,000 polygons
enable_pbrtrueMetallic/roughness/normal maps
symmetry_modeautooff, auto, or on
pose_mode""a-pose, t-pose, or empty
should_texturetrueGenerate textures
should_remeshfalseRemesh to target polycount/topology
remove_lightingtrueClean textures without baked lighting
image_enhancementtrueOptimize input images
target_formatsallArray: glb, obj, fbx, stl, usdz, 3mf

Tips for Best Results

  • Different angles: Front, back, left side, right side work best
  • Consistent lighting: Same lighting conditions across all photos
  • Clean background: Plain/white backgrounds help
  • Same object: All images MUST be the same object
  • 2-4 images: More angles = better accuracy, but diminishing returns past 4

Error Handling

  • 400: Invalid image count (must be 1-4), bad format, unreachable URL
  • 402: Insufficient Meshy credits
  • 429: Rate limited — wait and retry
  • FAILED status: Report task_error.message to user

Comments

Markdown supported