Opus Motion ★ Star on GitHub

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.

Rack focus: three frames of the camera effect, start, middle and end
Rack focus — start, middle and end of the 5.0-second motion.

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.

  • rack focus
  • focus pull
  • depth of field
  • blur
  • camera
  • cinematic
  • bokeh
  • reveal

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
palette accent background
Mood
cinematic
Roles
subject

Use Rack focus in Remotion, React or HTML

Remotion project

terminal
# 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

tsx
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

html
<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)

json
{
  "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.

PropDefaultWhat 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
maxBlur46blur at the furthest depth in u
breathing1lens breathing amount (0 = none)
bokehtruebokeh 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

Notes & credits

Technique sources:

  • camera-vocabulary: rack focus / focus pull