360 Secure SkillHub
360 安全技能中心

texture-driven-mesh-fitting

该 Skill 说明如何在 Blender MCP 环境中:从纹理、图集或线框区域提取源轮廓,建立有序轮廓对应关系,移动边界顶点与内部顶点完成网格拟合,并保留 UV 参数化。它还附带脚本,用于报告源遮罩与渲染遮罩之间的包围盒、质心和采样轮廓偏差。内容以流程与验收规则为主,未包含拟合算法实现。

RobLe3
热度 0.00
最近更新 2026-10-19 02:52:34
分类:创作依赖:MCP 服务 / 代码执行 / 读写文件应用场景:工作流 / 品牌素材

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add roble3/cc-blender-skill/texture-driven-mesh-fitting
Metadata
name
texture-driven-mesh-fitting
description
Reshape source-locked mesh boundaries so the geometry fits texture-atlas or decal contours 1:1 before final UV/material work. Use when textures look off because the model behind them does not match the source texture region, or when the mesh must adapt to the texture instead of stretching the texture onto an approximate mesh.
allowed-tools
Read Bash Glob Grep mcp__blender__execute_blender_code mcp__blender__get_object_info mcp__blender__get_objects_summary mcp__blender__get_object_detail_summary mcp__blender__render_viewport_to_path mcp__blender__search_api_docs mcp__blender_official__execute_blender_code mcp__blender_official__get_objects_summary mcp__blender_official__get_object_detail_summary mcp__blender_official__render_viewport_to_path mcp__blender_official__search_api_docs

MCP backend

Use when: Texture-driven geometry fitting, mesh boundary fitting to atlas masks, UV-preserving contour correspondence, point/landmark deformation, source mask to mesh repair.

Before the first Blender call, read ../text-to-blender/references/mcp-backends.md. Prefer official MCP for shared capabilities; preserve the selected backend for the whole task. Tool names in recipes are client/legacy examples: map them through that reference and its agent-host guide.

Texture-Driven Mesh Fitting

This skill fixes the common failure: a texture is mapped correctly, but the mesh silhouette underneath is wrong. The mesh adapts to the source contour; the texture is not stretched to hide a wrong mesh.

Preconditions

  • Structural parts are segmented (source-part-segmentation).
  • Each part has a contour/mask and, if textured, an atlas region (atlas-uv-fitting).
  • The object is source-locked in front X/Z before depth is added.
  • Canonical view policy is resolved (multiview-constraint-solver) if views conflict.

Workflow

  1. Extract source contour from the texture/wireframe region.
  2. Extract current mesh boundary in the same projected coordinate space.
  3. Build ordered contour correspondence by arc length, named landmarks, or seam/control points.
  4. Move boundary vertices to source contour positions.
  5. Move interior vertices by smooth interpolation, piecewise-affine warp, or thin-plate-spline style deformation.
  6. Preserve UV parameterization by remapping boundary-fitted local coordinates into the atlas rectangle.
  7. Re-render overlay; do not proceed to look-dev until texture-region silhouette passes.

Acceptance gates

  • Per-part source/product bbox center and size within tolerance.
  • Boundary maximum sample error below tolerance after normalization.
  • Texture atlas region does not visibly bleed outside the fitted mesh in front view.
  • Named landmarks (leaf_tip, base_left, base_right, face_corner, etc.) pass landmark-fit-repair.

Hard rules

  • If a texture crop has a different silhouette than the mesh, reshape the mesh first.
  • Do not use global UV stretching to hide geometry mismatch.
  • Boundary fitting must happen before side-depth/crown deformation.
  • Do not tune material/light to compensate for geometry/UV misfit.

Scripts

  • scripts/contour_correspondence_report.py reports bbox, centroid, and sampled contour deltas between a source mask and a render/object mask.

Sources distilled

  • Piecewise-affine/landmark warping gives a practical mesh deformation model.
  • Thin-plate-spline style deformation is appropriate for smooth mascot/logo surfaces when landmarks are sparse.
  • Blender mesh vertices/UV layers can be edited directly; BMesh is useful for cleanup after deformation.