From 52a07b623949ffe8f88460ee6dc90c75e0fb2a84 Mon Sep 17 00:00:00 2001 From: Zachary Guglin Date: Mon, 16 Nov 2026 16:53:11 -0800 Subject: [PATCH] layers spec, amended: text stays in the graphics layer, captions are the only layer split out of it docs/layers.feature after working through the implementation: - Text is part of the graphics layer. Pulling words apart from the graphics they're built into (kinetic type, words cut from a shape, a word behind a graphic) caused more problems than it solved; a text layer may come later, opt-in only (an element marked data-raea-role="text"), never guessed. - Captions are the only layer split from the graphics: marked data-raea-role="caption", nothing guessed. - One `raea export xml` for Premiere and Resolve; a command of an editor's own only if testing finds it reads the XML differently. - Leaner: the layers composited back is a test of the method, not run on every export; an export always renders its own reference; no `raea check` heuristic for unmarked captions; no moving covered captions (captions go on top). - What rendering the passes taught: the page keeps only the data-raea- props it names, it draws nothing inside a hidden element (so the captions pass clears what holds a caption), and 3D is Bevy's, so a layer without it leaves the 3D out of the scene and keeps its cameras. Spec only; no code. Co-Authored-By: Claude Opus 5.5 --- docs/layers.feature | 154 +++++++++++++++++++++----------------------- 1 file changed, 73 insertions(+), 81 deletions(-) diff --git a/docs/layers.feature b/docs/layers.feature index 7942ebee..a4d1661c 100644 --- a/docs/layers.feature +++ b/docs/layers.feature @@ -1,111 +1,103 @@ @spec -Feature: A render in layers: captions, text, graphics, footage and sound apart, for CapCut, Premiere, Resolve and raea's timeline +Feature: A render in layers: captions, graphics, footage and sound apart, for CapCut, Premiere, Resolve and raea's timeline wackyza, 2026-11-16: "export a rendered video, in all its component layers (video, audio, graphics, all separate) to - Premiere, Resolve and Capcut ... keep graphics on one overlay track. Titles aka text elements should be their own - track. And captions, if applicable, should be their own track. I think this separation would be valuable for the - internal (in-app) timeline as well ... the best order of events might be to get the layers rendering really robust, - then be able to push it to the in-app timeline and all the ext editors". + Premiere, Resolve and Capcut ... keep graphics on one overlay track ... And captions, if applicable, should be their + own track. I think this separation would be valuable for the internal (in-app) timeline as well ... the best order + of events might be to get the layers rendering really robust, then be able to push it to the in-app timeline and + all the ext editors". + + wackyza, 2026-11-16, on text: "sometimes text is complexly integrated into graphics and separating it out is liable + to cause more problems than good. Whereas I'm confident captions should always be their own layer." So text is part + of the graphics layer. A text layer of its own may come later, opt-in only (an element marked + data-raea-role="text"), never guessed. A cut finished in another editor needs its parts, not one flattened movie. `raea export capcut` (docs/capcut.feature) already hands CapCut the footage and sounds as clips of their own files and everything raea draws as one - transparent overlay. This spec takes that split out of the CapCut export, makes it finer (captions and text apart - from the other graphics), proves it against the render, and gives it to every editor from one place: CapCut, - Premiere Pro and DaVinci Resolve, and the layout of raea's own timeline. + transparent overlay. This spec takes that split out of the CapCut export, adds captions as a layer of their own, + proves it against the render, and gives it to every editor from one place: CapCut, Premiere Pro and DaVinci + Resolve, and the layout of raea's own timeline. What there is to build on (read 11-16): - apps/capcut: the manifest's frames grouped into runs of footage and sound (plan.rs), the overlay rendered with the footage hidden (RAEA_HIDE_MEDIA=1) and what's under it (RAEA_HIDE_MEDIA=under), written as a CapCut draft (io/capcut). Its plan is written in CapCut's types, so no other editor can use it as it is. - - systems/layers: hide.rs hides layers by key (RAEA_HIDE_LAYERS) and the footage (RAEA_HIDE_MEDIA) as page CSS; - page.rs already calls an element whose children are all text "text", and footage "video". + - systems/layers: hide.rs hides layers by key (RAEA_HIDE_LAYERS) and the footage (RAEA_HIDE_MEDIA) as page CSS. - io/alpha: transparent movies without ffmpeg (CC1): ProRes 4444, HEVC with alpha, QuickTime Animation, PNG. - - sdk/timeline: tracks by kind (effect, text, overlay, main, sound, TL1a); the captions operation (TL7c) puts - lines on a track named Captions, and read.ts writes each line into the composition as a `text` op, the same op - a title is written with, so once in the code a caption and a title can't be told apart. + - sdk/timeline: the captions operation (TL7c) puts lines on a track named Captions, and read.ts writes each line + into the composition as a `text` op, the same op a title is written with, so once in the code a caption and a + title can't be told apart. The layers, top to bottom, and what each is: | layer | what it holds | what the editor gets | - | captions | the words said, as raea draws them (CA1) | a transparent movie + an .srt beside | - | text | titles and other words on the picture that aren't captions | a transparent movie | - | graphics | everything else raea draws over the footage: shapes, 3D, FX | a transparent movie | + | captions | the words said, as raea draws them, marked (LA1) | a transparent movie + an .srt beside | + | graphics | everything else raea draws over the footage: text, shapes, 3D | a transparent movie | | footage | each