Aller au contenu

Shadow Node

By Kriss Norde

Shadow automatically generates a drop shadow from the alpha channel of an image. A simple X/Y offset + softness for a classic drop shadow, or Light Distance + a depth map for a shadow with realistic perspective. A must to separate titles, logos and objects from the background.

Overview

Shadow analyzes the alpha channel of its input, duplicates the silhouette, offsets/softens/colors it according to the settings, and merges it under the original image. Perfect for text, logos, UI and cut-out objects.

Two key modes: classic drop shadow (uniform offset) and perspective shadow (a shadow that widens with distance, like a real light source). The depth map option lets the shadow deform according to the relief of a background.

Where to find this node

  • Effects Library: Tools > Effect > Shadow
  • Quick add: right-click in the Node Editor → Add Tool > Effect > Shadow

Inputs

  • Input (orange) - a 2D image with an alpha channel (the source of the shadow).
  • Depth (green) - optional. A depth map of the background the shadow falls on. Deforms the shadow according to the relief (a shadow climbing a wall, for example).
  • Effect Mask (blue) - optional. Limits the shadow to an area.

Setup

Classic drop shadow:
Text+ → Shadow (Offset 5/-5, Softness 3) → Merge 2D FG
Background → Merge 2D BG

Shadow with a depth map:
Text+ → Shadow ← Depth (background map)
         ↓
       Merge 2D over the background

Shadow-only output (to process the shadow separately):
Logo → Shadow (Output = Shadow Only) → Color Corrector → Merge 2D

Controls tab

Shadow Offset (X / Y)
Position of the shadow relative to the object. A crosshair in the viewer to move it directly. A negative Y = a shadow going down (the classic shadow cast by a light from above).
Softness
Blur applied to the shadow. Low = a sharp shadow (a close point light), high = a blurry shadow (diffuse/ambient light).
Shadow Color
Color of the shadow. Avoid pure black in general - real shadows are colored (slightly tinted by the ambient light). Dark blue or blue-violet = a natural outdoor shadow.
Light Position
The virtual position of the light that creates the shadow. Determines the direction and angle of the cast shadow.
Light Distance
Distance between the light and the object. From 0 (very close) to infinity. See the dedicated section.
Minimum Depth Map Light Distance
Minimum distance used when a depth map is connected. Avoids artifacts in very close areas.
Z Map Channel
Which channel of the Depth input to use: RGB, Luminance, or Z-buffer (standard for 3D renders).
Output
Shadow Applied (default) = the image with the shadow merged in. Shadow Only = only the shadow on alpha, useful to process the shadow separately before compositing.

Light Distance: realistic perspective

The Light Distance parameter radically changes the nature of the shadow:

Infinite
A parallel shadow, exactly the size of the object (like sunlight). A uniform drop shadow.
Medium
A shadow slightly larger than the object that stretches with distance. An indoor lamp look.
Close (0)
A huge shadow, distorted like a conical projection. The effect of a candle close to the object, or a spotlight.

Tip: a low Light Distance + a high Softness = a cinema spotlight shadow, very theatrical.

Using a depth map

Connecting a depth map of the background to the Depth input lets the shadow deform according to the relief of the background. Use cases:

  • The shadow of an object falling on a sloped surface (stairs, ramp).
  • A shadow climbing up a wall behind a subject.
  • A shadow following the curve of fabric or a landscape.

The depth map must represent the distance of the background (near = white, far = black, or the reverse depending on the convention). Z Map Channel = Z-buffer if the depth comes from a 3D renderer.

Use cases

  • Classic text shadow - Text+ → Shadow (Offset 5/-5, Softness 2, bluish gray Color) → Merge 2D. A clean broadcast look.
  • Logo drop shadow for integration - a cut-out logo on a photo → a subtle Shadow (high Softness, Opacity 0.5) = a logo that seems to rest on the surface.
  • UI elements (cards, buttons) - in an animated interface, a soft Shadow for material depth (material design).
  • Shadow for a 3D character rendered without one - a character rendered with alpha + depth, Shadow with a depth map of the floor = a realistic integrated shadow without re-rendering the 3D.
  • Theatrical / spotlight shadow - a low Light Distance + a high Softness = a shadow that grows dramatically, for stylized cinema.
  • Shadow-only for customization - Output Shadow Only → Color Correct → bring it back in with a Merge. For radically colored shadows (e.g. a red shadow for a horror scene).

Tips

  • Never pure black - pure black does not look like a realistic shadow. Use a dark blue-gray (R 0.05, G 0.05, B 0.1) for a subtle result.
  • Proportional Softness - the larger the offset, the larger the Softness should be too. Offset 20 + Softness 2 = a shadow that is too hard. Offset 20 + Softness 10 = natural.
  • Double shadow for ambient occlusion - a first, very soft and close Shadow (contact shadow), then a second Shadow further away and blurrier (drop shadow). A richer result than a single shadow.
  • Infinite Light Distance for broadcast text - perfect uniformity along the whole length of the text. A low Light Distance is only for stylized effects.
  • Opacity on the Shadow Color - lower the alpha of the shadow color (in the color picker) rather than the overall Blend. It gives better control.
  • For a pro drop shadow workflow in motion graphics, prefer the 8 elements of Text+: add an Element in Text Fill mode with an Offset, Opacity and Softness - faster and built in.