LayerStyle

2167
By chflame
Updated 15 days ago
View on GitHub →See Common Issues →

A set of nodes for ComfyUI that can composite layer and mask to achieve Photoshop like functionality.

Available Nodes

LayerMask: MaskMotionBlur

LayerMask: MaskMotionBlur Node Documentation

Overview

The LayerMask: MaskMotionBlur node is a powerful tool designed to apply motion blur to image masks in ComfyUI. By implementing motion blur effects, this node provides a means of adding dynamic blur to particular areas of an image, as defined by a mask. This can be especially useful for creating realistic motion effects or adding artistic flair to various parts of an image.

Inputs

The MaskMotionBlur node accepts the following inputs:

  • mask: This is the primary input that the node operates on. A mask is essentially a greyscale image that defines which parts of a larger image should be affected or unaffected by certain effects, using shades of grey to determine the level of influence.

  • invert_mask: A Boolean option (true or false) that determines whether the mask should be inverted before applying the motion blur. By default, this is set to true, meaning the node will initially invert the mask, turning black areas into white and vice versa.

  • blur: An integer value that sets the intensity of the motion blur effect. It can range from 1 to 9999, allowing for fine-tuning of the blur strength from subtle to very pronounced motion effects. The default value is set to 20.

  • angle: A floating-point value that dictates the direction of the motion blur in degrees. The angle can vary from -360 to 360 degrees, where each degree represents a possible direction for the blur. The default angle is set to 0 degrees.

Outputs

The node produces a single output:

  • mask: The output is a processed mask with the applied motion blur effect. This enhanced mask can replace or be further manipulated in conjunction with other image processing tasks within the workflow.

Usage in ComfyUI Workflows

In a typical ComfyUI workflow, the LayerMask: MaskMotionBlur node can be integrated to achieve the following:

  1. Highlight Motion: In scenes where motion needs to be emphasized, such as dynamic actions or moving objects, this node can add the necessary blur to specific areas, helping convey speed or motion.

  2. Artistic Effects: For creative compositions, selectively blurring parts of an image can draw attention to focal points or add a dream-like quality to the design.

  3. Compositional Adjustments: By adjusting the mask through motion blur, designers can subtly change the perception of depth and focus within an image.

Special Features and Considerations

  • Mask Inversion: The node's ability to invert a mask prior to processing offers flexibility. Users can decide whether they want to blur the initially masked areas or the unmasked ones, depending on their creative needs.

  • Customizable Blur and Angle: With a broad range of values for both blur intensity and direction, users can fine-tune the motion blur effects to match the specific requirements of their project.

  • Multiple Mask Support: The node can efficiently process multiple masks at once, making it suitable for complex compositions requiring varied blur effects across different areas.

In summary, the LayerMask: MaskMotionBlur node in ComfyUI is an advanced feature for applying motion blur effects to masks, offering customization and flexibility to enhance graphic projects with dynamic visual movement.