Opus Motion ★ Star on GitHub

FX · physics-pile

Physics pile (falling, stacking shapes)

Colourful circles, rounded boxes and triangles (or letter tiles from a word) drop in one after another, bounce, tumble, stack and settle in a box, bowl or on the floor; a deterministic pre-simulated 2D rigid-body sim at 120 Hz sampled per frame, with small impact marks and exported collision frames for sound effects.

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

Physics pile (falling, stacking shapes): three frames of the visual effect, start, middle and end
Physics pile (falling, stacking shapes) — start, middle and end of the 7.0-second motion.

What Physics pile (falling, stacking shapes) is for

Playful product demos, logos or words that fall into a heap, music-from-collisions, data drops (one body per item), toy / game stories.

  • physics
  • pile
  • falling
  • bounce
  • stack
  • topple
  • collision
  • rigid body
  • gravity
  • shapes
  • letters
  • toy
  • playful
  • drop
  • marbles
  • data drop
  • sfx sync
  • deterministic

Details

Category
Visual effects & particles
Length
7.0 s (210 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
no
Seamless loop
no
Text props
text
Colour props
colors background ink
Mood
hud, playful
Roles
subject

Use Physics pile (falling, stacking shapes) in Remotion, React or HTML

Remotion project

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

# render an mp4 (run in the library folder)
node cli/mgl.mjs render physics-pile --props '{"text":"","colors":["#FF6B4A","#FFC145","#3DD6A3","#4D8BFF","#B26BFF","#FF7EB6"],"background":"#F3EEE4","ink":"#2A2622"}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export physics-pile --as mp4 --props '{"text":"","colors":["#FF6B4A","#FFC145","#3DD6A3","#4D8BFF","#B26BFF","#FF7EB6"],"background":"#F3EEE4","ink":"#2A2622"}'

React / Next.js

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

<MotionPlayer
  motion="physics-pile"
  props={{
    text: '',
    colors: ['#FF6B4A', '#FFC145', '#3DD6A3', '#4D8BFF', '#B26BFF', '#FF7EB6'],
    background: '#F3EEE4',
    ink: '#2A2622',
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

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

<opus-motion motion="physics-pile"
  props='{"text":"","colors":["#FF6B4A","#FFC145","#3DD6A3","#4D8BFF","#B26BFF","#FF7EB6"],"background":"#F3EEE4","ink":"#2A2622"}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "physics-pile",
      "props": {
        "text": "",
        "colors": [
          "#FF6B4A",
          "#FFC145",
          "#3DD6A3",
          "#4D8BFF",
          "#B26BFF",
          "#FF7EB6"
        ],
        "background": "#F3EEE4",
        "ink": "#2A2622"
      }
    }
  ]
}

Physics pile (falling, stacking shapes) props

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

PropDefaultWhat it does
count26number of bodies (ignored when text is set)
shapes["circle","box","tri"]mix of 'circle' | 'box' | 'tri'
text""letters that fall as tiles instead of shapes (e.g. a brand name)
size112body size in u (1u = 1px at 1080 on the short side)
container"box"'box' (walls + floor) | 'bowl' (slanted) | 'floor'
restitution0.38bounciness 0.2-0.5
friction0.55surface friction 0-1
spawnEvery3frames between spawns
startFrame6frame of the first spawn
colors["#FF6B4A","#FFC145","#3DD6A3","#4D8BFF","#B26BFF","#FF7EB6"]body colours, cycled
background"#F3EEE4"background colour
ink"#2A2622"wall / impact / letter colour
impactstruedraw small impact bursts at hard collisions
seed5randomness seed

Notes & credits

Technique sources:

  • prompt-corpus research: physics-pile (18 cases, ideas only; original implementation)