How to add water caustics with Claude

A rippling net of pale aqua light, like sunlight on the bottom of a pool, fades in at half a second and shimmers over the bottle and backdrop.

Get this effect

  1. Switch to Code in your Claude Desktop App

  2. Install the skill (once)

    Show the prompt
    Install the Recharm video effects skill: download https://recharm-growth-staging.s3.us-east-2.amazonaws.com/website/downloads/recharm-video-effects.zip and unzip it into ~/.claude/skills
  3. Ask for the effect

    Add water caustics to input.mp4
    Second the light fades in: 0.5
    How many times the pattern repeats across the frame width: 2.2

Several videos, several effects, one ask

Put your clips in the folder, mention them with @, and ask for everything at once. Claude runs one tested script after another on each clip, then joins them.

Add water caustics to @clip1.mp4, put a sale badge on @clip2.mp4, give @clip3.mp4 a VHS look, then join all three with crossfades.

Settings you can change

Ask Claude to change any of these, or edit them at the top of the script.

SettingDefaultWhat it does
START0.5Second the light fades in.
TILES2.2How many times the pattern repeats across the frame width. Higher gives smaller cells.
SPEED0.6How fast the ripples move.
COLOR(170, 235, 255)Color of the light.
STRENGTH0.75Brightness of the light lines, 0 to 1.
SHARPNESS14Higher gives thinner, crisper lines.

Without the skill

Don’t want to install the skill? Paste this prompt into Claude Code and Claude writes the script itself.

Show the prompt
Add a water caustics light overlay to input.mp4: a moving net of thin, bright pale aqua (170, 235, 255) lines, like sunlight through rippling pool water, covering the whole frame. Build the pattern with numpy (for example by bending a grid with a few layers of moving sine waves and brightening where they bunch up, then raising the result to a high power so the lines stay thin), with about 2.2 cells repeating across the frame width and round cells, drifting and rippling slowly. Add it on top of each frame (additive light, 75% strength at the brightest lines) so the brightest lines reach near white, while the dark gaps between them leave the footage untouched. Nothing before 0.5 seconds; it fades in from 0.5 to 1.1 seconds, then stays until the end. Use Python with numpy and ffmpeg (this effect has no text; any text would be drawn with Pillow, not ffmpeg's drawtext filter). Keep the size, frame rate and audio, and save it as output.mp4.

Run it without Claude

This is the exact script we tested. Save it as water-caustics.py and run:

python3 water-caustics.py input.mp4 output.mp4
Show the script
#!/usr/bin/env python3
"""Water caustics: a rippling net of pale aqua light, like sun through a pool, shimmers across the whole frame.

Usage: python3 water-caustics.py input.mp4 output.mp4
Needs ffmpeg, numpy and Pillow (pip install numpy pillow).
"""
import json
import subprocess
import sys

import numpy as np
from PIL import Image

START = 0.5                # second the light fades in
FADE = 0.6                 # seconds the fade-in takes
TILES = 2.2                # how many times the pattern repeats across the frame width (higher = smaller cells)
SPEED = 0.6                # how fast the ripples move
COLOR = (170, 235, 255)    # light color: pale aqua
STRENGTH = 0.75            # brightness of the light lines, 0-1
SHARPNESS = 14             # higher = thinner, crisper lines of light
DETAIL = 2                 # pattern is worked out at 1/DETAIL size, then smoothly scaled up


def caustics(t):
    """The light pattern at time t, 0-1 per pixel, at full frame size (h, w, 1).

    Five layers of swirling sine waves bend the grid; light piles up where they cross, which draws the net.
    """
    p = grid * 2 * np.pi * TILES - 250
    i = p.copy()
    c = np.ones(p.shape[1:])
    for n in range(5):
        tn = t * SPEED * (1 - 3.5 / (n + 1))
        i = p + np.stack([np.cos(tn - i[0]) + np.sin(tn + i[1]), np.sin(tn - i[1]) + np.cos(tn + i[0])])
        c += 1 / np.hypot(p[0] / (np.sin(i[0] + tn) / 0.005), p[1] / (np.cos(i[1] + tn) / 0.005))
    light = np.abs(1.17 - (c / 5) ** 1.4) ** SHARPNESS
    small = Image.fromarray((np.clip(light, 0, 1) * 255).astype(np.uint8))
    return (np.asarray(small.resize((w, h), Image.BICUBIC), np.float32) / 255)[..., None]


def add_light(frame, t):
    amount = np.clip((t - START) / FADE, 0, 1)
    if amount == 0:
        return frame
    light = caustics(t) * np.array(COLOR) * STRENGTH * amount
    return (frame + light).round().clip(0, 255).astype(np.uint8)


def probe(path):
    info = json.loads(subprocess.check_output(["ffprobe", "-v", "error", "-select_streams", "v:0", "-show_entries",
                                               "stream=width,height,r_frame_rate", "-of", "json", path]))
    s = info["streams"][0]
    num, den = s["r_frame_rate"].split("/")
    return s["width"], s["height"], s["r_frame_rate"], float(num) / float(den)


src, out = sys.argv[1:3]
w, h, rate, fps = probe(src)
ys, xs = np.mgrid[0:h:DETAIL, 0:w:DETAIL]
grid = np.stack([xs / w, ys / w])                             # same scale on both axes, so cells stay round

reader = subprocess.Popen(["ffmpeg", "-v", "error", "-i", src, "-f", "rawvideo", "-pix_fmt", "rgb24", "-"],
                          stdout=subprocess.PIPE)
writer = subprocess.Popen(["ffmpeg", "-y", "-v", "error", "-f", "rawvideo", "-pix_fmt", "rgb24", "-s", f"{w}x{h}",
                           "-r", rate, "-i", "-", "-i", src, "-map", "0:v", "-map", "1:a?",
                           "-c:v", "libx264", "-crf", "18", "-pix_fmt", "yuv420p", "-c:a", "copy", "-shortest", out],
                          stdin=subprocess.PIPE)
i = 0
while True:
    raw = reader.stdout.read(w * h * 3)
    if len(raw) < w * h * 3:
        break
    frame = np.frombuffer(raw, np.uint8).reshape(h, w, 3)
    writer.stdin.write(add_light(frame, i / fps).tobytes())
    i += 1
writer.stdin.close()
if reader.wait() or writer.wait():
    sys.exit("ffmpeg failed")

Find 3x winning ads

Recharm cuts your ad footage into tagged, searchable clips: hooks, testimonials, product shots. Find the shots that win, add the effect with Claude, and ship 3x more ad edits.

Start 14-day free trial