Skip to main content
Glama
Eminemminem

BlenderMCP

by Eminemminem

generate_hyper3d_model_via_images

Create 3D models with built-in materials from images and import them into Blender for 3D asset generation.

Instructions

Generate 3D asset using Hyper3D by giving images of the wanted asset, and import the generated asset into Blender. The 3D asset has built-in materials. The generated model has a normalized size, so re-scaling after generation can be useful.

Parameters:

  • input_image_paths: The absolute paths of input images. Even if only one image is provided, wrap it into a list. Required if Hyper3D Rodin in MAIN_SITE mode.

  • input_image_urls: The URLs of input images. Even if only one image is provided, wrap it into a list. Required if Hyper3D Rodin in FAL_AI mode.

  • bbox_condition: Optional. If given, it has to be a list of ints of length 3. Controls the ratio between [Length, Width, Height] of the model.

Only one of {input_image_paths, input_image_urls} should be given at a time, depending on the Hyper3D Rodin's current mode. Returns a message indicating success or failure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
input_image_pathsNo
input_image_urlsNo
bbox_conditionNo

Implementation Reference

  • The core handler function for the 'generate_hyper3d_model_via_images' MCP tool. It validates input images (either paths or URLs), encodes path-based images to base64, processes bbox_condition using helper, and sends a 'create_rodin_job' command to Blender addon via socket. The @mcp.tool() decorator registers the tool and infers schema from signature/docstring.
    @mcp.tool()
    def generate_hyper3d_model_via_images(
        ctx: Context,
        input_image_paths: list[str]=None,
        input_image_urls: list[str]=None,
        bbox_condition: list[float]=None
    ) -> str:
        """
        Generate 3D asset using Hyper3D by giving images of the wanted asset, and import the generated asset into Blender.
        The 3D asset has built-in materials.
        The generated model has a normalized size, so re-scaling after generation can be useful.
        
        Parameters:
        - input_image_paths: The **absolute** paths of input images. Even if only one image is provided, wrap it into a list. Required if Hyper3D Rodin in MAIN_SITE mode.
        - input_image_urls: The URLs of input images. Even if only one image is provided, wrap it into a list. Required if Hyper3D Rodin in FAL_AI mode.
        - bbox_condition: Optional. If given, it has to be a list of ints of length 3. Controls the ratio between [Length, Width, Height] of the model.
    
        Only one of {input_image_paths, input_image_urls} should be given at a time, depending on the Hyper3D Rodin's current mode.
        Returns a message indicating success or failure.
        """
        if input_image_paths is not None and input_image_urls is not None:
            return f"Error: Conflict parameters given!"
        if input_image_paths is None and input_image_urls is None:
            return f"Error: No image given!"
        if input_image_paths is not None:
            if not all(os.path.exists(i) for i in input_image_paths):
                return "Error: not all image paths are valid!"
            images = []
            for path in input_image_paths:
                with open(path, "rb") as f:
                    images.append(
                        (Path(path).suffix, base64.b64encode(f.read()).decode("ascii"))
                    )
        elif input_image_urls is not None:
            if not all(urlparse(i) for i in input_image_paths):
                return "Error: not all image URLs are valid!"
            images = input_image_urls.copy()
        try:
            blender = get_blender_connection()
            result = blender.send_command("create_rodin_job", {
                "text_prompt": None,
                "images": images,
                "bbox_condition": _process_bbox(bbox_condition),
            })
            succeed = result.get("submit_time", False)
            if succeed:
                return json.dumps({
                    "task_uuid": result["uuid"],
                    "subscription_key": result["jobs"]["subscription_key"],
                })
            else:
                return json.dumps(result)
        except Exception as e:
            logger.error(f"Error generating Hyper3D task: {str(e)}")
            return f"Error generating Hyper3D task: {str(e)}"
  • Helper function used by the tool to normalize bbox_condition into percentages (0-100) based on max dimension, handling float/int inputs.
    def _process_bbox(original_bbox: list[float] | list[int] | None) -> list[int] | None:
        if original_bbox is None:
            return None
        if all(isinstance(i, int) for i in original_bbox):
            return original_bbox
        if any(i<=0 for i in original_bbox):
            raise ValueError("Incorrect number range: bbox must be bigger than zero!")
        return [int(float(i) / max(original_bbox) * 100) for i in original_bbox] if original_bbox else None
  • Utility tool to check Hyper3D status, prerequisite for using the generation tools.
    def get_hyper3d_status(ctx: Context) -> str:
        """
        Check if Hyper3D Rodin integration is enabled in Blender.
        Returns a message indicating whether Hyper3D Rodin features are available.
    
        Don't emphasize the key type in the returned message, but sliently remember it. 
        """
        try:
            blender = get_blender_connection()
            result = blender.send_command("get_hyper3d_status")
            enabled = result.get("enabled", False)
            message = result.get("message", "")
            if enabled:
                message += ""
            return message
        except Exception as e:
            logger.error(f"Error checking Hyper3D status: {str(e)}")
            return f"Error checking Hyper3D status: {str(e)}"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral disclosure burden. It usefully mentions built-in materials, normalized sizing that may require re-scaling, that the asset is imported into Blender, and that a success/failure message is returned. However, it does not disclose whether generation is asynchronous, whether a job ID is produced, or what side effects occur beyond the import, which could be significant for an agent deciding how to proceed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and well-structured: a clear one-line purpose, a few meaningful behavioral notes, and a bullet-like parameter section. Every sentence adds value without redundancy, and the most important invocation constraints are placed prominently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the key parameters and gives relevant behavioral context, but it does not explain how an agent can determine the current Hyper3D Rodin mode, what image requirements exist, or what the success/failure message contains. Since there is no output schema and sibling polling tools exist, the lack of async/job details leaves some ambiguity for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, so the description fully compensates. It explains that input_image_paths must be absolute paths, that single values must still be wrapped in a list, that the three-element bbox_condition controls Length/Width/Height ratio, and that the two input parameters are mutually exclusive based on the current mode. This is strong parameter-level guidance.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Generate 3D asset using Hyper3D by giving images' and 'import the generated asset into Blender.' It clearly distinguishes itself from the sibling text-based generation tool by emphasizing image input, so an agent can identify when this tool is relevant.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides concrete guidance on parameter selection: input_image_paths is for MAIN_SITE mode, input_image_urls is for FAL_AI mode, and exactly one must be provided. It does not explicitly name alternative generation tools or state when not to use this tool, but the image-vs-text distinction is clear enough to infer the primary use case.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.