source-part-segmentation
Segment overlapping visual parts from source images, wireframes, texture atlases, and decals before mesh reconstruction. Use when a mascot/logo/template contains touching or overlapping components and exact structural part masks are needed before contour-to-mesh, UV fitting, or landmark repair.
How do I install this agent skill?
npx skills add https://github.com/roble3/cc-blender-skill --skill source-part-segmentationIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill provides localized image segmentation utilities using the OpenCV library. It processes local image files and JSON manifests to generate component masks and inventories. The skill operates entirely within the local environment, with no network activity, command execution, or other malicious patterns detected.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
Source Part Segmentation
Use this before contour-to-mesh when a source image contains overlapping or touching designed parts.
The output is not “nice masks”; it is a source-of-truth part inventory that downstream geometry must obey.
Inputs
- source image, wireframe, decal, or texture atlas;
- optional manual seed manifest with named parts, polygons, seed points, rough rectangles, or HSV/color ranges;
- source manifest with structural/decorative/context classification and expected part count.
Workflow
- Choose the cleanest modality: alpha, edge, dark-line, bright-on-dark, color-band, or atlas region.
- Extract contours and hierarchy to identify candidate objects, holes, nested details, and strokes.
- If components touch, run distance-transform marker watershed first.
- If watershed over/under-splits, switch to seeded segmentation:
- create named part seeds (
bbox,polygon, orseed_point+ optional flood/HSV tolerance); - save one mask per named structural part;
- mark ambiguous overlaps explicitly instead of merging them.
- create named part seeds (
- Classify masks as
structural,decorative,face_feature,aura_context, orvalidation_only. - Pass structural masks to
contour-to-mesh; pass feature masks/landmarks tolandmark-fit-repair; pass atlas regions toatlas-uv-fitting.
Hard rules
- Do not infer repeated parts from symmetry; segment what the source shows.
- Do not merge overlapping components if the manifest expects separate structural meshes.
- Do not proceed to final modeling when part count differs between source images; write a conflict report or canonical policy.
- If automatic segmentation is ambiguous, write an ambiguity report and require or create manual seed rectangles/points.
- Keep stroke/line masks separate from filled-part masks; wireframe strokes are guides unless explicitly used as the contour boundary.
Seed manifest schema
{
"schema": "source_part_seed_manifest.v1",
"image": "path/to/source.png",
"parts": [
{"name":"leaf_top", "class":"structural", "bbox":[x,y,w,h], "mode":"non_background"},
{"name":"face_shell", "class":"structural", "polygon":[[x,y],[x,y],...], "mode":"polygon"}
]
}
Allowed mode values: polygon, bbox, non_background, dark_lines, bright_on_dark, hsv_range.
Scripts
scripts/segment_source_parts.pyproduces component masks and a JSON report from an image, with optional watershed.scripts/seeded_part_masks.pyconverts a named seed manifest into deterministic named masks and a part inventory.
Sources distilled
- OpenCV contours/hierarchy/moments are the base measurement layer.
- OpenCV distance transform + marker watershed is the first automated split method for touching components.
- Active contour refinement can improve a rough mask boundary after segmentation.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/roble3/cc-blender-skill/source-part-segmentation">View source-part-segmentation on skillZs</a>