ComfyUI-KJNodes
Run ComfyUI Easily with InstaSD
Skip the complex setup. InstaSD helps creative professionals build workflows and deploy them to the world:
- One-click deployment
- Any model, any node
- Powerful GPUs for rapid iteration
Available Nodes
CreateShapeImageOnPath
ComfyUI Node Documentation: CreateShapeImageOnPath
Overview
The CreateShapeImageOnPath node is part of the ComfyUI-KJNodes plugin suite for ComfyUI. This node is used to generate images with predefined geometric shapes (circle, square, or triangle) positioned according to a series of specified coordinates. The generated shapes are drawn on a canvas with customizable dimensions and colors. It is designed to facilitate visual effects in image processing or animation workflows within ComfyUI.
Inputs
The CreateShapeImageOnPath node accepts the following inputs:
-
Shape Type
- Options:
circle,square,triangle - Description: Specifies the type of shape to draw.
- Options:
-
Coordinates
- Type: String (formatted as a JSON array)
- Description: A series of coordinate points that dictate where the shapes will be centered on the canvas.
-
Frame Width
- Type: Integer
- Description: Defines the width of the canvas on which the shapes will be drawn. Default is 512.
-
Frame Height
- Type: Integer
- Description: Defines the height of the canvas on which the shapes will be drawn. Default is 512.
-
Shape Width
- Type: Integer
- Description: Specifies the width of the shapes. Default is 128.
-
Shape Height
- Type: Integer
- Description: Specifies the height of the shapes. Default is 128.
-
Shape Color
- Type: String
- Description: Sets the color of the shapes using color names or hexadecimal color codes. Default is 'white'.
-
Background Color
- Type: String
- Description: Sets the background color of the canvas using color names or hexadecimal color codes. Default is 'black'.
-
Blur Radius
- Type: Float
- Description: Optional input to apply Gaussian blur to the shapes, useful for creating softer edges. Default is 0.0 (no blur).
-
Intensity
- Type: Float
- Description: Controls the intensity of the shape's appearance. Default is 1.0.
-
Size Multiplier (Optional)
- Type: Float (list)
- Description: A list that allows each shape's size to be multiplied by a specific factor, providing dynamic resizing capabilities along the path.
-
Trailing (Optional)
- Type: Float
- Description: Sets the amount of overlap between shapes in the sequence. Used to create a visual trailing effect. Default is 1.0.
Outputs
The CreateShapeImageOnPath node produces the following outputs:
-
Image
- Type: Image Tensor
- Description: A batch of images containing the shapes over each specified coordinate, rendered onto a defined background.
-
Mask
- Type: Image Tensor
- Description: A mask corresponding to the shapes in the generated images. This can be used for blending operations or further image processing.
Usage in ComfyUI Workflows
In a ComfyUI workflow, the CreateShapeImageOnPath node can be utilized for:
- Visual Effects: Adding geometric shapes at specific locations on an image, which can be useful in graphic design, animations, or video overlays.
- Compositing: Serving as a compositing layer to blend with existing images or multimedia content, especially when combined with other nodes that handle color adjustments, layering, and transformations.
- Animation: By providing different sets of coordinates and using the
Size MultiplierandTrailingoptions, this node can create animated effects where shapes appear to move dynamically across the canvas.
Special Features and Considerations
- Coordinate Input: The node relies on a series of coordinate inputs formatted as strings. These determine where each shape's center will be placed on the canvas.
- Dynamic Resizing: The
Size Multiplierinput allows each shape to be resized individually, leading to animated sequences where shapes grow or shrink as they move along the path. - Trailing Effect: By utilizing the
Trailinginput, users can create effects where shapes seem to leave trails, adding depth to animations. - Color Customization: Both the shape and background colors can be precisely defined, offering flexibility in color management for various creative needs.
- Blurring Capability: Applying a selectable blur radius can soften the edges of the shapes, making them blend more naturally in scenes or composite images.
Overall, the CreateShapeImageOnPath node extends ComfyUI's capabilities by providing a versatile tool for shape-based image manipulation and animation effects.