y3-gen-terrain-from-image

Convert 2D map images into Y3 Editor terrain CSVs and texture mappings.

2|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/y3-editor/y3-maker-config --skill y3-gen-terrain-from-image
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: y3-gen-terrain-from-image
Source: https://github.com/y3-editor/y3-maker-config/tree/main/skills/y3-gen-terrain-from-image
Command: npx skills add https://github.com/y3-editor/y3-maker-config --skill y3-gen-terrain-from-image

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires opencv-python, numpy, requests, scipy, Pillow, and includes scripts (resource) and references (resource) components.

What problem does it solve?

通过将用户上传的 2D 地图图片自动转换为 Y3 编辑器所需的地形数据、纹理映射和中间产物,显著减少人工逐格绘制的工作量并提高再现一致性。

Core Features & Use Cases

  • 将输入图片转为高分辨率聚类、陆地/水域分割、大陆连通分割以及纹理分配,输出 terrain_grid.csv、texture_grid.csv 等中间产物。
  • Round 2 支持装饰物识别及后续 MCP 写入,形成从图像到实体的完整工作流,适用于手绘草图、规划图和战略地图等场景。
  • 整体工作流依托仓库中的 CV 脚本(cv_cluster、cv_continent_split、gen_round1_csv、decoration_postprocess)实现确定性任务执行和纹理映射。

Quick Start

将输入的地图图片路径作为参数运行,生成 terrain_grid.csv 与 texture_grid.csv。

Frequently Asked Questions about y3-gen-terrain-from-image

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert a 2D map image into Y3 Editor terrain?

To convert a 2D map image into Y3 Editor terrain, run the script with the image path to generate terrain_grid.csv and texture_grid.csv. It applies computer vision-based water and continent segmentation for automated terrain reconstruction.

What image formats can I use for computer vision terrain generation?

Image-to-terrain generation processes standard image formats supported by OpenCV and Pillow, such as PNG and JPEG. The script analyzes the provided map image to segment water and continents for terrain CSV generation.

Does automated terrain reconstruction support adding decorations via MCP?

Yes, automated terrain reconstruction includes an optional Round 2 workflow that identifies decorations and writes them via MCP. This forms an end-to-end pipeline from image analysis to entity placement in the Y3 Editor.

Do I need Python dependencies to run the image to terrain CSV workflow?

Yes, the image to terrain CSV workflow requires OpenCV, NumPy, SciPy, and Pillow. These Python libraries execute the deterministic computer vision clustering, continent splitting, and texture mapping tasks.

What is the best way to generate terrain data from a hand-drawn sketch?

The best way to generate terrain data from a hand-drawn sketch is using this end-to-end computer vision pipeline. It processes planning maps and strategic sketches by applying high-resolution clustering and water segmentation to output terrain CSVs.