DocsGRADEEffects

Pixel Stretch

6 min read

On this page

Pixel Stretch is the compositor classic: a line of pixels smeared out across the frame as flat streaks of colour, rows ending at different lengths. Stretch from a sample line through the whole view, only a band of rows, or from the edge of a subject, so a car stays sharp while the pixels of its edge streak behind it to the frame edge.

Studio categoryMedia & Glitch (Add Effect > Media & Glitch > Pixel Stretch)
Pipeline stagePost Colour, after Echo Trail (display colour, after the colour nodes)
Works inWhole View: everywhere (viewports, games, Image mode, captures, Movie Render Queue). Selected Actors, the other target sources and Target Edge: live views with Custom Depth
C++ / BlueprintFGradeLayer::Effects.PixelStretch (FGradePixelStretch), paths Effects.PixelStretch.<Field>
ReferencePixel Stretch parameters

Quick start

  1. Choose Add Effect > Media & Glitch > Pixel Stretch. It starts in Line mode: the column of pixels through the centre is smeared to the left edge.
  2. Move the line with Sample Point X / Y and turn the streaks with Direction (0 = right, 90 = up, 180 = left, 270 = down, any angle).
  3. Break up the ends with Streak Variation and Row Size.
  4. To stretch from a subject, set Mode to Target Edge, select the subject (for example the car) in the level and click Add Selected under Target Actors: Source switches to Selected Actors (see Target actors).

Modes

ModeWhat stretches
Line (default)A sample line through the Sample Point, across the streak direction: every pixel past it is replaced by the line's own pixel smeared out to the frame edge. With a target Source only the rows where the line crosses a target stretch.
BandLike Line, but only a band of rows (Band Width, centred on the Sample Point) stretches; the rest of the picture is untouched.
Target EdgeFrom the edge of the subject: it stays, and the pixels along its edge smear away from it in the streak direction to the frame edge. Sample Inset reads each streak's colour a few pixels inside the edge, past its anti-aliased outline. Needs a live view with Custom Depth; with Source = Whole View every object rendered to Custom Depth counts.

Sources

SourceReadsNeeds
Whole View (default)No mask: Line and Band stretch the whole viewNothing
Selected ActorsThe actors listed in the effect itself (see Target actors)Custom Depth-Stencil Pass = Enabled with Stencil, a live view. No Targets effect, nothing to change on the actors.
Targets EffectThe targets of the Targets effect on the same volume / layer stack (actors and Stencil Value targets). A target with Mode Label only and Label Never is only a mask.Targets on, Custom Depth-Stencil Pass = Enabled with Stencil, a live view
Custom Depth ObjectsObjects with Render CustomDepth Pass on: all of them (Stencil Value 0) or only those with one Custom Depth Stencil Value (1..255; GRADE uses 200..215 for the Targets effect, 216..240 for Objects / Actors layer masks and 241..243 for Selected Actors)A live view (Enabled with Stencil for a value)

Target sources are skipped in Image mode (the picture is unchanged) and when the project does not render Custom Depth. Parts of the subject hidden behind other geometry do not count. Keep Subject On Top (default on) keeps the subject's own pixels over the streaks; Mirror (Both Sides) streaks both ways.

Target actors

With Source = Selected Actors the panel shows the effect's own list of actors under Target Actors, like the Outliner:

  • Add Selected adds the actors selected in the level and switches Source to Selected Actors. Pick Actor adds one from the engine's actor picker (the list, or the eyedropper: click the actor in the viewport). Clear empties the list. Every change is one undo step.
  • Each row has an eye (switch the actor off without removing it), its label and x to remove it; not found in the loaded level marks a deleted actor or one whose level is not loaded.
  • Target Tag adds every actor with that tag (spawned ones included); Include Attached Actors (default on) adds what is attached to a target.

While the effect runs GRADE draws the visible meshes of these actors into the Custom Depth-Stencil pass with stencil 242 (243 when Echo Trail lists the same actor) and restores every mesh's own settings as soon as the effect is off, the actor leaves the list or the source changes; nothing of it is saved with the level. An actor that the Targets effect already draws keeps its Targets stencil (200..215) and is used as it is. GRADE reserves stencils 200..255 (216..240 are the layer masks' Objects / Actors values): keep your own meshes between 1 and 199. Without Custom Depth-Stencil Pass = Enabled with Stencil the panel shows an Enable button and the picture stays unchanged. From Blueprint, set Effects.PixelStretch.TargetActors, TargetTag and Source.

Settings

GroupSettingDefaultMeaning
StretchIntensity100Mix of the stretched pixels over the picture
StretchDirection180 degDirection the streaks run towards
StretchSample Point X / Y50 / 50Position of the sample point in the view (0..100: left to right, top to bottom)
Length & RowsLength Mode, LengthTo Frame Edge (%), 100Length as a percentage of the way to the frame edge, or Fixed (px) (600 px at 1080 lines by default)
Length & RowsGrow100How far the streaks have grown: animate it from 0 for streaks shooting out
Length & RowsStreak Variation45Rows end at different lengths (0 = all reach the full length)
Length & RowsRow Size6 pxHeight of the groups of rows that share one length: small = fine scratchy streaks, large = broad slabs
Length & RowsBand Rows (Quantize)0Quantize the rows into thicker flat bands of this many pixels (0 = off)
Length & RowsStart Offset, Feather, Soft Ends0 px, 2 px, 0Gap before the streaks start; soft transition from the original (and at the edges of a Band); soft streak ends (0 = crisp compositor cuts)
ColourColour Bleed0 pxNeighbouring rows blend, more towards the streak ends
ColourBrightness Falloff, Fade Out0, 0Streaks darken / become transparent towards their end
ColourSaturation, Tint100, whiteColour of the streaks
AnimateShimmer Speed0Each row's length breathes over time (scene time: pause-safe, identical in Movie Render Queue)
AnimateGlitch Jitter, Glitch Rate0, 8 HzRandom groups of rows jump sideways and change length in steps
AnimateSeed0Another pattern of row lengths and glitches

Pixel sizes refer to a 1080-line frame and scale with the output, so a 4K capture matches the viewport.

Looks

Two looks in the Creative group of the Presets panel: Pixel Stretch Streaks (Line, works everywhere) and Subject Speed Smear (Target Edge on Custom Depth objects: tick Render CustomDepth Pass on the subject, or switch its Source to Selected Actors and add the subject; live view).

Cost

  • Line and Band: about 0.04 ms at 1080p, one full-screen pass (about 0.06 ms with Colour Bleed).
  • Target Edge: about 0.1 ms at Low / Medium and 0.15 / 0.2 ms at High / Epic (an edge search at a quarter or half resolution, then one full-screen pass). The quality follows the Studio quality.