Nodes/RC Image Compositor/RC Drop Shadow
ComfyUI Node

RC Drop Shadow

Drop shadows that don't look pasted-on

By kj863257·Created 11 months ago·Updated 10 months ago· 16
RC Drop Shadow
  • image
  • IMAGE
distance5.0
angle135
size5.0
spread0.0
opacity0.75
fill_opacity1.00
color_r0
color_g0
color_b0
blend_modemultiply
auto_expand_canvastrue

Nothing screams "I composited this in five seconds" like a logo floating on a photo with no contact with the surface. A drop shadow is the cheapest way to fix that, and RC Drop Shadow is the Photoshop-compatible implementation of the effect that the RC Image Compositor pack is built around. Distance, angle, blur, spread, opacity, color, blend mode - it's all there, plus the auto-canvas expansion that keeps your shadow from getting chopped off at the edges.

This is a layer-effects node, so mentally it works like a Photoshop layer style rather than a filter. You feed it an image (ideally with transparency - a logo, text, a cutout), it renders the shadow behind the opaque pixels, and it can grow the canvas so the effect has room to breathe.

How it works

The shadow is generated from the image's alpha, offset by distance at angle (135° = bottom-right, Photoshop's default), blurred by size, and choked by spread (the classic spread/choke control). Then it's blended with blend_mode - multiply is the default and the right answer for realistic contact shadows; normal, color_burn, linear_burn, and darken are the alternatives for varying hardness.

Two controls deserve your attention:

  • fill_opacity - this is the "hollow text" trick. At 1.0 the image shows normally with a shadow. Drop it to 0.0 and you get only the shadow - a silhouette - which is how you do that ghost-text or embossed look.
  • auto_expand_canvas - on by default, and you want it on. When the shadow extends past the image bounds, the node expands the canvas to fit rather than clipping the shadow off. Turn it off only if you specifically want the effect clipped to the original canvas.

The inputs that matter

  • image - the input (use an RGBA image for real transparency).
  • distance / angle / size / spread / opacity - the five classic Photoshop shadow parameters.
  • fill_opacity / blend_mode / auto_expand_canvas - the less obvious ones above.
  • color_r/g/b - shadow color, 0–255. Black is the safe default; a colored shadow is a stylistic choice.

Output is a single IMAGE tensor, typically larger than the input when auto-expand is on.

How to install it

Part of the RC Image Compositor pack:

cd ComfyUI/custom_nodes
git clone https://github.com/kj863257/ComfyUI_RC_Image_Compositor
cd ComfyUI_RC_Image_Compositor
pip install -r requirements.txt

Restart ComfyUI, or install via ComfyUI Manager (search "RC Image Compositor"). Light deps: pillow, numpy, opencv-python.

Common issues

The big one: a drop shadow only means something if the input has an alpha channel. Feed it a solid, fully opaque image and the "shadow" appears behind nothing. Load with an alpha-preserving loader (the pack ships RC Load Image (Alpha) for exactly this).

Second, watch the canvas growth. Every time the node expands the canvas, downstream compositing nodes need to know the new size - if you're placing this shadowed logo with RC Image Compositor afterward, re-check your positioning, because the canvas just grew around your artwork.

And don't crank size and call it a day. Real shadows are soft and offset; a huge blur with a tiny distance looks like a glow, not a shadow. If you want a glow instead, the pack's RC Outer Glow node is the right tool, and its canvas-expansion behavior is built for that.

CategoryRC/Layer Effects

Inputs (12)

NameTypeDefaultDescription
imageIMAGE
distanceFLOAT5.00–100Shadow distance in pixels
angleFLOAT1350–360Shadow angle in degrees (135° = bottom-right)
sizeFLOAT5.00–100Shadow blur size in pixels
spreadFLOAT0.00–100Shadow spread (choke) in pixels
opacityFLOAT0.750–1Shadow opacity
fill_opacityFLOAT1.000–1Original image fill opacity: - 1.0: Normal image display - 0.0: Hollow effect, shadow only - 0.5: Semi-transparent image + shadow
color_rINT00–255Shadow color red component (0-255)
color_gINT00–255Shadow color green component (0-255)
color_bINT00–255Shadow color blue component (0-255)
blend_modeCOMBOmultiplyDrop shadow blend mode: - normal: Normal blending - multiply: Multiply, classic shadow - color_burn: Color burn, deep shadow - linear_burn: Linear burn, soft shadow - darken: Darken, gentle shadow
auto_expand_canvasBOOLEANtrueAuto expand canvas: - True: Auto expand canvas when shadow exceeds bounds - False: Shadow is clipped to original canvas size

Outputs (1)

NameTypeDescription
IMAGEIMAGE