Create vector lines
create_vector_linesCaptures a still image, generates a monochrome mask, traces vector lines, and composites a stylized overlay with adjustable threshold, blur, color, and width.
Instructions
Build a pulse-driven image-to-vector-lines system: capture a still frame from a synthetic, camera, file, or existing TOP source, prepare a monochrome mask, freeze it to a snapshot, trace it through a Trace SOP for editable vector geometry, generate a clean TOP line-art overlay, and composite it over the source. Phase 1 is intentionally not realtime: the artist presses the Vectorize pulse to update trace1/frozen_frame, keeping cook cost bounded. Source defaults to a static synthetic contour card so it previews without camera permissions or moving noise; camera is opt-in. Exposes Vectorize, Threshold, PreBlur, StepSize, Smooth/Fit/Border toggles, line color/width, opacity, overlay mode, and calibration knobs. Returns the container, source/prep/frozen/trace/vector/output paths, warnings for unverified Trace/snapshot details, and a preview.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name for the vector-line system COMP. | vector_lines |
| parent_path | No | Parent COMP where the system container is created. | /project1 |
| source | No | Image source. 'synthetic' is the safe default; 'camera' is opt-in; 'file' reads movie_file_path; 'existing_top' pulls existing_top_path through a Select TOP. | synthetic |
| existing_top_path | No | Existing TOP path used when source='existing_top'. | |
| movie_file_path | No | Movie/image path used when source='file'. | |
| camera_device | No | Optional camera device name for source='camera'. | |
| mode | No | Prep mode: foreground-oriented mask, mask-only, or full_frame edge/detail tracing. | hybrid_foreground |
| analysis_resolution | No | Capture/trace resolution [width, height] that bounds vectorization cost. | |
| threshold | No | Brightness/mask cutoff for the prep image and Trace SOP. | |
| pre_blur | No | Blur amount before thresholding/tracing to remove camera noise. | |
| invert | No | Invert the prepared mask before tracing. | |
| remove_borders | No | Remove dirty image borders in Trace SOP when supported. | |
| resample | No | Resample Trace SOP shapes to reduce excessive point density. | |
| step_size | No | Trace SOP resample step / simplification amount. | |
| smooth_shapes | No | Smooth traced shapes to reduce sharp camera-noise corners. | |
| fit_curves | No | Fit Trace SOP output to Bezier curves; off by default until live-probed. | |
| line_color | No | Vector material color as '#rrggbb'. | #49dcb2 |
| line_width | No | Wireframe line width where supported by the material. | |
| opacity | No | Opacity of the rendered vector overlay. | |
| overlay_mode | No | Composite TOP operand when show_source=true. | over |
| show_source | No | Composite the source image under the vector layer when true. | |
| expose_controls | No | Expose the Vectorize pulse plus prep/look/calibration controls. |