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: InnerShadow V2

ComfyUI Node Documentation: LayerStyle: InnerShadow V2

1. Introduction

The LayerStyle: InnerShadow V2 node is designed to apply a sophisticated inner shadow effect to a given layer within an image. This effect enhances the visual depth of the image by simulating shadow within the boundaries of an image element, creating an illusion of dimensionality or raising the element off the background.

2. Inputs

The node accepts several inputs to customize the inner shadow effect:

  • Background Image: The image that will serve as the backdrop for the layer on which the shadow effect is applied.

  • Layer Image: The primary focus image to which the inner shadow will be applied, layered over the background image.

  • Invert Mask (Boolean): A toggle to decide if the mask should be inverted. Default is True.

  • Blend Mode: Determines the mode of blending the shadow with the layer.

  • Opacity (Integer): Controls the transparency level of the shadow. It ranges from 0 (fully transparent) to 100 (fully opaque), with a default value of 50.

  • Distance X (Integer): Specifies the horizontal distance by which the shadow is offset. Positive values move the shadow to the right, while negative values move it to the left. The default is 5.

  • Distance Y (Integer): Specifies the vertical distance by which the shadow is offset. Positive values move the shadow downwards, while negative values move it upwards. The default is 5.

  • Grow (Integer): Expands the size of the shadow effect around the object. This can be set from very small to very large values to achieve the desired spread, with a default of 2.

  • Blur (Integer): Sets the softness of the shadow edge by blurring it. Higher numbers give a softer shadow. The range is from 0 to 100, defaulting at 15.

  • Shadow Color (String): Determines the color of the shadow, specified in hex format (e.g., #000000 for black).

  • Layer Mask (Optional): An additional mask to refine the shadow region. If not provided, it defaults to using the alpha channel of the layer image.

3. Outputs

  • Image: The node outputs an image with the inner shadow effect applied to the layer image. This image is ready to be combined with other elements in the workflow or used as a final asset.

4. Usage in ComfyUI Workflows

This node is useful in designing workflows that require visual effects to bring attention to certain elements by enhancing depth perception.

For instance, if you're creating a graphic design involving multiple layers of text and images, utilizing the InnerShadow V2 node can help emphasize specific layers, creating a more attractive and professionally finished product. This can be particularly useful in UI/UX design, enhancing text legibility against backgrounds, or simply adding aesthetic value through shadows.

To use it effectively:

  1. Input your background and layer images.
  2. Adjust the shadow effect through parameters such as distance, blur, grow, and opacity to suit the visual context.
  3. Apply masks where necessary to constrain the shadow effect only to desired areas.
  4. Utilize blend modes to achieve the right integration of shadow with the layer and background.

5. Special Features or Considerations

  • Masking and Inversion: The node supports complex masking operations, offering the ability to invert masks where necessary, adding versatility to how shadows are applied.

  • Dynamic Batch Processing: If there are multiple images, InnerShadow V2 can process them in batches, making it efficient for larger tasks.

  • Customization: Each parameter from shadow color to distance, grow, and opacity offers extensive customization options allowing for tailored design outputs.

  • Color and Dimension: Shadow colors can be set in any hex value, while distances (X and Y) cater from minute shifts to significant movements, offering high control over the visual outcome.

Incorporate the Inner Shadow V2 node to elevate your design tasks, using its flexible options to tailor the shadow effect precisely to your project's needs.