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.
$ pnpm dlx shadcn@latest add @remocn/warp-dissolveHow 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:
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.
colorssets the field's palette,distortionthe peak warp,swirlhow much the pattern folds,softnessthe 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:
remotionand@remotion/transitionsfrom npm, plus the remocn shader componentshader-warp(which brings in@paper-design/shaders-reactand theframe-ratehelper) andglide. The shadcn CLI adds them for you. - Rendering: the field is a WebGL shader (
Warpfrom@paper-design/shaders-react) driven by the Remotion frame, not wall-clock time, sonpx remotion rendergives 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--gloption 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).
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:
| Prop | Type | Default |
|---|---|---|
| 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.
Default
0.8 - swirlnumber
Rotational folding of the warp pattern.
Default
0.6 - softnessnumber
Blending softness between the field colors.
Default
1 - speednumber
Shader animation speed.
Default
1