Raster Paint

A pixelated figure is painted tile by tile in warm to blue colors as a scan line crosses it. A free, MIT-licensed Remotion number animation.

In Remotion, Raster Paint is a pixel tile painted number: a big figure such as 10x is painted tile by tile in pixelated blocks with a warm to blue gradient trailing a scan line, so it looks like it is being rendered.

Installation
$ pnpm dlx shadcn@latest add @remocn/raster-paint

How to paint a pixelated number tile by tile with a scan line in Remotion

A big figure painted in pixelated tiles with warm to blue colors as a scan line sweeps across it is one component. You don't need a canvas pixelate pass, @remotion/effects, seeded random() or fitText from @remotion/layout-utils. Install it and pass the figure:

bash
npx shadcn@latest add @remocn/raster-paint
  • title is the figure, for example "10x"; label fades in under it once the scan is done. Pass an empty label to show the figure alone.
  • scanLength sets how long the scan line takes; trail sets the length of the colored trail behind it. accent sets the color the tiles settle on; the warm colors of the trail have no props of their own.

For a crisp stat from the first frame use Compact Stat.

Good to know

  • Length: 90 frames of motion at 30 fps (180 at 60 fps) with the default props. That is the minimum for its Sequence; add your own hold on top. The Usage example below is a 60 fps composition with a hold, so its durationInFrames (240) is longer than twice the motion. The component's own props counted in frames stay in 30 fps frames at any frame rate, see Frame rate.
  • Installs: remotion, @remotion/google-fonts from npm, plus the remocn helpers glide, frame-rate, timeline. The shadcn CLI copies the source into your project; nothing else is needed at runtime.
  • Font: loads Geist Mono itself through @remotion/google-fonts, so the default needs no setup. Pass fontFamily to use your own face, and load that font in your project.

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { RasterPaint } from "@/components/remocn/raster-paint";
 
const RasterPaintScene = () => (
  <RasterPaint title="10x" label="Faster renders in remocn 2.0" />
);
 
export const RemotionRoot = () => (
  <Composition
    id="RasterPaint"
    component={RasterPaintScene}
    durationInFrames={240}
    fps={60}
    width={1280}
    height={720}
  />
);

A scan line sweeps down the frame, painting the pixelated figure tile by tile, with a warm to blue gradient trailing behind it. A label fades in once the scan is done. Pass title and label; it ships light and dark through theme.

Props13

PropTypeDefault
title
string"10x"

Figure that gets painted, as text.

label
string"Faster renders in remocn 2.0"

Small line that fades in under the figure.

scanLength
number58

Frames for the scan line to paint the whole figure.

trail
number12

Frames a pixel takes to cool from the hot accent to its final color.

accent
string"#3B5BFD"

Accent color for highlights and small marks.

ink
string—

Text color; overrides the theme ink.

background
string—

Background fill; pass "transparent" to drop it.

fontFamily
string"Geist Mono"

Typeface for the copy. The default loads itself; load any other font in your project first.

scale
number1

Size of the foreground around the frame's center; the background stays put.

delay
number0

Frames to hold the first frame before anything moves.

grain
booleantrue

Film grain over the scene.

theme
"dark" | "light""dark"

Color theme, "dark" or "light".

speed
number1

Playback speed multiplier for the whole timeline.

  • titlestring

    Figure that gets painted, as text.

    Default"10x"

  • labelstring

    Small line that fades in under the figure.

    Default"Faster renders in remocn 2.0"

  • scanLengthnumber

    Frames for the scan line to paint the whole figure.

    Default58

  • trailnumber

    Frames a pixel takes to cool from the hot accent to its final color.

    Default12

  • accentstring

    Accent color for highlights and small marks.

    Default"#3B5BFD"

  • inkstring

    Text color; overrides the theme ink.

  • backgroundstring

    Background fill; pass "transparent" to drop it.

  • fontFamilystring

    Typeface for the copy. The default loads itself; load any other font in your project first.

    Default"Geist Mono"

  • scalenumber

    Size of the foreground around the frame's center; the background stays put.

    Default1

  • delaynumber

    Frames to hold the first frame before anything moves.

    Default0

  • grainboolean

    Film grain over the scene.

    Defaulttrue

  • theme"dark" | "light"

    Color theme, "dark" or "light".

    Default"dark"

  • speednumber

    Playback speed multiplier for the whole timeline.

    Default1