Skip to content

Mix

Blends between two input images using a mix factor and an optional per-pixel mask.

Category: Composite Menu path: Composite > Mix

Ports

PortTypeDirectionDescription
aimageRgba16finputFirst image (shown when mix = 0)
bimageRgba16finputSecond image (shown when mix = 1)
maskimageRgba16finputOptional mask image (luminance controls blend per-pixel)
outimageRgba16foutputBlended result

Parameters

ParamTypeDefaultDescription
mixscalar1.0Blend factor between A and B. 0 = fully A, 1 = fully B. Keyframeable.
invertMaskbooleanfalseInvert the mask so dark areas show B instead of A.

Expose Channels

When enabled (E button on node header), adds input ports that override params via edge connections:

PortTypeOverrides
mix_inscalarmix

How It Works

The shader performs a linear interpolation (mix) between images A and B. When no mask is connected, the mix parameter controls the blend uniformly across the entire image.

When a mask is connected, the shader computes the luminance of each mask pixel (Rec. 709 weights) and multiplies it by the mix factor to get the per-pixel blend amount. Bright mask areas show more of B, dark areas show more of A. The invertMask toggle flips this behavior.

The blending operates on all four channels (RGBA) simultaneously, so alpha is also interpolated between the two inputs.

Usage Examples

Basic: Crossfade between two images

  1. Connect image A and image B
  2. Keyframe mix from 0 to 1 for a smooth crossfade transition

Creative: Masked effect application

  1. Connect your original image to A
  2. Connect a processed version (e.g., blurred, color-corrected) to B
  3. Connect a mask (gradient, shape, or painted matte) to the mask input
  4. The effect is applied only where the mask is bright

Advanced: Animated reveal with mask

  1. Connect a clean plate to A and a stylized version to B
  2. Use a Noise node's texture output as the mask
  3. Animate the Noise evolution to progressively reveal B through a dissolving pattern

Tips

  • Mix defaults to 1.0 (showing B fully). Set to 0.5 for a 50/50 blend.
  • The mask input uses luminance, so a grayscale mask works as expected. Color masks are converted to grayscale automatically.
  • invertMask is useful when your mask is the opposite polarity of what you need, saving you from adding a separate Invert node.
  • Connect a Time node through Math to the mix_in expose channel for time-driven blending without keyframes.
  • Mix is different from Merge: Mix is a simple crossfade (A to B), while Merge is Porter-Duff compositing (foreground over background with alpha).
  • Merge -- Porter-Duff compositing with blend modes (for layering, not crossfading)
  • Matte -- extract and apply alpha masks
  • Blur -- common B input: blur the same image and mix with mask for selective focus