motionrender 0.2.8 → 0.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,212 @@
1
+ {
2
+ "id": "fx-paper-collage",
3
+ "name": "Paper collage",
4
+ "category": "effect",
5
+ "kind": "scene",
6
+ "durationFrames": 150,
7
+ "transition": {
8
+ "type": "fade",
9
+ "durationFrames": 12
10
+ },
11
+ "description": "Editorial paper-collage B-roll: stop-motion cutouts drop and slide over cardstock backing with tape strips and punchy label tags.",
12
+ "params": {
13
+ "subject": {
14
+ "type": "string",
15
+ "default": "",
16
+ "description": "Subject cutout image (asset id or path)"
17
+ },
18
+ "label": {
19
+ "type": "string",
20
+ "default": "KEY TAKEAWAY",
21
+ "description": "Punchy kicker on tape tag"
22
+ },
23
+ "headline": {
24
+ "type": "string",
25
+ "default": "Visual metaphor in motion",
26
+ "description": "Editorial caption text"
27
+ }
28
+ },
29
+ "layers": [
30
+ {
31
+ "id": "bg",
32
+ "type": "rect",
33
+ "x": 0,
34
+ "y": 0,
35
+ "width": "{{canvas.width}}",
36
+ "height": "{{canvas.height}}",
37
+ "fill": "{{bg}}"
38
+ },
39
+ {
40
+ "id": "backing-paper",
41
+ "type": "rect",
42
+ "x": "{{round(canvas.width * 0.5)}}",
43
+ "y": "{{round(canvas.height * 0.48)}}",
44
+ "width": "{{round(min(canvas.width, canvas.height) * 0.76)}}",
45
+ "height": "{{round(min(canvas.width, canvas.height) * 0.95)}}",
46
+ "rotation": -2.5,
47
+ "fill": "{{surface}}",
48
+ "radius": 4,
49
+ "shadow": {
50
+ "color": "rgba(0,0,0,0.2)",
51
+ "blur": 26,
52
+ "offsetX": 6,
53
+ "offsetY": 12
54
+ },
55
+ "animations": [
56
+ {
57
+ "property": "y",
58
+ "keyframes": [
59
+ { "frame": 0, "value": "{{canvas.height + 200}}", "easing": "easeOutBack" },
60
+ { "frame": 18, "value": "{{round(canvas.height * 0.48)}}" }
61
+ ]
62
+ }
63
+ ]
64
+ },
65
+ {
66
+ "if": "{{subject}}",
67
+ "id": "subject-image",
68
+ "type": "image",
69
+ "src": "{{subject}}",
70
+ "x": "{{round(canvas.width * 0.5)}}",
71
+ "y": "{{round(canvas.height * 0.45)}}",
72
+ "width": "{{round(min(canvas.width, canvas.height) * 0.62)}}",
73
+ "height": "{{round(min(canvas.width, canvas.height) * 0.62)}}",
74
+ "rotation": 3,
75
+ "filter": "grayscale(1) contrast(1.75) brightness(1.05)",
76
+ "shadow": {
77
+ "color": "rgba(0,0,0,0.25)",
78
+ "blur": 18,
79
+ "offsetX": 5,
80
+ "offsetY": 9
81
+ },
82
+ "animations": [
83
+ {
84
+ "property": "scale",
85
+ "keyframes": [
86
+ { "frame": 10, "value": 0.4, "easing": "easeOutBack" },
87
+ { "frame": 24, "value": 1.0 }
88
+ ]
89
+ }
90
+ ]
91
+ },
92
+ {
93
+ "if": "{{!subject}}",
94
+ "id": "subject-placeholder",
95
+ "type": "rect",
96
+ "x": "{{round(canvas.width * 0.5)}}",
97
+ "y": "{{round(canvas.height * 0.45)}}",
98
+ "width": "{{round(min(canvas.width, canvas.height) * 0.58)}}",
99
+ "height": "{{round(min(canvas.width, canvas.height) * 0.58)}}",
100
+ "rotation": 2,
101
+ "fill": "{{muted}}",
102
+ "radius": 8,
103
+ "shadow": {
104
+ "color": "rgba(0,0,0,0.2)",
105
+ "blur": 16,
106
+ "offsetX": 4,
107
+ "offsetY": 8
108
+ },
109
+ "animations": [
110
+ {
111
+ "property": "scale",
112
+ "keyframes": [
113
+ { "frame": 10, "value": 0.4, "easing": "easeOutBack" },
114
+ { "frame": 24, "value": 1.0 }
115
+ ]
116
+ }
117
+ ]
118
+ },
119
+ {
120
+ "id": "tape-strip",
121
+ "type": "rect",
122
+ "x": "{{round(canvas.width * 0.38)}}",
123
+ "y": "{{round(canvas.height * 0.48 - min(canvas.width, canvas.height) * 0.45)}}",
124
+ "width": "{{round(min(canvas.width, canvas.height) * 0.24)}}",
125
+ "height": "{{round(min(canvas.width, canvas.height) * 0.055)}}",
126
+ "rotation": -16,
127
+ "fill": "rgba(240, 230, 210, 0.85)",
128
+ "startFrame": 20,
129
+ "shadow": {
130
+ "color": "rgba(0,0,0,0.1)",
131
+ "blur": 4,
132
+ "offsetX": 1,
133
+ "offsetY": 2
134
+ }
135
+ },
136
+ {
137
+ "id": "label-tag",
138
+ "type": "text",
139
+ "content": "{{label}}",
140
+ "fontFamily": "Inter",
141
+ "fontWeight": 900,
142
+ "fontSize": "{{round(min(canvas.width, canvas.height) * 0.042)}}",
143
+ "color": "#111111",
144
+ "background": "{{accent}}",
145
+ "padding": "{{round(min(canvas.width, canvas.height) * 0.015)}}",
146
+ "rotation": -3.5,
147
+ "x": "{{round(canvas.width * 0.5)}}",
148
+ "y": "{{round(canvas.height * 0.72)}}",
149
+ "startFrame": 28,
150
+ "shadow": {
151
+ "color": "rgba(0,0,0,0.2)",
152
+ "blur": 12,
153
+ "offsetX": 4,
154
+ "offsetY": 6
155
+ },
156
+ "animations": [
157
+ {
158
+ "property": "y",
159
+ "keyframes": [
160
+ { "frame": 28, "value": "{{round(canvas.height * 0.78)}}", "easing": "easeOutCubic" },
161
+ { "frame": 38, "value": "{{round(canvas.height * 0.72)}}" }
162
+ ]
163
+ }
164
+ ]
165
+ },
166
+ {
167
+ "id": "headline-text",
168
+ "type": "text",
169
+ "content": "{{headline}}",
170
+ "fontFamily": "Inter",
171
+ "fontWeight": 700,
172
+ "fontSize": "{{round(min(canvas.width, canvas.height) * 0.038)}}",
173
+ "color": "{{text}}",
174
+ "maxWidth": "{{round(min(canvas.width, canvas.height) * 0.75)}}",
175
+ "textAlign": "center",
176
+ "x": "{{round(canvas.width * 0.5)}}",
177
+ "y": "{{round(canvas.height * 0.81)}}",
178
+ "startFrame": 36,
179
+ "animations": [
180
+ {
181
+ "property": "opacity",
182
+ "keyframes": [
183
+ { "frame": 36, "value": 0 },
184
+ { "frame": 46, "value": 1 }
185
+ ]
186
+ }
187
+ ]
188
+ },
189
+ {
190
+ "id": "sfx-paper-drop",
191
+ "type": "audio",
192
+ "src": "sfx:thump",
193
+ "startFrame": 14,
194
+ "volume": 0.85
195
+ },
196
+ {
197
+ "id": "sfx-subject-slide",
198
+ "type": "audio",
199
+ "src": "sfx:whoosh",
200
+ "startFrame": 18,
201
+ "volume": 0.6
202
+ },
203
+ {
204
+ "id": "sfx-tag-snap",
205
+ "type": "audio",
206
+ "src": "sfx:pop",
207
+ "startFrame": 28,
208
+ "volume": 0.65
209
+ }
210
+ ]
211
+ }
212
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "motionrender",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "description": "JSON-first, frame-deterministic motion graphics video engine: render compositions to MP4, WebM, ProRes, GIF or PNG frames from Node or the command line.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -49,6 +49,7 @@ Effects are blocks named `fx-*`. `ove blocks` lists them under "Effects". They a
49
49
  | 34 Split reveal | `fx-split-reveal` | overlay |
50
50
  | 35 Gallery | `fx-gallery` | scene |
51
51
  | 36 CTA end card | `fx-cta-card` | scene; footage in a rounded window, not a cut-out |
52
+ | 37 Paper collage | `fx-paper-collage` | scene; editorial halftone cutout with cardstock backing and tape |
52
53
 
53
54
  ## Effects that need a matte
54
55
 
@@ -0,0 +1,78 @@
1
+ ---
2
+ name: ove-paper-collage
3
+ description: Create editorial halftone paper-collage B-roll videos, stop-motion cutouts, torn-paper backgrounds, masking tape strips, and visual metaphors in MotionRender (openvideo). Use when the user wants editorial collage explainers, video essay b-roll, or Vox / Johnny Harris style visual cutouts.
4
+ ---
5
+
6
+ # Editorial Halftone Paper Collage B-roll
7
+
8
+ Create premium 5-second editorial stop-motion paper-collage B-roll clips (inspired by channels like Vox, Johnny Harris, MagnatesMedia, and the `gbro-collage-broll` workflow).
9
+
10
+ ## Core Aesthetic Identity
11
+ 1. **Paper Background**: Solid cardstock color (e.g. warm cream `#e8e0d5`, kraft brown, terracotta, olive green) with procedural film grain (`"grain": 0.12`).
12
+ 2. **Halftone Subject Cutouts**: High-contrast black-and-white photograph cutouts with CSS filters:
13
+ `"filter": "grayscale(1) contrast(1.75) brightness(1.05)"`
14
+ and drop shadows (`"shadow": { "color": "rgba(0,0,0,0.22)", "blur": 18, "offsetX": 5, "offsetY": 9 }`).
15
+ 3. **Paper Tape & Accents**: Translucent off-white or kraft tape strips (`rgba(240, 230, 210, 0.85)`) pinned at dynamic angles (`rotation: -15`).
16
+ 4. **Cardstock Backing Plate**: Rotated backing card (`rotation: -2.5`) sliding in with spring bounce (`easing: "easeOutBack"`).
17
+ 5. **Bold Label Kicker**: High-contrast highlight card (`#facc15` or theme accent) snapping in place over the subject.
18
+ 6. **Procedural SFX**: Synchronized sound design (`sfx:thump` on paper landing, `sfx:whoosh` on slide, `sfx:pop` on tape snap).
19
+
20
+ ---
21
+
22
+ ## 3-Gate Creation Workflow
23
+
24
+ To maintain high visual quality and editorial relevance:
25
+
26
+ ### Gate 1: Visual Metaphor Alignment
27
+ Identify the core message of the voiceover line and translate it into a physical paper object metaphor:
28
+ - Example: *"Interest rates soared overnight"* $\rightarrow$ A torn 1970s bank ledger with a soaring red paper arrow taped over it.
29
+ - Example: *"Silicon Valley poured billions into AI"* $\rightarrow$ A halftone vintage microchip cutout surrounded by stacked dollar band strips.
30
+
31
+ ### Gate 2: Asset Prep
32
+ - Ensure subject images have transparent backgrounds (using `rembg` or cutout masks).
33
+ - Apply high-contrast black-and-white halftone filter via layer `filter`.
34
+
35
+ ### Gate 3: MotionRender Assembly
36
+ Scaffold the project or add the effect block:
37
+
38
+ ```bash
39
+ # 1. Initialize a standalone 5-second collage B-roll project
40
+ mr init my-broll --template collage-broll
41
+
42
+ # 2. Or insert into an existing video composition
43
+ mr add fx-paper-collage video/composition.json --at 120 --frames 150 --set label="BREAKTHROUGH" --set headline="The inflection point"
44
+ ```
45
+
46
+ ---
47
+
48
+ ## Example Composition Snippet
49
+
50
+ ```json
51
+ {
52
+ "id": "subject-cutout",
53
+ "type": "image",
54
+ "src": "assets/statue-head.png",
55
+ "x": 540,
56
+ "y": 860,
57
+ "width": 640,
58
+ "height": 640,
59
+ "rotation": 3,
60
+ "filter": "grayscale(1) contrast(1.75) brightness(1.05)",
61
+ "shadow": { "color": "rgba(0,0,0,0.25)", "blur": 20, "offsetX": 6, "offsetY": 10 },
62
+ "animations": [
63
+ {
64
+ "property": "scale",
65
+ "keyframes": [
66
+ { "frame": 10, "value": 0.4, "easing": "easeOutBack" },
67
+ { "frame": 24, "value": 1.0 }
68
+ ]
69
+ }
70
+ ]
71
+ }
72
+ ```
73
+
74
+ Validate and review the result with:
75
+ ```bash
76
+ mr review video/composition.json --show-safe-zones --output review.png
77
+ ```
78
+
@@ -0,0 +1,213 @@
1
+ {
2
+ "$schema": "./composition.schema.json",
3
+ "version": "1.0",
4
+ "id": "collage-broll",
5
+ "name": "Editorial Collage B-roll",
6
+ "width": 1080,
7
+ "height": 1920,
8
+ "fps": 30,
9
+ "durationFrames": 150,
10
+ "background": "#e8e0d5",
11
+ "grain": 0.12,
12
+ "variables": {
13
+ "label": {
14
+ "type": "string",
15
+ "default": "CRITICAL INSIGHT",
16
+ "description": "Punchy tag on paper tape"
17
+ },
18
+ "headline": {
19
+ "type": "string",
20
+ "default": "Built frame by frame",
21
+ "description": "Main editorial takeaway"
22
+ },
23
+ "accent": {
24
+ "type": "color",
25
+ "default": "#facc15",
26
+ "description": "Highlight tape colour"
27
+ }
28
+ },
29
+ "scenes": [
30
+ {
31
+ "id": "collage",
32
+ "name": "Collage",
33
+ "startFrame": 0,
34
+ "durationFrames": 150,
35
+ "camera": {
36
+ "zoom": 1.0,
37
+ "keyframes": [
38
+ { "frame": 0, "zoom": 1.0 },
39
+ { "frame": 150, "zoom": 1.05, "easing": "drift" }
40
+ ]
41
+ },
42
+ "transitionIn": { "type": "fade", "durationFrames": 12 },
43
+ "transitionOut": { "type": "fade", "durationFrames": 12 },
44
+ "layers": [
45
+ {
46
+ "id": "cardstock",
47
+ "type": "rect",
48
+ "x": 540,
49
+ "y": 920,
50
+ "width": 820,
51
+ "height": 1100,
52
+ "rotation": -2.5,
53
+ "fill": "#fcfbf7",
54
+ "radius": 4,
55
+ "shadow": {
56
+ "color": "rgba(0,0,0,0.18)",
57
+ "blur": 28,
58
+ "offsetX": 8,
59
+ "offsetY": 14
60
+ },
61
+ "animations": [
62
+ {
63
+ "property": "y",
64
+ "keyframes": [
65
+ { "frame": 0, "value": 2100, "easing": "easeOutBack" },
66
+ { "frame": 18, "value": 920 }
67
+ ]
68
+ }
69
+ ]
70
+ },
71
+ {
72
+ "id": "photo-plate",
73
+ "type": "rect",
74
+ "x": 540,
75
+ "y": 860,
76
+ "width": 640,
77
+ "height": 640,
78
+ "rotation": 2.5,
79
+ "fill": "#18181b",
80
+ "radius": 6,
81
+ "stroke": "#ffffff",
82
+ "strokeWidth": 12,
83
+ "shadow": {
84
+ "color": "rgba(0,0,0,0.24)",
85
+ "blur": 20,
86
+ "offsetX": 6,
87
+ "offsetY": 10
88
+ },
89
+ "animations": [
90
+ {
91
+ "property": "scale",
92
+ "keyframes": [
93
+ { "frame": 10, "value": 0.4, "easing": "easeOutBack" },
94
+ { "frame": 24, "value": 1.0 }
95
+ ]
96
+ }
97
+ ]
98
+ },
99
+ {
100
+ "id": "photo-cutout-symbol",
101
+ "type": "text",
102
+ "content": "✂",
103
+ "fontSize": 180,
104
+ "color": "#facc15",
105
+ "x": 540,
106
+ "y": 830,
107
+ "rotation": 15,
108
+ "animations": [
109
+ {
110
+ "property": "scale",
111
+ "keyframes": [
112
+ { "frame": 12, "value": 0 },
113
+ { "frame": 26, "value": 1, "easing": "easeOutBack" }
114
+ ]
115
+ }
116
+ ]
117
+ },
118
+ {
119
+ "id": "tape-top",
120
+ "type": "rect",
121
+ "x": 400,
122
+ "y": 420,
123
+ "width": 240,
124
+ "height": 65,
125
+ "rotation": -15,
126
+ "fill": "rgba(240, 230, 210, 0.85)",
127
+ "startFrame": 20,
128
+ "shadow": {
129
+ "color": "rgba(0,0,0,0.08)",
130
+ "blur": 4,
131
+ "offsetX": 1,
132
+ "offsetY": 2
133
+ }
134
+ },
135
+ {
136
+ "id": "label-badge",
137
+ "type": "text",
138
+ "content": "{{label}}",
139
+ "fontFamily": "Inter",
140
+ "fontWeight": 900,
141
+ "fontSize": 44,
142
+ "color": "#111111",
143
+ "background": "{{accent}}",
144
+ "padding": 16,
145
+ "rotation": -3.5,
146
+ "x": 540,
147
+ "y": 1260,
148
+ "startFrame": 28,
149
+ "shadow": {
150
+ "color": "rgba(0,0,0,0.2)",
151
+ "blur": 12,
152
+ "offsetX": 4,
153
+ "offsetY": 6
154
+ },
155
+ "animations": [
156
+ {
157
+ "property": "y",
158
+ "keyframes": [
159
+ { "frame": 28, "value": 1380, "easing": "easeOutCubic" },
160
+ { "frame": 38, "value": 1260 }
161
+ ]
162
+ }
163
+ ]
164
+ },
165
+ {
166
+ "id": "headline-text",
167
+ "type": "text",
168
+ "content": "{{headline}}",
169
+ "fontFamily": "Inter",
170
+ "fontWeight": 700,
171
+ "fontSize": 48,
172
+ "color": "#18181b",
173
+ "maxWidth": 720,
174
+ "textAlign": "center",
175
+ "x": 540,
176
+ "y": 1380,
177
+ "startFrame": 36,
178
+ "animations": [
179
+ {
180
+ "property": "opacity",
181
+ "keyframes": [
182
+ { "frame": 36, "value": 0 },
183
+ { "frame": 46, "value": 1 }
184
+ ]
185
+ }
186
+ ]
187
+ },
188
+ {
189
+ "id": "sfx-paper-drop",
190
+ "type": "audio",
191
+ "src": "sfx:thump",
192
+ "startFrame": 14,
193
+ "volume": 0.85
194
+ },
195
+ {
196
+ "id": "sfx-subject-slide",
197
+ "type": "audio",
198
+ "src": "sfx:whoosh",
199
+ "startFrame": 18,
200
+ "volume": 0.6
201
+ },
202
+ {
203
+ "id": "sfx-tag-snap",
204
+ "type": "audio",
205
+ "src": "sfx:pop",
206
+ "startFrame": 28,
207
+ "volume": 0.65
208
+ }
209
+ ]
210
+ }
211
+ ]
212
+ }
213
+
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "Editorial Collage B-roll",
3
+ "description": "A 5-second vertical stop-motion paper-collage B-roll scene: cardstock backing, halftone subject, tape strip, bold label tag, and procedural sound effects.",
4
+ "tags": ["collage", "9:16", "b-roll", "halftone", "editorial", "stop-motion", "social"],
5
+ "order": 14,
6
+ "previewFrame": 60,
7
+ "brief": "A 5-second 9:16 editorial paper-collage B-roll video: warm paper background with grain, cardstock backing, black-and-white halftone photograph cutout, masking tape accent, label tag, and sound effects."
8
+ }
9
+