RemotionUI

Caustics Bg

Underwater light caustics, with no shader and no per-frame noise. Install with npx remotion-ui@latest add caustics-bg.

PrimitivePrimitivesAdvanced

caustics-bg30fps · 960×540
Install
$ npx remotion-ui@latest add caustics-bg

The bright web that light makes on the bottom of a pool.

import { CausticsBg } from "@/remotion/primitives/caustics-bg";

<AbsoluteFill>
  <CausticsBg scale={130} />
  <YourScene />
</AbsoluteFill>

How it is made

Five wave trains, tilted at angles that share no common divisor, added together with plus-lighter so they combine the way light does. A slow, large-scale swell multiplies the sum so it only reaches full brightness in patches. Then contrast() thresholds the result into the sharp-edged web.

No shader, no canvas, no noise texture regenerated per frame — six divs and one filter chain.

Why five layers

Two crossed wave trains give a plaid. Three give a hexagonal lattice, and detuning their wavelengths does not help: the pattern is still periodic in two directions and the eye finds the tiling immediately. Five incommensurate directions make the sum quasi-periodic, so it never repeats. That is the difference between water and wallpaper, and both intermediate cuts of this component were rejected on exactly that point.

Tuning

contrast is the important one. Too low and the web dissolves back into the plaid it came from; too high and the bright regions saturate and the cells invert into dark blobs on a light field, which is the opposite of a caustic. Around 3-4 is the usable band.

The filter order is blur, then contrast. Thresholding first and blurring after gives soft-edged blobs instead of a web.

Motion

Each train slides at its own rate and rocks by a few degrees on its own clock, so the cells stretch and pinch rather than sliding as a rigid pattern. Two trains on the same clock would swim in lockstep and give the whole thing away.

speed={0} freezes the surface. There is no entrance; this is a stage layer.

Five wave trains at incommensurate angles, added with `plus-lighter`, dimmed in patches by a slow swell, then thresholded with `contrast()`. Three trains — at any wavelengths — make a lattice, and a lattice reads as wallpaper; five make the sum quasi-periodic. No shader and no per-frame noise.

Agent notes

Install first, then import the copied source component locally. AI guide →

Import
@/remotion/primitives/caustics-bg
  • Use when: frame-level motion primitives and reusable animation wrappers.
  • Customize: backgroundColor, color, scale, speed, plus copied source for timing, layout, colors, and typography.
  • Rule: do not import this component from the remotion-ui npm package; it is copied into your project.

Usage

Example
import { CausticsBg } from "@/remotion/primitives/caustics-bg"; <AbsoluteFill> <CausticsBg scale={130} /> <YourScene /> </AbsoluteFill>

API Reference

PropTypeDescription
backgroundColorstringWater behind the light. `transparent` layers the caustics over footage.
colorstringColour of the light itself.
scalenumberCell size, in px.
speednumberSwim speed. 0 freezes the surface.
contrastnumberHow hard the cells threshold. Too low and the web dissolves into plaid.
blurnumberSoftness of a cell edge, in px.
intensitynumberOverall brightness.
falloffnumberDepth shading down the frame. 0 lights it evenly.

Related

On this page