Skip to content

armgit / raea

Public Imported from GitHub
0

Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.

layers LA7a: the delivery and words guides teach the layered exports; skills pinned at the raea-skills layers-exports branch

Zachary Guglinee3451714dd6
diff --git a/sdk/guides/craft/motion/delivery.md b/sdk/guides/craft/motion/delivery.md
index a12952dd..3b935bf8 100644
--- a/sdk/guides/craft/motion/delivery.md
+++ b/sdk/guides/craft/motion/delivery.md
@@ -30,12 +30,23 @@
- Publishing is the person's. The app's Publish view sends a post to a network, now or at a time, after checking it
against that network's guidelines; nothing goes out until they press Publish or Schedule. Have the file, its tags
and, when asked, a caption within the network's limit ready for them.
-- When the person finishes the cut in an editor, hand it over in layers: `raea export capcut EDIT.tsx` writes the
- composition as a CapCut draft, its footage and sounds as clips of their own files at their trims and gains and
- everything raea draws as transparent clips over them, entered in CapCut's project list (CapCut must be closed;
- `-o DIR` writes the draft folder anywhere). In the raea app it's Export to, then CapCut, on the render's card, or To
- CapCut on its page. Pass on what the export notes: a clip that moves or fades within its shot lands as its first
- frame shows it, and a Tone graph's music has no file to place.
+- When the person finishes the cut in an editor, hand it over in layers. For CapCut, `raea export capcut EDIT.tsx`
+ writes a draft entered in CapCut's project list (CapCut must be closed; `-o DIR` writes the draft folder anywhere);
+ in the raea app it's Export to, then CapCut, on the render's card, or To CapCut on its page. For Premiere Pro and
+ DaVinci Resolve, `raea export xml EDIT.tsx` writes out/xml/NAME with an XML for each: NAME.premiere.xml (Premiere:
+ File, Import) and NAME.resolve.xml (Resolve: File, Import, Timeline).
+- In each, the footage and sounds are clips of their own files at their trims and gains (the XML points at them
+ where they are; the CapCut draft copies them in), placed, cropped and keyframed as the composition moves and fades
+ them; everything raea draws is transparent clips, the graphics over the footage and what's under it (a background
+ holding footage, the 3D) below; captions are a track of their own, styled as drawn, with their words as an .srt
+ beside them. Each export also puts reference.mp4, the composition as raea renders it, in its folder, to set beside
+ the editor's timeline.
+- The editor gets captions and graphics as pictures. Mark captions so they're their own track (`motion/words`), and
+ fix a word in raea and export again: retyped in the editor, it no longer matches the picture.
+- Pass on what the export notes. CapCut can't animate a crop: footage whose cut changes over its clip (a split
+ screen's seam moving) is cut there as its first frame shows it, its moves and fades keyed. Premiere and Resolve get
+ a clip at another speed at its own speed, and a sound's fades to set by hand; Resolve's footage is placed for its
+ default Input Scaling (Scale entire image to fit). A Tone graph's music has no file to place.
- Graphics for someone else's edit (a lower third, a title, a logo sting) go out as a transparent movie:
`raea render gfx.tsx -o out/lower-third.mov --alpha` (ProRes 4444 on a Mac, QuickTime Animation elsewhere;
`--alpha-codec hevc` for a far smaller file, on a Mac). Draw nothing behind them: no full-frame fill, no background.
@@ -50,7 +61,9 @@ its hook in another. The numbers that decide this (shapes, lengths, file sizes,
are the app's own publishing guidelines, generated into reference/platforms.md, so a delivery made to them is one
Publish accepts without a fix. Tags with the same keys across a project are what make the Table a delivery list
rather than a pile of files. An editor finishing the cut needs layers, not a flattened picture: a draft with the
-footage as clips and raea's drawing over them keeps every cut and title editable, where an .mp4 bakes them in.
+footage as clips and raea's drawing over them keeps every cut and title editable, where an .mp4 bakes them in. The
+two XMLs differ only where Premiere and Resolve read the same FCP7 XML differently (each was checked against its own
+exports and renders), so one file can't be right in both.
## Common mistakes
@@ -66,6 +79,11 @@ footage as clips and raea's drawing over them keeps every cut and title editable
- A transparent movie with a full-frame background, which covers the footage it's laid on; or `--alpha` with an
.mp4, which holds no alpha (raea refuses it: use .mov).
- Exporting to CapCut while CapCut is open. It rewrites its project list when it quits, so raea refuses: quit it first.
+- Captions not marked `data-raea-role="caption"`: the layered export can't tell them from the graphics, so they
+ arrive inside the graphics track with no .srt.
+- A caption or a title retyped in the editor. It's a picture there: fix it in raea and export again.
+- NAME.premiere.xml imported into Resolve, or NAME.resolve.xml into Premiere. Each editor reads FCP7 XML's crop,
+ scale and position its own way, so each gets its own file.
## Example: one piece in the three shapes it ships in
diff --git a/sdk/guides/craft/motion/words.md b/sdk/guides/craft/motion/words.md
index 9ff7c7b1..c0365b12 100644
--- a/sdk/guides/craft/motion/words.md
+++ b/sdk/guides/craft/motion/words.md
@@ -16,6 +16,9 @@
- Size captions at 60 px or more at 1080 wide (scale with the width), with at least 3:1 contrast against the pixels
behind them. Keep them in one place unless a move means something, and keep them off cards, logos, burned-in text
and the face (`motion/placement`).
+- Mark each caption: `data-raea-role="caption"` on the element holding its words. A layered export (`raea export
+ capcut`, `raea export xml`; `motion/delivery`) then puts the captions on a track of their own, styled as they're
+ drawn, and writes their words as an .srt beside them; unmarked, they're part of the graphics.
- The transcript reaches the render for you: `raea cut` writes words.json beside the edit, and `raea render` reads it
from there. Give it to `raea check` with `--words words.json`, so the check can match cues to their words.
@@ -76,7 +79,7 @@ function Captions() {
const g = groups[i];
const local = f - g[0].from;
return (
- <div style={{
+ <div data-raea-role="caption" style={{
width: "100%", textAlign: "center", fontFamily: "var(--brand-font-heading)", fontWeight: 800, fontSize: 84, lineHeight: 1,
color: "var(--brand-text)", textShadow: "0 4px 24px rgba(0,0,0,0.5)",
transform: `translateY(${interpolate(local, [0, 5], [24, 0], { ...clamp, easing: OUT })}px)`,
diff --git a/skills b/skills
index fbebab5f..27175db3 160000
--- a/skills
+++ b/skills
@@ -1 +1 @@
-Subproject commit fbebab5f640b17047731cac3eaa60a69dc19e37d
+Subproject commit 27175db3f85576c4f4b8707dcc856e9120bf64e3