Grain Dissolve

Grainy disintegration transition for Remotion - the outgoing scene breaks up into soft, film-grain shapes and the next scene condenses out of the noise

In Remotion, Grain Dissolve is a grainy disintegration transition: the outgoing scene breaks up into soft, film-grain shapes and the next scene condenses out of the noise, with an analog film and print feel. It is a TransitionSeries presentation, so it drops in between any two of your scenes.

Installation
$ pnpm dlx shadcn@latest add @remocn/grain-dissolve

How to make a grainy film dissolve transition in Remotion

You don't need to write a custom TransitionPresentation, an SVG feTurbulence filter or a gl-transitions shader. Install the presentation and pass it to TransitionSeries.Transition:

bash
npx shadcn@latest add @remocn/grain-dissolve
  • The grain field starts as flat shapes, then intensity and softness sweep from 0 to 1 so the shapes roughen into grain while the outgoing scene disintegrates; the incoming scene condenses out of the texture.
  • shape picks the figure family (blob, wave, dots, truchet, corners, ripple, sphere), colors and colorBack set the palette, noise the amount of per-pixel grain.
  • Your own scenes stay ordinary React layers in the TransitionSeries.Sequences; the grain is drawn over the cut.

Good to know

  • Length: 76 frames at 30 fps, the value for linearTiming. In a 60 fps composition pass 152, which is what the example below does. Under ~50 frames at 30 fps the sweep has no room to read. see Frame rate.
  • Installs: remotion and @remotion/transitions from npm, plus the remocn shader component shader-grain-gradient, which brings in @paper-design/shaders-react and the frame-rate helper. The shadcn CLI adds them for you.
  • Rendering: the grain is a WebGL shader (GrainGradient from @paper-design/shaders-react) driven by the Remotion frame, not by wall-clock time, so seeking and npx remotion render give the same frames. The render machine needs WebGL; these docs don't list specific renderer flags, see Remotion's docs on the --gl option if your machine has no GPU.

Usage

grainDissolve() is a Remotion transition presentation. Pass it to a TransitionSeries.Transition between two sequences. The grain field starts as flat, hard-edged shapes and both intensity and softness sweep from 0 to 1 across the transition — the figures grow, roughen into grain, and the incoming scene condenses out of the dissolved texture. Give the sweep enough frames to read (76 works well).

tsx
import { TransitionSeries, linearTiming } from "@remotion/transitions";
import { grainDissolve } from "@/components/remocn/grain-dissolve";
 
export const MyVideo = () => (
  <TransitionSeries>
    <TransitionSeries.Sequence durationInFrames={192}>
      <SceneA />
    </TransitionSeries.Sequence>
    {/* 60 fps composition: 76 frames at 30 fps = 152 here */}
    <TransitionSeries.Transition
      timing={linearTiming({ durationInFrames: 152 })}
      presentation={grainDissolve()}
    />
    <TransitionSeries.Sequence durationInFrames={192}>
      <SceneB />
    </TransitionSeries.Sequence>
  </TransitionSeries>
);

The shape prop picks the figure family the field is built from — "wave", "dots", "truchet", "corners", "ripple", "blob", or "sphere". Shapes are discrete (they cannot blend into each other), but each one gives the same sweep a different character: "blob" reads organic, "wave" calm and banded, "dots" halftone-like, "sphere" volumetric.

Props

grainDissolve(props) accepts:

PropTypeDefault
colors
string[]["#3a3a52", "#4a4a68", "#8f88ae"]

Colors of the grain shapes, up to 7.

colorBack
string"#141318"

Backdrop behind the shapes during the transition.

shape
string"blob"

Figure family of the field. One of wave, dots, truchet, corners, ripple, blob, sphere.

noise
number0.3

Amount of per-pixel grain over the shapes.

zoom
number2

Magnification of the figure field. Raise it until the shapes fill the frame, lower it to show more of the backdrop.

speed
number1

Shader animation speed.

  • colorsstring[]

    Colors of the grain shapes, up to 7.

    Default["#3a3a52", "#4a4a68", "#8f88ae"]

  • colorBackstring

    Backdrop behind the shapes during the transition.

    Default"#141318"

  • shapestring

    Figure family of the field. One of wave, dots, truchet, corners, ripple, blob, sphere.

    Default"blob"

  • noisenumber

    Amount of per-pixel grain over the shapes.

    Default0.3

  • zoomnumber

    Magnification of the figure field. Raise it until the shapes fill the frame, lower it to show more of the backdrop.

    Default2

  • speednumber

    Shader animation speed.

    Default1