
contour-to-mesh
Build Blender mesh surfaces directly from extracted 2D contours/masks instead of approximate primitives. Use for 1:1 mascot/logo reconstruction, exact leaf/petal silhouettes, filled wireframe shapes, shallow bas-relief forms, or when the model outline must match a front template before adding depth.
- Installs
- 811
- Last 24h
- +22
- Trending rank
- #5495
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/roble3/cc-blender-skill --skill contour-to-mesh- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads contour-to-mesh automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
MCP backend
Use when: Source-locked contour-derived meshes, silhouette-first modeling, triangulated mask/contour surfaces, mesh generation from OpenCV contours, or replacing generic ellipses/primitives with measured shapes.
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.
Contour to Mesh
Use this when a reference silhouette is the contract. The mesh starts as a filled 2D contour in front-view X/Z, then gets shallow Y depth/crown after validation.
Workflow
- Extract or select a clean contour/mask for one structural part.
- Generate a triangulated mesh recipe with
scripts/mask_to_mesh_recipe.py. - Run the generated Blender Python to create a named
GEO_*mesh. - Assign front-projected UVs immediately.
- Add depth only as a modifier or vertex displacement that preserves X/Z boundary positions.
- Validate the front render against the source mask.
Hard rules
- Do not use radial duplication unless the manifest says the source is symmetric.
- Do not use a generic ellipse if a contour exists.
- Boundary vertices must keep source X/Z coordinates.
- Depth deformation may move Y and inner vertices, but must not alter front silhouette.
- One structural source part should become one named structural mesh.
Blender pattern
Generated mesh coordinates should map image x to Blender X and image y to Blender Z with vertical flip. Use Y only for thickness/depth.
Front-plane rotation rule
In this Blender coordinate convention, the front camera looks along the Y axis and the reference silhouette lives in the X/Z plane. Therefore 2D rotations inside the front view are rotations around the Y axis, not around Z. Use rotation_euler = (0, angle, 0) for 2D component orientation in the front projection. Z rotation spins objects into/out of screen-space incorrectly for X/Z-plane meshes.
Sources distilled
- Blender Mesh API: create meshes from vertices/faces using
from_pydata. - Blender BMesh: use for cleanup, triangulation, normals, smoothing.
- OpenCV contours: detect and simplify boundaries.
- Delaunay triangulation: useful for filled interior meshes when filtered by mask containment.
Part-inventory handoff
When masks come from source-part-segmentation, preserve the part_inventory.json names in Blender:
GEO_<part_name>, MAT_<part_name>, and UV layer names. Mesh generation must record:
- source image size;
- source mask path;
- contour boundary point count;
- boundary landmark points (tip, base-left, base-right, centroid/extrema) when detectable;
- atlas UV rectangle or projection mode.
For exact mascot/logo work, generate boundary vertices from the contour and add interior vertices only for surface support. The boundary is a contract: bevels, solidify, subdivision, shrinkwrap, or sculpt passes must not move front-view X/Z boundary vertices unless a new source mask is produced.
Hole and stroke policy
- Filled structural masks become meshes.
- Wireframe strokes guide boundaries/landmarks; they are not structural meshes unless the manifest classifies them as decorative linework.
- Holes/negative regions should be kept as separate cut masks when they affect silhouette; otherwise implement them as decals/material masks.
Source-locked front-skin fallback
When a design sheet is painterly/stylized and separate orthographic views are not CAD-consistent, use a front-skin pass before sculptural interpretation:
- choose the canonical front/master source;
- extract the visible subject mask as a filled contour;
- create a shallow 2.5D mesh whose X/Z boundary is that contour;
- assign full-image front-projected UVs so the rendered front matches the source pixels;
- add depth only along Y and behind the front surface;
- optionally add separate relief/backing parts for side plausibility, but keep the front skin as the visual acceptance gate.
This is a generic fallback for logos/mascots where a faithful front read is more important than speculative volume. Mark it as front_locked_visual_skin, not as a fully solved turntable model.
Script
scripts/source_locked_skin_recipe.pyextracts a largest/canonical foreground component and emits a mask + contour mesh recipe using full-image front-projected UV coordinates.
FAQ
What does the contour-to-mesh skill do?
Build Blender mesh surfaces directly from extracted 2D contours/masks instead of approximate primitives. Use for 1:1 mascot/logo reconstruction, exact leaf/petal silhouettes, filled wireframe shapes, shallow bas-relief forms, or when the model outline must match a front template before adding depth.
How do I install contour-to-mesh?
Run npx skills add https://github.com/roble3/cc-blender-skill --skill contour-to-mesh in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/contour-to-mesh/ (personal) or .claude/skills/contour-to-mesh/ (project).
Which AI agents can use contour-to-mesh?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is contour-to-mesh safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains contour-to-mesh?
It is published by roble3 in roble3/cc-blender-skill. It has 811 recorded installs.
More from roble3/cc-blender-skill
blender-modeling
roble3/cc-blender-skill
Create and edit 3D meshes in Blender — primitives, hard-surface modeling, mesh operators, modifier stacks (Bevel, Subdivision, Boolean, Mirror, Array, Solidify), bmesh-level edits, retopology basics. Use whenever the user asks to "make/model/create/build a 3D object", "shape/sculpt this", "add a cube/sphere/cylinder/etc.", "extrude/inset/bevel this face", "add a modifier", or any geometry-creation request that isn't a wireframe trace. Make sure to use this skill even if the user does not say "model" — also covers "make a sword", "build a chair", "add a door", "carve out a hole". Pairs with blender-materials for look-dev and blender-pro-workflow for full pipelines.
blender-materials
roble3/cc-blender-skill
Create and assign PBR materials in Blender via Principled BSDF — metals, glass, plastic, fabric, skin, organics. Covers physically-based material recipes with real-world values, Coat layer (varnish/car paint), Sheen (cloth), Subsurface scattering (skin/wax), Transmission (glass), and procedural patterns (wood grain, marble, fabric weave). Use whenever the user asks to "make it look like X material", "give it a metallic finish", "apply a wood texture", "make this glass / plastic / brushed steel / leather / skin", or any look-development request. Make sure to use this skill even if the user does not say "material" — also covers "make it shiny", "matte finish", "looks like copper", "rough surface". Works with any geometry; pairs with blender-lighting (materials only look right under proper lighting).
blender-export
roble3/cc-blender-skill
Export Blender scenes to glTF/GLB (web/AR), FBX (game engines), OBJ (universal), USD (VFX pipelines), STL (3D printing). Includes Unreal collision hulls and Multires normal-map baking for low-poly export, per-format settings, embed/unpack textures, axis conversion, polygon optimization (Decimate), and target-platform validation. Use whenever the user asks to "export this", "save as glTF / FBX / OBJ / STL / USD", "package for Unity / Unreal / Three.js / web / AR / 3D print", or any output format conversion. Make sure to use this skill even if the user does not say "export" — also covers "package this for the web", "make it work in Unity", "send to Unreal", "save for 3D printing".
blender-rendering
roble3/cc-blender-skill
Render Blender scenes with the right engine and settings — Cycles for photoreal, EEVEE for speed/stylized, sample counts, denoising (OptiX/OIDN), light path tuning, color management (AgX/Filmic), file output (PNG/EXR/MP4), animation rendering. Use whenever the user asks to "render this", "produce an image", "render a frame / animation", "make a final image", "save the render", or any output-generation request. Make sure to use this skill even if the user does not say "render" — also covers "make a picture", "save the result", "produce a final image", "export as image".
blender-animation
roble3/cc-blender-skill
Animate objects, cameras, lights, and properties in Blender — keyframes, F-curves, easing (Bezier, Linear, Sine, Bounce, Elastic), shape keys (morph targets / blendshapes / visemes), drivers (Python expressions on properties), NLA actions for reuse and layering. Use whenever the user asks to "animate this", "make it move / rotate / scale over time", "add keyframes", "loop / oscillate", "shape key / morph / blendshape", "visemes for lip sync", or any time-based property change. Make sure to use this skill even if the user does not say "animate" — also covers "spin it slowly", "make it wave", "fade in / out", "pulse", "facial expression".
blender-pro-workflow
roble3/cc-blender-skill
End-to-end production workflow guidance for Blender — the order to assemble scenes (block-out → camera → light → forms → materials → detail → render → composite → export), critique protocols, time budgets, and recovery patterns. Use whenever the user asks to "make a complete scene / hero shot / production-quality render", "what's the right order to do this", "set up a full pipeline", or has a multi-step request crossing modeling + lighting + materials + rendering. Make sure to use this skill for any request that spans multiple phases of 3D work, even if the user does not say "workflow" — also covers "make a final image of X", "produce a hero render", "professional-looking result".
Popular other skills
hyperframes-cli
heygen-com/hyperframes
The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.
triage
mattpocock/skills
Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.
ask-matt
mattpocock/skills
Ask which skill or flow fits your situation. A router over the skills in this repo.
to-questionnaire
mattpocock/skills
Turn a decision you can't fully answer into a questionnaire for someone else to fill in.
loop-me
mattpocock/skills
Grill me about specs for the workflows I want to build, within this workspace.