Opus Motion ★ Star on GitHub

Worlds · time-of-day-grade

Time-of-day grade (day to night)

A simple procedural hillside village whose sky gradient and colour grade keyframe from day through golden hour, dusk pink and mauve to night: the sun arcs down and sets behind the hills, clouds pick up the sunset, a multiply night grade cools everything, the moon and stars come out and the house windows switch on one by one.

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

Time-of-day grade (day to night): three frames of the animated background, start, middle and end
Time-of-day grade (day to night) — start, middle and end of the 8.0-second motion.

What Time-of-day grade (day to night) is for

Time passing, "by the end of the day", before/after moods, calm transitions between story beats.

  • time
  • day
  • night
  • grade
  • sunset
  • mood
  • village
  • season
  • seasons
  • spring
  • autumn
  • winter
  • snow
  • petals
  • leaves
  • year in review

Details

Category
Animated worlds & backdrops
Length
8.0 s (240 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
no
Seamless loop
no
Text props
—
Colour props
hills wallColor wallShade roofColor roofColor2 doorColor windowColor chimneyColor lightColor lightGlow nightColor
Mood
mid, nature, night
Roles
backdrop
Pairs with
Chapter header, Number counter, Kinetic word captions

Use Time-of-day grade (day to night) in Remotion, React or HTML

Remotion project

terminal
# copy this motion into your Remotion project
node cli/mgl.mjs add time-of-day-grade --to ../my-app/src

# render an mp4 (run in the library folder)
node cli/mgl.mjs render time-of-day-grade --props '{"hills":["#9db4c4","#7fa37a","#5f8f4f"],"wallColor":"#e8dcc8","wallShade":"#d4c6ae","roofColor":"#b5533c","roofColor2":"#8b5a4a","doorColor":"#7a5a44","windowColor":"#5a6470","chimneyColor":"#6d4a3a","lightColor":"#ffd27a","lightGlow":"#ffb84a","nightColor":"#0C1A2E"}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export time-of-day-grade --as mp4 --props '{"hills":["#9db4c4","#7fa37a","#5f8f4f"],"wallColor":"#e8dcc8","wallShade":"#d4c6ae","roofColor":"#b5533c","roofColor2":"#8b5a4a","doorColor":"#7a5a44","windowColor":"#5a6470","chimneyColor":"#6d4a3a","lightColor":"#ffd27a","lightGlow":"#ffb84a","nightColor":"#0C1A2E"}'

React / Next.js

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

<MotionPlayer
  motion="time-of-day-grade"
  props={{
    hills: ['#9db4c4', '#7fa37a', '#5f8f4f'],
    wallColor: '#e8dcc8',
    wallShade: '#d4c6ae',
    roofColor: '#b5533c',
    roofColor2: '#8b5a4a',
    doorColor: '#7a5a44',
    windowColor: '#5a6470',
    chimneyColor: '#6d4a3a',
    lightColor: '#ffd27a',
    lightGlow: '#ffb84a',
    nightColor: '#0C1A2E',
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

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

<opus-motion motion="time-of-day-grade"
  props='{"hills":["#9db4c4","#7fa37a","#5f8f4f"],"wallColor":"#e8dcc8","wallShade":"#d4c6ae","roofColor":"#b5533c","roofColor2":"#8b5a4a","doorColor":"#7a5a44","windowColor":"#5a6470","chimneyColor":"#6d4a3a","lightColor":"#ffd27a","lightGlow":"#ffb84a","nightColor":"#0C1A2E"}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "time-of-day-grade",
      "props": {
        "hills": [
          "#9db4c4",
          "#7fa37a",
          "#5f8f4f"
        ],
        "wallColor": "#e8dcc8",
        "wallShade": "#d4c6ae",
        "roofColor": "#b5533c",
        "roofColor2": "#8b5a4a",
        "doorColor": "#7a5a44",
        "windowColor": "#5a6470",
        "chimneyColor": "#6d4a3a",
        "lightColor": "#ffd27a",
        "lightGlow": "#ffb84a",
        "nightColor": "#0C1A2E"
      }
    }
  ]
}

Time-of-day grade (day to night) props

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

PropDefaultWhat it does
stops[{"t":0,"skyTop":"#7fa6d6","skyBottom":"#cfe0ec","sun":"#fff3d0","grade":"#ffffff"},{"t…grade keyframes [{t 0..1, skyTop, skyBottom, sun, grade}] (grade = multiply wash colour)
holdStart12frames held at the first stop
holdEnd30frames held at the last stop
lightstruehouse windows switch on as it gets dark
lightsAt0.25darkness (0..1) at which the first windows light
nightGrade0.75strength of the #0C1A2E night multiply layer (video16 uses 0.75)
suntruesun disc that sets behind the hills
moontruemoon rising at night
hills["#9db4c4","#7fa37a","#5f8f4f"]hill colours far, mid, near (before grading)
seed"village"random seed
wallColor"#e8dcc8"house wall colour
wallShade"#d4c6ae"house side-wall (shaded) colour
roofColor"#b5533c"roof colour A (houses alternate randomly with B)
roofColor2"#8b5a4a"roof colour B
doorColor"#7a5a44"door colour
windowColor"#5a6470"window glass colour by day
chimneyColor"#6d4a3a"chimney colour
lightColor"#ffd27a"lit window colour at night
lightGlow"#ffb84a"lit window glow colour
nightColor"#0C1A2E"night multiply layer colour
season"off"off (day to night) | cycle (spring -> summer -> autumn -> winter with petals, leaves, snow) | spring | summer | autumn | winter (one fixed season)
seasonFrames0cycle: frames per season (0 = split the duration in four; 2-4 s each is typical)
seasonFade18cycle: crossfade frames between seasons (≈30 in the source)

Notes & credits

Technique sources:

  • video13 time-of-day-grade
  • video16 0:44-0:46 grade-to-night
  • video20 scene-grade-shift