Warp Dissolve

Folding warped melt transition for Remotion - the outgoing scene melts into a liquid, folding distortion field that straightens back out into the next scene

In Remotion, Warp Dissolve is a folding warped melt transition: the outgoing scene melts into a liquid distortion field that folds and swirls, then straightens back out into the next scene. Use it to suggest time passing or a mood shift. It is a TransitionSeries presentation.

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

How to melt one scene into the next with a warp distortion in Remotion

You don't need to write a WebGL2 fragment shader, port a gl-transitions effect or chain SVG feDisplacementMap and feTurbulence filters. Install the presentation and pass it to TransitionSeries.Transition:

bash
npx shadcn@latest add @remocn/warp-dissolve
  • The outgoing scene blurs and swells into a domain-warp color field, distortion peaks mid-transition, and the incoming scene sharpens out of the warp.
  • colors sets the field's palette, distortion the peak warp, swirl how much the pattern folds, softness the blend between colors.
  • Your own scenes stay ordinary React layers in the TransitionSeries.Sequences.

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 melt looks like a smeared crossfade. see Frame rate.
  • Installs: remotion and @remotion/transitions from npm, plus the remocn shader component shader-warp (which brings in @paper-design/shaders-react and the frame-rate helper) and glide. The shadcn CLI adds them for you.
  • Rendering: the field is a WebGL shader (Warp from @paper-design/shaders-react) driven by the Remotion frame, not wall-clock time, so npx remotion render gives the same frames as the preview. 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

warpDissolve() is a Remotion transition presentation. Pass it to a TransitionSeries.Transition between two sequences. The outgoing scene blurs and swells into a liquid color field, distortion peaks mid-transition, and the incoming scene sharpens out of the warp. Give it enough frames for the melt to read (76 works well).

tsx
import { TransitionSeries, linearTiming } from "@remotion/transitions";
import { warpDissolve } from "@/components/remocn/warp-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={warpDissolve()}
    />
    <TransitionSeries.Sequence durationInFrames={192}>
      <SceneB />
    </TransitionSeries.Sequence>
  </TransitionSeries>
);

Props

warpDissolve(props) accepts:

PropTypeDefault
colors
string[]["#141318", "#3a3a5c", "#1f1d29", "#8f88ae"]

Colors of the warping field.

distortion
number0.8

Peak distortion of the field at mid-transition.

swirl
number0.6

Rotational folding of the warp pattern.

softness
number1

Blending softness between the field colors.

speed
number1

Shader animation speed.

  • colorsstring[]

    Colors of the warping field.

    Default["#141318", "#3a3a5c", "#1f1d29", "#8f88ae"]

  • distortionnumber

    Peak distortion of the field at mid-transition.

    Default0.8

  • swirlnumber

    Rotational folding of the warp pattern.

    Default0.6

  • softnessnumber

    Blending softness between the field colors.

    Default1

  • speednumber

    Shader animation speed.

    Default1