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

LayerStyle: DropShadow V3

Documentation for LayerStyle: DropShadow V3 Node

Overview

The LayerStyle: DropShadow V3 node is designed to apply a drop shadow effect to an image layer within the ComfyUI environment. It provides a versatile set of options to customize the appearance and placement of the shadow relative to the layer, enabling users to achieve various stylistic effects.

Purpose

The primary purpose of this node is to enhance image compositions by adding depth and dimension through shadowing. It is suitable for design projects where shadowing effects are necessary to give visual separation between image elements.

Inputs

The LayerStyle: DropShadow V3 node accepts several inputs that allow users to customize their drop shadow effect:

Required Inputs

  1. Layer Image (IMAGE):

    • The main image layer to which the drop shadow will be applied.
  2. Invert Mask (BOOLEAN):

    • Default: True
    • Inverts the provided mask, useful for fine-tuning the areas affected by the shadow.
  3. Blend Mode (ENUM):

    • Determines how the shadow blends with the existing background image.
  4. Opacity (INT):

    • Default: 50
    • Range: 0 to 100
    • Controls the transparency level of the shadow.
  5. Distance X (INT):

    • Default: 25
    • Range: -9999 to 9999
    • Specifies the horizontal offset of the shadow from the layer.
  6. Distance Y (INT):

    • Default: 25
    • Range: -9999 to 9999
    • Specifies the vertical offset of the shadow from the layer.
  7. Grow (INT):

    • Default: 6
    • Range: -9999 to 9999
    • Adjusts the expansion size of the shadow mask.
  8. Blur (INT):

    • Default: 18
    • Range: 0 to 1000
    • Determines the softness of the shadow edges.
  9. Shadow Color (STRING):

    • Default: "#000000"
    • Sets the color of the shadow.

Optional Inputs

  1. Background Image (IMAGE):

    • The image serving as the background context for the layer and shadow.
  2. Layer Mask (MASK):

    • Defines the specific areas of the layer image that will be affected by the drop shadow.

Outputs

The node produces the following output:

  1. Image (IMAGE):
    • The resultant image with the applied drop-shadow effect, ready for further processing or final export.

Usage in ComfyUI Workflows

This node can be seamlessly integrated into ComfyUI workflows to enhance graphical compositions. Users can utilize it to make certain elements of an image stand out by adding a visually appealing shadow.

Typical use cases include:

  • Applying shadow effects to text layers in promotional graphics.
  • Creating depth for layered digital illustrations.
  • Enhancing user interface components to add a three-dimensional look.

The ability to customize blend modes, opacity, and shadow offsets allows for creative flexibility, enabling designs that range from subtle shadow effects to bold, impactful outlines.

Special Features or Considerations

  • Batch Processing: The node can handle multiple images at once, which is useful in scenarios requiring consistent shadow application across several elements.

  • Dynamic Masking: Flexibility in masking allows users to target specific regions of an image for shadowing, enabling intricate designs and special effects.

  • Customization Options: Users have ample control over the shadow's appearance, ensuring the style matches a wide variety of design aesthetics and project requirements.

Overall, the LayerStyle: DropShadow V3 node is a robust tool for anyone looking to add depth and professionalism to their digital artworks in ComfyUI.