π Drop Shadow
Drop shadows without leaving ComfyUI β and they're good ones
- image
- mask
- image
- mask
- rgba_image
- shadow_rgba
- shadow_mask
Every compositor's dirty secret is that a decent drop shadow takes about five fiddly steps in a pixel editor, and doing it in ComfyUI used to mean hand-building a blur, a shift, a composite, and a mask from scratch. The Drop Shadow node from the Orion4D Layer Manager pack collapses all of that into one node with a visual editor: pick the shadow direction, drag the blur, hit Apply, and it hands you a clean RGBA result plus the shadow as its own mask. If you're doing product shots, floating cards, or "subject on a new background" work, this is the one you'll reach for.
How it works
The pipeline is classic shadow math, and it reads like a Photoshop recipe: take the image's alpha channel (or your mask), scale it to the canvas, center it, dilate by shadow_spread, shift by the offset, run a Gaussian blur by shadow_blur, tint with shadow_color, and composite under the object. In outer mode the shadow grows out from the object's edges; in inner mode it's computed as alpha Γ (1 β inner_seed), which gives you that soft shadow inside the shape - the pressed-button look.
Two outputs deserve a callout: shadow_rgba and shadow_mask. Most drop shadow nodes just flatten everything and dare you to like it. This one hands you the shadow as its own layer, which is huge if you want to blur it separately, recolor it later, or animate it - the compositing work is already done for you.
The inputs that matter
image- required. The shadow is built from the image's alpha channel if it has one; otherwise the whole image is treated as opaque.mask- optional, and the trap lives here. The code computes alpha as1 β mask, the ComfyUI-inverted convention. If you feed a "keep the object" mask (white on your subject, the normal way you'd think about it), the object reads as transparent and the shadow wraps the background instead. Flip the mask - black on your object - and it works. There's no toggle for this, unlike Layer Manager'sinvert_input_masks, so flip it upstream.scale_percent- object size relative to the canvas, default β15 (i.e. shrink 15%). The canvas iscanvas_widthΓcanvas_height(both default 1024); the object is centered and scaled onto it.shadow_spread,shadow_blur,shadow_offset_x/shadow_offset_y,shadow_opacity- spread grows the shadow seed, blur feathers it (default 24), the offsets move it (default 24/24), opacity caps it (default 0.55).shadow_mode-outerorinner.shadow_color,background_mode,background_color- the tint, and whether the canvas behind everything is transparent or a solid color. Transparent keeps a true RGBA out; color gives you a flattened, viewable image.
Outputs
image (RGB flattened on the background color), mask (the composite alpha), rgba_image (true transparency preserved), shadow_rgba (the shadow alone, tinted), and shadow_mask (the shadow's alpha). Five sockets, but the ones you'll actually wire are rgba_image for further compositing and shadow_mask when you want to grade the shadow by hand.
Install
No model downloads, no extra deps - just the NumPy/Pillow/PyTorch ComfyUI already has:
cd ComfyUI/custom_nodes
git clone https://github.com/orion4d/Orion4D_layer_manager
Restart ComfyUI. Manager users: search Orion4D_layer_manager under "Install Custom Nodes." Presets live in presets_shadows/ (the pack ships "Hard Shadow" and "Soft Shadow") and you can save your own from the editor.
Common issues
- Shadow hugs the background instead of the object. Your mask is flipped - see the note above. Flip it and rerun.
- App window won't open. Allow pop-ups for your local ComfyUI address.
- Big blurs are slow. Gaussian blur on large canvases is the pack's documented hot spot. A 4096px canvas with blur at 200+ will make you wait; work at preview size and upscale the composite later.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | β | |
| canvas_width | INT | 10241β8192 | β |
| canvas_height | INT | 10241β8192 | β |
| scale_percent | FLOAT | -15.0-99β500 | β |
| shadow_mode | COMBO | outer | 2 options: outer, inner |
| shadow_spread | INT | 00β256 | β |
| shadow_blur | FLOAT | 24.00β256 | β |
| shadow_offset_x | INT | 24-4096β4096 | β |
| shadow_offset_y | INT | 24-4096β4096 | β |
| shadow_opacity | FLOAT | 0.550β1 | β |
| shadow_color | STRING | #000000 | β |
| background_mode | COMBO | transparent | 2 options: transparent, color |
| background_color | STRING | #FFFFFF | β |
| maskopt | MASK | β |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | β |
| mask | MASK | β |
| rgba_image | IMAGE | β |
| shadow_rgba | IMAGE | β |
| shadow_mask | MASK | β |