Camera · rack-focus
Rack focus
Focus pulls between a foreground, a subject and a background layer: blur follows depth, bokeh blooms, lens breathes.
A free, MIT-licensed camera effect from the Opus Motion Library — 616 motions for Remotion, React and plain HTML.

What Rack focus is for
Shifting attention from one thing to another in a still-image scene; cinematic reveals; product-then-environment shots; drama beats.
Details
- Category
- Camera moves & lens effects
- Length
- 5.0 s (150 frames at 30 fps)
- Formats
- 16:9, 1:1, 9:16
- Weight
- light
- Transparent overlay
- no
- Seamless loop
- no
- Text props
- —
- Colour props
paletteaccentbackground- Mood
- cinematic
- Roles
- subject
Use Rack focus in Remotion, React or HTML
Remotion project
# copy this motion into your Remotion project
node cli/mgl.mjs add rack-focus --to ../my-app/src
# render an mp4 (run in the library folder)
node cli/mgl.mjs render rack-focus --props '{"palette":["#ff7a59","#6a4cff","#14b8a6","#ffd166"],"accent":"#ffd166","background":"#000000"}'
# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export rack-focus --as mp4 --props '{"palette":["#ff7a59","#6a4cff","#14b8a6","#ffd166"],"accent":"#ffd166","background":"#000000"}'React / Next.js
import {MotionPlayer} from 'opus-motion-library/web';
<MotionPlayer
motion="rack-focus"
props={{
palette: ['#ff7a59', '#6a4cff', '#14b8a6', '#ffd166'],
accent: '#ffd166',
background: '#000000',
}}
playOnView
loop="auto"
/>Plain HTML / WordPress
<script src="opus-motion.element.js" defer></script>
<opus-motion motion="rack-focus"
props='{"palette":["#ff7a59","#6a4cff","#14b8a6","#ffd166"],"accent":"#ffd166","background":"#000000"}'>
</opus-motion>Compose spec (multi-scene video)
{
"width": 1920,
"height": 1080,
"fps": 30,
"scenes": [
{
"motion": "rack-focus",
"props": {
"palette": [
"#ff7a59",
"#6a4cff",
"#14b8a6",
"#ffd166"
],
"accent": "#ffd166",
"background": "#000000"
}
}
]
}Rack focus props
10 parameters — change any of them to make the motion yours.
| Prop | Default | What it does |
|---|---|---|
backSrc | "" | background picture (empty = procedural) |
subjectSrc | "" | transparent PNG subject (empty = procedural figure) |
frontSrc | "" | transparent PNG foreground (empty = procedural blades) |
focusKeys | [[0,0.5],[30,0.5],[60,0],[90,0],[122,1]] | [frame, focus] keys: 0 = foreground, 0.5 = subject, 1 = background |
maxBlur | 46 | blur at the furthest depth in u |
breathing | 1 | lens breathing amount (0 = none) |
bokeh | true | bokeh discs bloom on the blurred background |
palette | ["#ff7a59","#6a4cff","#14b8a6","#ffd166"] | colours for procedural layers / bokeh |
accent | "#ffd166" | procedural subject accent |
background | "#000000" | base colour |
Related motions

Dolly zoom (vertigo)
A moment of dread, realisation or "oh no" on a portrait, product or place photo; thriller and true-crime beats; dramatic reveal punctuation.
dolly-zoom
Auto-frame camera
Keeps any multi-step build-up diagram readable without hand-keyed cameras; the same `fitCamera` / `autoFrameAt` helpers…
auto-frame-camera
Autofocus hunt
Suspense reveals, "did you see that?" beats, found-footage openers, product reveals with a lens feel.
autofocus-hunt
Board camera (one huge board, one long dolly)
Turns hand-drawn motions into one continuous explainer: course intros, "how it works" product videos, onboarding; the full-board pull-back…
board-camera
Canvas flythrough
Explainers, product tours and pitch one-shot infographics: lay out sections as one canvas, list the stations, and let the camera do the…
canvas-flythrough
Crash zoom
Comedic or dramatic emphasis on a face, product, number or object in any image; reaction beats; "wait, what?" moments.
crash-zoom
Notes & credits
Technique sources:
- camera-vocabulary: rack focus / focus pull