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.
Install
npx skills add https://github.com/roble3/cc-blender-skill --skill texture-driven-mesh-fittingSKILL.md
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
- Extract source contour from the texture/wireframe region.
- Extract current mesh boundary in the same projected coordinate space.
- Build ordered contour correspondence by arc length, named landmarks, or seam/control points.
- Move boundary vertices to source contour positions.
- Move interior vertices by smooth interpolation, piecewise-affine warp, or thin-plate-spline style deformation.
- Preserve UV parameterization by remapping boundary-fitted local coordinates into the atlas rectangle.
- 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.) passlandmark-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.pyreports 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.
Related skills
ai-image-generationgenmedia-labs713KGenerate and edit images on RunComfy via the `runcomfy` CLI — a smart router across the full image-model catalog: FLUX 2 (Klein 9B/4B, Pro, Dev, Flash, Turbo, Max), Google Nano Banana 2 / Pro, OpenAI GPT Image 2, ByteDance Seedream 5 / 4-5 / 4-0 and Dreamina 4-0, Alibaba Qwen Image and Z-Image Turbo, Wan 2-7. Covers both text-to-image (t2i) and image-to-image / edit (i2i) endpoints — the skill picks the right model for the user's actual intent (typography precision, photoreal portraits, sub-secoai-image-generation101-skills547KGenerate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FLUX.2 Klein LoRA, Gemini 3 Pro Image, Grok Imagine, Seedream 4.5, Reve, ImagineArt. Capabilities: text-to-image, image-to-image, inpainting, LoRA, image editing, upscaling, text rendering. Use for: AI art, product mockups, concept art, social media graphics, marketing visuals, illustrations. Triggers: flux, image generation, ai image, text to image, stnano-banana-2prime-skills424KGenerate images with Google Nano Banana 2 (Gemini-family flash-tier text-to-image) on RunComfy — bundled with the model's documented prompting patterns so the skill gets sharper output than naive prompting against the same model. Documents Nano Banana 2's strengths (rapid iteration, in-image typography rendering, predictable framing, optional web-grounded context), the resolution-tier pricing, the safety-tolerance dial, and when to route to Nano Banana Pro / GPT Image 2 / Flux 2 / Seedream insteimage-editprime-skills424KEdit images on RunComfy — this skill is a smart router that matches the user's intent to the right edit model in the RunComfy catalog. Picks Nano Banana Edit (batch up to 20, identity-preserving default), OpenAI GPT Image 2 Edit (multilingual in-image text rewrite, multi-ref composition, layout precision), Flux Kontext Pro (single-ref high-fidelity local edit), or Z-Image Turbo Inpaint (mask-driven precise region edit). Bundles each model's documented prompting patterns so the skill gets sharper