Skip to content

Production-ready animations, transitions, backgrounds, and scenes for Remotion

feat: added perlin-dissolve smoke-dissolve transition

dev_wandryc38bce11e54b
diff --git a/components/docs/examples/perlin-dissolve-example.tsx b/components/docs/examples/perlin-dissolve-example.tsx
new file mode 100644
index 00000000..9908da57
--- /dev/null
+++ b/components/docs/examples/perlin-dissolve-example.tsx
@@ -0,0 +1,90 @@
+"use client";
+
+import { AbsoluteFill, Sequence } from "remotion";
+import { TransitionSeries, linearTiming } from "@remotion/transitions";
+import { perlinDissolve } from "@/registry/remocn/perlin-dissolve";
+import { SoftBlurIn } from "@/registry/remocn/soft-blur-in";
+
+const FONT_FAMILY =
+ "var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif";
+
+function Scene({ label, background }: { label: string; background: string }) {
+ return (
+ <AbsoluteFill
+ style={{
+ background,
+ alignItems: "center",
+ justifyContent: "center",
+ }}
+ >
+ <span
+ style={{
+ fontFamily: FONT_FAMILY,
+ fontSize: 96,
+ fontWeight: 600,
+ letterSpacing: "-0.03em",
+ color: "#f2f2f2",
+ }}
+ >
+ {label}
+ </span>
+ </AbsoluteFill>
+ );
+}
+
+interface PerlinDissolveExampleProps {
+ colorFront?: string;
+ colorBack?: string;
+ softness?: number;
+ speed?: number;
+}
+
+export function PerlinDissolveExampleScene({
+ colorFront,
+ colorBack,
+ softness,
+ speed,
+}: PerlinDissolveExampleProps) {
+ return (
+ <TransitionSeries>
+ <TransitionSeries.Sequence durationInFrames={110}>
+ <Scene label="Scene A" background="#141318" />
+ </TransitionSeries.Sequence>
+ <TransitionSeries.Transition
+ timing={linearTiming({ durationInFrames: 104 })}
+ presentation={perlinDissolve({ colorFront, colorBack, softness, speed })}
+ />
+ <TransitionSeries.Sequence durationInFrames={110}>
+ <Sequence from={52}>
+ <SoftBlurIn text="Perlin Dissolve" fontSize={96} color="#f2f2f2" />
+ </Sequence>
+ </TransitionSeries.Sequence>
+ </TransitionSeries>
+ );
+}
+
+export const perlinDissolveExampleCode = (
+ values: Record<string, unknown>,
+): string => {
+ const colorFront = (values.colorFront as string) ?? "#8f88ae";
+ const colorBack = (values.colorBack as string) ?? "#141318";
+ const softness = (values.softness as number) ?? 0.1;
+ const speed = (values.speed as number) ?? 1;
+ return `import { TransitionSeries, linearTiming } from "@remotion/transitions";
+import { perlinDissolve } from "@/components/remocn/perlin-dissolve";
+
+export const MyVideo = () => (
+ <TransitionSeries>
+ <TransitionSeries.Sequence durationInFrames={110}>
+ <SceneA />
+ </TransitionSeries.Sequence>
+ <TransitionSeries.Transition
+ timing={linearTiming({ durationInFrames: 104 })}
+ presentation={perlinDissolve({ colorFront: "${colorFront}", colorBack: "${colorBack}", softness: ${softness}, speed: ${speed} })}
+ />
+ <TransitionSeries.Sequence durationInFrames={110}>
+ <SceneB />
+ </TransitionSeries.Sequence>
+ </TransitionSeries>
+);`;
+};
diff --git a/components/docs/examples/smoke-dissolve-example.tsx b/components/docs/examples/smoke-dissolve-example.tsx
new file mode 100644
index 00000000..010e9193
--- /dev/null
+++ b/components/docs/examples/smoke-dissolve-example.tsx
@@ -0,0 +1,88 @@
+"use client";
+
+import { AbsoluteFill } from "remotion";
+import { TransitionSeries, linearTiming } from "@remotion/transitions";
+import { smokeDissolve } from "@/registry/remocn/smoke-dissolve";
+
+const FONT_FAMILY =
+ "var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif";
+
+function Scene({ label, background }: { label: string; background: string }) {
+ return (
+ <AbsoluteFill
+ style={{
+ background,
+ alignItems: "center",
+ justifyContent: "center",
+ }}
+ >
+ <span
+ style={{
+ fontFamily: FONT_FAMILY,
+ fontSize: 96,
+ fontWeight: 600,
+ letterSpacing: "-0.03em",
+ color: "#f2f2f2",
+ }}
+ >
+ {label}
+ </span>
+ </AbsoluteFill>
+ );
+}
+
+interface SmokeDissolveExampleProps {
+ ringColor?: string;
+ colorBack?: string;
+ speed?: number;
+}
+
+export function SmokeDissolveExampleScene({
+ ringColor,
+ colorBack,
+ speed,
+}: SmokeDissolveExampleProps) {
+ return (
+ <TransitionSeries>
+ <TransitionSeries.Sequence durationInFrames={110}>
+ <Scene label="Scene A" background="#141318" />
+ </TransitionSeries.Sequence>
+ <TransitionSeries.Transition
+ timing={linearTiming({ durationInFrames: 104 })}
+ presentation={smokeDissolve({
+ colors: ringColor ? [ringColor] : undefined,
+ colorBack,
+ speed,
+ })}
+ />
+ <TransitionSeries.Sequence durationInFrames={110}>
+ <Scene label="Scene B" background="transparent" />
+ </TransitionSeries.Sequence>
+ </TransitionSeries>
+ );
+}
+
+export const smokeDissolveExampleCode = (
+ values: Record<string, unknown>,
+): string => {
+ const ringColor = (values.ringColor as string) ?? "#8f88ae";
+ const colorBack = (values.colorBack as string) ?? "#141318";
+ const speed = (values.speed as number) ?? 1;
+ return `import { TransitionSeries, linearTiming } from "@remotion/transitions";
+import { smokeDissolve } from "@/components/remocn/smoke-dissolve";
+
+export const MyVideo = () => (
+ <TransitionSeries>
+ <TransitionSeries.Sequence durationInFrames={110}>
+ <SceneA />
+ </TransitionSeries.Sequence>
+ <TransitionSeries.Transition
+ timing={linearTiming({ durationInFrames: 104 })}
+ presentation={smokeDissolve({ colors: ["${ringColor}"], colorBack: "${colorBack}", speed: ${speed} })}
+ />
+ <TransitionSeries.Sequence durationInFrames={110}>
+ <SceneB />
+ </TransitionSeries.Sequence>
+ </TransitionSeries>
+);`;
+};
diff --git a/config/site.ts b/config/site.ts
index 3bd82bc0..88ed7221 100644
--- a/config/site.ts
+++ b/config/site.ts
@@ -55,6 +55,8 @@ export const NAV_LINKS: NavLink[] = [
export const NEW_BADGE_PATHS = new Set<string>([
"/docs/transitions/swirl-dissolve",
"/docs/transitions/dither-dissolve",
+ "/docs/transitions/perlin-dissolve",
+ "/docs/transitions/smoke-dissolve",
]);
export const FOOTER_NAV: NavLink[] = [
diff --git a/content/docs/components.mdx b/content/docs/components.mdx
index 3adc79d6..6174f095 100644
--- a/content/docs/components.mdx
+++ b/content/docs/components.mdx
@@ -412,6 +412,18 @@ Scene transitions, camera moves, and stylized wipes.
status: "stable",
href: "/docs/transitions/dither-dissolve",
},
+ {
+ name: "PerlinDissolve",
+ description: "Sweep a perlin-noise threshold across the frame to dissolve into the next scene",
+ status: "stable",
+ href: "/docs/transitions/perlin-dissolve",
+ },
+ {
+ name: "SmokeDissolve",
+ description: "Expand a smoke ring outward across the frame to reveal the next scene",
+ status: "stable",
+ href: "/docs/transitions/smoke-dissolve",
+ },
]}
/>
diff --git a/content/docs/transitions/meta.json b/content/docs/transitions/meta.json
index 1dad5e7a..a474daf3 100644
--- a/content/docs/transitions/meta.json
+++ b/content/docs/transitions/meta.json
@@ -10,6 +10,8 @@
"grid-pixelate-wipe",
"chromatic-aberration-wipe",
"swirl-dissolve",
- "dither-dissolve"
+ "dither-dissolve",
+ "perlin-dissolve",
+ "smoke-dissolve"
]
}
diff --git a/content/docs/transitions/perlin-dissolve.mdx b/content/docs/transitions/perlin-dissolve.mdx
new file mode 100644
index 00000000..b266b491
--- /dev/null
+++ b/content/docs/transitions/perlin-dissolve.mdx
@@ -0,0 +1,70 @@
+---
+title: Perlin Dissolve
+description: Sweep a perlin-noise threshold across the frame to dissolve into the next scene
+---
+
+<ComponentPreview name="perlin-dissolve" />
+
+## Installation
+
+<InstallBlock name="perlin-dissolve" />
+
+## Usage
+
+`perlinDissolve()` is a Remotion transition presentation. Pass it to a
+`TransitionSeries.Transition` between two sequences. The perlin field sweeps
+its threshold from back to front while the incoming scene resolves through it,
+so give the transition enough frames for the full sweep (104 works well).
+
+```tsx
+import { TransitionSeries, linearTiming } from "@remotion/transitions";
+import { perlinDissolve } from "@/components/remocn/perlin-dissolve";
+
+export const MyVideo = () => (
+ <TransitionSeries>
+ <TransitionSeries.Sequence durationInFrames={110}>
+ <SceneA />
+ </TransitionSeries.Sequence>
+ <TransitionSeries.Transition
+ timing={linearTiming({ durationInFrames: 104 })}
+ presentation={perlinDissolve()}
+ />
+ <TransitionSeries.Sequence durationInFrames={110}>
+ <SceneB />
+ </TransitionSeries.Sequence>
+ </TransitionSeries>
+);
+```
+
+## Props
+
+`perlinDissolve(props)` accepts:
+
+<PropsTable
+ rows={[
+ {
+ name: "colorBack",
+ type: "string",
+ default: '"#141318"',
+ description: "Solid color behind the noise during the transition.",
+ },
+ {
+ name: "colorFront",
+ type: "string",
+ default: '"#8f88ae"',
+ description: "Foreground color the noise threshold sweeps toward.",
+ },
+ {
+ name: "softness",
+ type: "number",
+ default: "0.1",
+ description: "Edge softness of the noise threshold.",
+ },
+ {
+ name: "speed",
+ type: "number",
+ default: "1",
+ description: "Shader animation speed.",
+ },
+ ]}
+/>
diff --git a/content/docs/transitions/smoke-dissolve.mdx b/content/docs/transitions/smoke-dissolve.mdx
new file mode 100644
index 00000000..2ac0b9c3
--- /dev/null
+++ b/content/docs/transitions/smoke-dissolve.mdx
@@ -0,0 +1,64 @@
+---
+title: Smoke Dissolve
+description: Expand a smoke ring outward across the frame to reveal the next scene
+---
+
+<ComponentPreview name="smoke-dissolve" />
+
+## Installation
+
+<InstallBlock name="smoke-dissolve" />
+
+## Usage
+
+`smokeDissolve()` is a Remotion transition presentation. Pass it to a
+`TransitionSeries.Transition` between two sequences. The smoke ring grows in
+radius, scale and thickness while the incoming scene resolves behind it, so
+give the transition enough frames for the full expansion (104 works well).
+
+```tsx
+import { TransitionSeries, linearTiming } from "@remotion/transitions";
+import { smokeDissolve } from "@/components/remocn/smoke-dissolve";
+
+export const MyVideo = () => (
+ <TransitionSeries>
+ <TransitionSeries.Sequence durationInFrames={110}>
+ <SceneA />
+ </TransitionSeries.Sequence>
+ <TransitionSeries.Transition
+ timing={linearTiming({ durationInFrames: 104 })}
+ presentation={smokeDissolve()}
+ />
+ <TransitionSeries.Sequence durationInFrames={110}>
+ <SceneB />
+ </TransitionSeries.Sequence>
+ </TransitionSeries>
+);
+```
+
+## Props
+
+`smokeDissolve(props)` accepts:
+
+<PropsTable
+ rows={[
+ {
+ name: "colorBack",
+ type: "string",
+ default: '"#141318"',
+ description: "Solid color behind the smoke ring during the transition.",
+ },
+ {
+ name: "colors",
+ type: "string[]",
+ default: '["#8f88ae"]',
+ description: "Smoke ring colors.",
+ },
+ {
+ name: "speed",
+ type: "number",
+ default: "1",
+ description: "Shader animation speed.",
+ },
+ ]}
+/>
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index 86d8a0b7..035fb6c1 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -51,6 +51,10 @@ import { SwirlDissolveExampleScene } from "@/components/docs/examples/swirl-diss
import { swirlDissolveConfig } from "@/registry/remocn/swirl-dissolve/config";
import { DitherDissolveExampleScene } from "@/components/docs/examples/dither-dissolve-example";
import { ditherDissolveConfig } from "@/registry/remocn/dither-dissolve/config";
+import { PerlinDissolveExampleScene } from "@/components/docs/examples/perlin-dissolve-example";
+import { perlinDissolveConfig } from "@/registry/remocn/perlin-dissolve/config";
+import { SmokeDissolveExampleScene } from "@/components/docs/examples/smoke-dissolve-example";
+import { smokeDissolveConfig } from "@/registry/remocn/smoke-dissolve/config";
import { DynamicGrid } from "@/registry/remocn/dynamic-grid";
import { dynamicGridConfig } from "@/registry/remocn/dynamic-grid/config";
import { EcosystemConstellation } from "@/registry/remocn/ecosystem-constellation";
@@ -437,6 +441,14 @@ const registry: Record<string, RegistryEntry> = {
Component: DitherDissolveExampleScene,
config: ditherDissolveConfig,
},
+ "perlin-dissolve": {
+ Component: PerlinDissolveExampleScene,
+ config: perlinDissolveConfig,
+ },
+ "smoke-dissolve": {
+ Component: SmokeDissolveExampleScene,
+ config: smokeDissolveConfig,
+ },
"zoom-through-transition": {
Component: ZoomThroughTransition,
config: zoomThroughTransitionConfig,
diff --git a/registry/remocn/perlin-dissolve/config.ts b/registry/remocn/perlin-dissolve/config.ts
new file mode 100644
index 00000000..e9a80adb
--- /dev/null
+++ b/registry/remocn/perlin-dissolve/config.ts
@@ -0,0 +1,25 @@
+import { perlinDissolveExampleCode } from "@/components/docs/examples/perlin-dissolve-example";
+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";
+
+export const perlinDissolveConfig: ComponentConfig = {
+ componentName: "perlinDissolve",
+ importPath: "@/components/remocn/perlin-dissolve",
+ controls: {
+ colorFront: { type: "color", default: "#8f88ae", label: "Ink" },
+ colorBack: { type: "color", default: "#141318", label: "Background" },
+ softness: {
+ type: "number",
+ default: 0.1,
+ min: 0,
+ max: 1,
+ step: 0.05,
+ label: "Softness",
+ },
+ },
+ durationInFrames: 116,
+ fps: FPS,
+ compositionWidth: W,
+ compositionHeight: H,
+ previewBackdrop: { type: "color", value: "#141318" },
+ snippet: perlinDissolveExampleCode,
+};
diff --git a/registry/remocn/perlin-dissolve/index.tsx b/registry/remocn/perlin-dissolve/index.tsx
new file mode 100644
index 00000000..593f2071
--- /dev/null
+++ b/registry/remocn/perlin-dissolve/index.tsx
@@ -0,0 +1,74 @@
+"use client";
+
+import type React from "react";
+import { AbsoluteFill, Easing, interpolate } from "remotion";
+import type {
+ TransitionPresentation,
+ TransitionPresentationComponentProps,
+} from "@remotion/transitions";
+import { ShaderPerlinNoise } from "@/components/remocn/shader-perlin-noise";
+
+const clampOpts = {
+ extrapolateLeft: "clamp" as const,
+ extrapolateRight: "clamp" as const,
+};
+
+export type PerlinDissolveProps = {
+ colorBack?: string;
+ colorFront?: string;
+ softness?: number;
+ speed?: number;
+};
+
+const PerlinDissolvePresentation: React.FC<
+ TransitionPresentationComponentProps<PerlinDissolveProps>
+> = ({
+ children,
+ presentationProgress,
+ presentationDirection,
+ passedProps,
+}) => {
+ const {
+ colorBack = "#141318",
+ colorFront = "#8f88ae",
+ softness = 0.1,
+ speed = 1,
+ } = passedProps;
+ const entering = presentationDirection === "entering";
+ const p = presentationProgress;
+
+ const proportion = interpolate(p, [0, 0.5], [0, 1], {
+ ...clampOpts,
+ easing: Easing.bezier(0.42, 0, 0.58, 1),
+ });
+
+ const childStyle: React.CSSProperties = entering
+ ? { opacity: interpolate(p, [0.48, 0.6], [0, 1], clampOpts) }
+ : { opacity: interpolate(p, [0.06, 0.13], [1, 0], clampOpts) };
+
+ return (
+ <AbsoluteFill>
+ {entering ? (
+ <AbsoluteFill style={{ pointerEvents: "none" }}>
+ <ShaderPerlinNoise
+ speed={speed}
+ proportion={proportion}
+ colorBack={colorBack}
+ colorFront={colorFront}
+ softness={softness}
+ />
+ </AbsoluteFill>
+ ) : null}
+ <AbsoluteFill style={childStyle}>{children}</AbsoluteFill>
+ </AbsoluteFill>
+ );
+};
+
+export function perlinDissolve(
+ props: PerlinDissolveProps = {},
+): TransitionPresentation<PerlinDissolveProps> {
+ return {
+ component: PerlinDissolvePresentation,
+ props,
+ };
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index 6bfab5c1..5d4d103c 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -863,6 +863,46 @@
}
]
},
+ {
+ "name": "perlin-dissolve",
+ "type": "registry:component",
+ "title": "Perlin Dissolve",
+ "description": "A perlin-noise shader transition that sweeps its noise threshold to dissolve one scene into the next.",
+ "dependencies": [
+ "remotion",
+ "@remotion/transitions"
+ ],
+ "registryDependencies": [
+ "@remocn/shader-perlin-noise"
+ ],
+ "files": [
+ {
+ "path": "perlin-dissolve/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/perlin-dissolve.tsx"
+ }
+ ]
+ },
+ {
+ "name": "smoke-dissolve",
+ "type": "registry:component",
+ "title": "Smoke Dissolve",
+ "description": "A smoke-ring shader transition that expands the ring outward to reveal the next scene.",
+ "dependencies": [
+ "remotion",
+ "@remotion/transitions"
+ ],
+ "registryDependencies": [
+ "@remocn/shader-smoke-ring"
+ ],
+ "files": [
+ {
+ "path": "smoke-dissolve/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/smoke-dissolve.tsx"
+ }
+ ]
+ },
{
"name": "zoom-through-transition",
"type": "registry:component",
diff --git a/registry/remocn/smoke-dissolve/config.ts b/registry/remocn/smoke-dissolve/config.ts
new file mode 100644
index 00000000..b149784d
--- /dev/null
+++ b/registry/remocn/smoke-dissolve/config.ts
@@ -0,0 +1,17 @@
+import { smokeDissolveExampleCode } from "@/components/docs/examples/smoke-dissolve-example";
+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";
+
+export const smokeDissolveConfig: ComponentConfig = {
+ componentName: "smokeDissolve",
+ importPath: "@/components/remocn/smoke-dissolve",
+ controls: {
+ ringColor: { type: "color", default: "#8f88ae", label: "Ring" },
+ colorBack: { type: "color", default: "#141318", label: "Background" },
+ },
+ durationInFrames: 116,
+ fps: FPS,
+ compositionWidth: W,
+ compositionHeight: H,
+ previewBackdrop: { type: "color", value: "#141318" },
+ snippet: smokeDissolveExampleCode,
+};
diff --git a/registry/remocn/smoke-dissolve/index.tsx b/registry/remocn/smoke-dissolve/index.tsx
new file mode 100644
index 00000000..b6910c08
--- /dev/null
+++ b/registry/remocn/smoke-dissolve/index.tsx
@@ -0,0 +1,81 @@
+"use client";
+
+import type React from "react";
+import { AbsoluteFill, Easing, interpolate } from "remotion";
+import type {
+ TransitionPresentation,
+ TransitionPresentationComponentProps,
+} from "@remotion/transitions";
+import { ShaderSmokeRing } from "@/components/remocn/shader-smoke-ring";
+
+const clampOpts = {
+ extrapolateLeft: "clamp" as const,
+ extrapolateRight: "clamp" as const,
+};
+
+const DEFAULT_COLORS = ["#8f88ae"];
+
+export type SmokeDissolveProps = {
+ colorBack?: string;
+ colors?: string[];
+ speed?: number;
+};
+
+const SmokeDissolvePresentation: React.FC<
+ TransitionPresentationComponentProps<SmokeDissolveProps>
+> = ({
+ children,
+ presentationProgress,
+ presentationDirection,
+ passedProps,
+}) => {
+ const {
+ colorBack = "#141318",
+ colors = DEFAULT_COLORS,
+ speed = 1,
+ } = passedProps;
+ const entering = presentationDirection === "entering";
+ const p = presentationProgress;
+
+ const radius = interpolate(p, [0, 1], [0, 1], clampOpts);
+ const scale = interpolate(p, [0, 1], [1, 2], clampOpts);
+ const thickness = interpolate(p, [0, 1], [1, 1.5], clampOpts);
+
+ const childStyle: React.CSSProperties = entering
+ ? {
+ opacity: interpolate(p, [0.55, 0.68], [0, 1], clampOpts),
+ transform: `scale(${interpolate(p, [0.55, 1], [0.3, 1], {
+ ...clampOpts,
+ easing: Easing.out(Easing.cubic),
+ })})`,
+ filter: `blur(${interpolate(p, [0.55, 0.75], [10, 0], clampOpts)}px)`,
+ }
+ : { opacity: interpolate(p, [0.06, 0.13], [1, 0], clampOpts) };
+
+ return (
+ <AbsoluteFill>
+ {entering ? (
+ <AbsoluteFill style={{ pointerEvents: "none" }}>
+ <ShaderSmokeRing
+ speed={speed}
+ colorBack={colorBack}
+ colors={colors}
+ radius={radius}
+ scale={scale}
+ thickness={thickness}
+ />
+ </AbsoluteFill>
+ ) : null}
+ <AbsoluteFill style={childStyle}>{children}</AbsoluteFill>
+ </AbsoluteFill>
+ );
+};
+
+export function smokeDissolve(
+ props: SmokeDissolveProps = {},
+): TransitionPresentation<SmokeDissolveProps> {
+ return {
+ component: SmokeDissolvePresentation,
+ props,
+ };
+}
diff --git a/tsconfig.json b/tsconfig.json
index cb97109d..4c1ebd18 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -118,6 +118,12 @@
"@/components/remocn/shader-dithering": [
"./registry/remocn/shader-dithering/index.tsx",
],
+ "@/components/remocn/shader-perlin-noise": [
+ "./registry/remocn/shader-perlin-noise/index.tsx",
+ ],
+ "@/components/remocn/shader-smoke-ring": [
+ "./registry/remocn/shader-smoke-ring/index.tsx",
+ ],
"@/components/remocn/*": ["./registry/remocn-ui/*/index.tsx"],
"@/*": ["./*"],
},