Opus Motion ★ Star on GitHub

FX · glass-crack-mend

Glass crack and mend (re-leading)

A leaded stained-glass pane takes a blow: nine white-hot jagged cracks race out from the impact in a quarter second with a flash and a 2-frame shake, then groups of glass slide along the leads into a new arrangement, one group per beat with a weld spark, and the cracks turn into dark mending lead lines.

A free, MIT-licensed visual effect from the Opus Motion Library — 616 motions for Remotion, React and plain HTML.

Glass crack and mend (re-leading): three frames of the visual effect, start, middle and end
Glass crack and mend (re-leading) — start, middle and end of the 6.0-second motion.

What Glass crack and mend (re-leading) is for

Turning points: reinvention, injury and recovery, a restored building, a before/after pivot; works over any image via `src`.

  • stained glass
  • crack
  • shatter
  • mend
  • repair
  • kintsugi
  • turning point
  • before after
  • flash
  • lead
  • weld
  • pivot
  • reinvention

Details

Category
Visual effects & particles
Length
6.0 s (180 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
no
Seamless loop
no
Text props
—
Colour props
colors lead background
Image props
src
Mood
night
Roles
subject

Use Glass crack and mend (re-leading) in Remotion, React or HTML

Remotion project

terminal
# copy this motion into your Remotion project
node cli/mgl.mjs add glass-crack-mend --to ../my-app/src

# render an mp4 (run in the library folder)
node cli/mgl.mjs render glass-crack-mend --props '{"colors":["#1f5f9e","#b3262f","#d9a22b","#2e7d4f","#6b3a8c","#e0763a","#2aa2a8"],"lead":"#1d1f23","background":"#14121a","src":""}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export glass-crack-mend --as mp4 --props '{"colors":["#1f5f9e","#b3262f","#d9a22b","#2e7d4f","#6b3a8c","#e0763a","#2aa2a8"],"lead":"#1d1f23","background":"#14121a","src":""}'

React / Next.js

tsx
import {MotionPlayer} from 'opus-motion-library/web';

<MotionPlayer
  motion="glass-crack-mend"
  props={{
    colors: [
      '#1f5f9e',
      '#b3262f',
      '#d9a22b',
      '#2e7d4f',
      '#6b3a8c',
      '#e0763a',
      '#2aa2a8',
    ],
    lead: '#1d1f23',
    background: '#14121a',
    src: '',
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

html
<script src="opus-motion.element.js" defer></script>

<opus-motion motion="glass-crack-mend"
  props='{"colors":["#1f5f9e","#b3262f","#d9a22b","#2e7d4f","#6b3a8c","#e0763a","#2aa2a8"],"lead":"#1d1f23","background":"#14121a","src":""}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "glass-crack-mend",
      "props": {
        "colors": [
          "#1f5f9e",
          "#b3262f",
          "#d9a22b",
          "#2e7d4f",
          "#6b3a8c",
          "#e0763a",
          "#2aa2a8"
        ],
        "lead": "#1d1f23",
        "background": "#14121a",
        "src": ""
      }
    }
  ]
}

Glass crack and mend (re-leading) props

14 parameters — change any of them to make the motion yours.

PropDefaultWhat it does
impact{"x":0.46,"y":0.42}impact point as 0..1 of the window
cols6glass columns
rows4glass rows
cracks9number of primary cracks
crackAt30frame of the blow
groupAt[58,76,94,112]start frame of each re-lead group (one slide per entry)
slideFrames15frames each slide takes
mendtrueturn the cracks into lead lines
flash0.85white flash strength 0..1
colors["#1f5f9e","#b3262f","#d9a22b","#2e7d4f","#6b3a8c","#e0763a","#2aa2a8"]jewel glass colours
lead"#1d1f23"lead came colour
background"#14121a"wall behind the window
src""optional image shown through the glass (public path); empty = coloured glass
seed5seed for colours and cracks

Notes & credits

Technique sources:

  • lemo-opuscar styles/stained-glass demo/story.js (CRACKS, WELDS, crackAfter) + STYLE.md (MIT, LemoLab)