11 Commits
Author SHA1 Message Date
Zachary GuglinandClaude Opus 5.5 338c140f4c layers LA2c: what's behind a picture in picture is its own layer, between it and the footage under it
A picture in picture on a card over footage that fills the frame lost its card: the card is a background holding
footage, so it went into the under layer, beneath every piece of footage, where the full-frame clip covers it (the
multi-clip test's C in the corner over B at 4-6 s: 23.2 dB). CapCut's export always had this.

- systems/layers hide.rs: RAEA_LAYER=behind:FILE draws the backgrounds of what holds FILE and no other footage; what
  holds other footage too is cleared, not hidden (the page draws nothing inside a hidden element); the rest hidden.
- apps/layers: a behind:FILE pass for each file shown as a picture in picture, its clips kept only where it is one, on
  a "behind picture in picture" track (Layer::Backing) between the pictures in picture and the footage that fills the
  frame. CapCut names it "raea behind picture in picture".
- composite.rs finds a layer's frames by its movie's name (several backing passes), and RAEA_LAYERS_PROJECT checks a
  project of its own: the multi-clip test passes at 36.2-42.7 dB (37.5-38.3 in the picture in picture); the fixtures
  still pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 15:04:22 -08:00
Zachary GuglinandClaude Opus 5.5 6b410a9827 layers LA2b, LA3a, LA4a: raea export layers writes the layers and layers.json; the 3D is the layer under the page
- apps/layers (new): `raea export layers EDIT.tsx [-o DIR]` renders the reference with its manifest, then the
  graphics, under (when there's footage or 3D) and captions (when a frame shows one) passes; writes each layer's
  movie, layers.json (model.rs: the editor-neutral timeline, tracks top to bottom, footage linked to its own sound),
  NAME.srt (srt.rs) and reference.mp4. The manifest's readers (runs, sounds, spans, full, resolve) move here from
  apps/capcut/src/plan.rs; CapCut keeps its own placement and track laying and reads the rest from here.
- engine/page manifest.rs: a text entry inside data-raea-role="caption" says caption: true (the SRT's words, and
  whether the captions pass runs). runtime/export: the manifest says has3d.
- The 3D moves from the graphics layer to the one under the page (raea_sys_layers::draws_3d): raea draws the 3D first
  and the whole page over it, footage included. The under pass renders opaque, since --alpha clears the 3D's clear
  colour, which is the page's background over 3D (three-d lost its background: 21 dB before, 39 after).
- vendor/blitz-dom mutator.rs: an element whose :has() was matched (ANCHORS_RELATIVE_SELECTOR) is matched again when a
  node under it is inserted or removed, as Chrome does. A caption a <Sequence> put on the page at frame 10 stayed
  hidden under the captions pass's :not(:has(...)) (lower-third: 23.5 dB before, 34.1 after); footage coming in
  later under RAEA_HIDE_MEDIA=under had the same fault. Recorded in vendor/vendor.toml.
- apps/layers composite.rs (LA3a), an ignored test run by hand with a GPU: four fixtures (apps/layers/fixtures)
  exported, composited back bottom to top at each clip's first, middle and last frame, against the reference:
  highlight 33.0-35.1 dB, lower-third 34.1-35.1, pip-card 33.2-33.5, three-d 39.1-39.8 (floor 30).
- docs/layers.feature brought up to what was built; docs/manual/reference/cli/export.md regenerated
  (tools/manual-ref.sh gen). The skill's reference/cli.md (raea-skills) needs the new verb with LA7.

Tests: raea-app-layers, raea-app-capcut, raea-sys-layers, raea-runtime-scene, raea-runtime-page, raea-runtime-bundle,
blitz-dom, raea-cli (with the skills submodule), sdk/timeline; tools/layers.sh. raea export capcut runs as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 15:04:09 -08:00
Zachary GuglinandClaude Opus 5.5 9df6d769e3 layers LA1-LA2: captions marked data-raea-role="caption", and RAEA_LAYER renders one layer of an export (captions, graphics, under)
docs/layers.feature amended: text is part of the graphics layer (a text layer only ever opt-in), one `raea export xml`
for Premiere and Resolve, the composite check a test of the method rather than every export's, no reuse of an earlier
render, no unmarked-caption heuristic.

- sdk/timeline: the captions operation's `text` ops say `caption: true`, as does a caption clip added on its own
  (said: true), so the code raea-feed writes can carry the mark.
- runtime/page elements.rs: data-raea-role is kept on the page (KEPT names the data-raea- props the page keeps; the
  mark was dropped before it could be matched).
- systems/layers hide.rs: RAEA_LAYER=captions draws only what is marked a caption: the page draws nothing inside a
  hidden element (vendor/blitz-paint render.rs), so what holds a caption is cleared, not hidden, as RAEA_HIDE_MEDIA=under
  clears what holds footage. graphics and under are RAEA_HIDE_MEDIA's 1 and under, less the captions. RAEA_HIDE_MEDIA's
  own CSS is unchanged, so raea export capcut is too. hiding_css is the pure function hidden_css reads the settings into.
- runtime/scene items_of: a layer that draws no 3D (captions, under; raea_sys_layers::draws_3d) keeps only the
  cameras, since Bevy draws the 3D and the page's CSS can't hide it. This also keeps the 3D out of capcut's under pass
  once it moves onto RAEA_LAYER.
- runtime/bundle cache.rs: a render with RAEA_LAYER isn't the export cache's, as with RAEA_HIDE_MEDIA.

Checked with a source build on two fixtures (footage on a card, a lower third and a caption with a highlighted word;
a 3D turntable with a title and a caption): each layer draws only its own, and raea export capcut writes its draft
as before. Tests: raea-sys-layers, raea-runtime-scene, raea-runtime-page, raea-runtime-bundle, sdk/timeline.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 14:58:27 -08:00
shinyobjectz c65baf2c81 FP12a: patch heads say where in the frame a picture defect is. raea fingerprint bootstrap also puts FP0f's local defects in a random box of up to 6 frames a source (a blurred patch, a black hole, heavy grain, flat grey, a local glow; one that changes its box by under 6 levels is left out) and fits a logistic on SigLIP 2's 196 patch tokens per axis. Held out by source from 8 frames on 27 real renders: barren 0.92, glitch 0.90, blur 0.88 (0.79 before the visible rule), glow 0.49; an axis says where only at 0.85. score gives a flagged moment its place and the layers under it, by name (raea-sys-layers reads names); --json has at, the sheet boxes it in amber 2026-11-12 22:08:25 -08:00
shinyobjectz 677ca278ba FP13a, FP13c, FP10a: raea fingerprint things FILE finds a piece's shots, its things with their depth and the ground under them every half second and a SigLIP 2 vector each (a render's things from its layer pass, NAME.layers, and its depth from its AOV pass when beside it, with no model run; footage's from the marks on its notes, followed by EdgeTAM, on Depth Anything 3 Small), and the camera's path (Lucas-Kanade flow); geometry.rs measures floating, passing through, a camera that changes speed mid-move and an empty frame, each with red-team cases, and raea check --things reports them as findings, never heads. The layers file reader moves from runtime/world into raea-sys-layers so both read it, and raea-perceive depth-values takes many frames to one model load. report names the axes stuck under the gate with 300 labels or more, the only ones that may try another encoder or an adapter 2026-11-12 20:28:09 -08:00
shinyobjectz 07cd85e663 CC1, CC2: raea render -o OUT.mov --alpha writes a transparent movie natively, and raea export capcut EDIT.tsx writes the composition as a CapCut draft ready in its timeline (docs/capcut.feature)
raea-io-alpha encodes --alpha PNG frames (straight alpha) as a QuickTime movie: ProRes 4444 or HEVC with alpha through AVAssetWriter on the Mac, and QuickTime Animation (32-bit ARGB run-length, FFmpeg's qtrle layout) or PNG frames on every platform. `--alpha-codec prores|hevc|rle|png` picks one; prores is the Mac's default, rle elsewhere. CC1a, on a 3 s 1080x1920 graphic: 12.3 MB, 0.34 MB, 0.84 MB and 7.4 MB; rle and png decode identical to the PNGs, prores and hevc alpha within 61 dB, and a frame that draws nothing decodes fully transparent in all four.

raea-io-capcut writes CapCut 8.5.0's draft as CapCut writes it (an empty project and one with a clip placed by hand give its skeleton and a video segment's companion materials): one material per segment, times on the frame grid, media copied into its assets/, version markers from the newest draft CapCut made, and the entry in root_meta_info.json (backed up first, refused while CapCut runs). raea-app-capcut renders the composition three times: as it is with --manifest (footage runs, sound clips); with its footage and the backgrounds holding it hidden (RAEA_HIDE_MEDIA=1, the overlay); and with only those backgrounds (RAEA_HIDE_MEDIA=under, kept unless black). Footage becomes clips of the original files at their trims and rates, placed by object-fit (cover, contain, a cover crop), keeping their own sound at the composition's gain; sounds become audio clips with gains and fades; the overlay becomes clips cut where it draws. The manifest gains each video's object-fit and each sound's rate and fades, and the export cache is skipped under RAEA_HIDE_*. Checked on two fixtures: the draft's layers composited in ffmpeg match raea's render (31-33 dB against its H.264). Not yet checked: the draft opened in CapCut itself (CC3a). The CLI reference gains export (in Make) and --alpha-codec.
2026-11-11 06:43:39 -08:00
shinyobjectz bb0a1768c5 DR2: every render writes its manifest beside its output (OUT.render.json, or DIR/NAME.render.json); raea world joins the composition's newest render (from the project's record, or --render OUT): each text's Contrast against its pixels, the frame's and each shot's Picture (light and movement), the render's Mix, each cue's Onset in it, and Covers from a render with --layers, measured on the output when asked (raea-sys-measure, which raea check's contrast and loudness now call) and kept in the manifest; a frame or world with no render says what Waits for one 2026-11-10 10:39:13 -08:00
shinyobjectz b85409d738 Layer pass conformance (docs/review.feature R2e): a flat <Screen> and a skinned character (RobotExpressive, CC0, walking) in bench/layers/conformance.tsx, each one layer. A Screen carries its source stamp (engine/bundle stamp.rs PART_NAMES), and an ImagePlane or Screen panel gets its LayerKey and RAEA_HIDE_LAYERS visibility like a mesh (runtime/scene lib.rs bevy_parts; models.rs panels_rows sends its components). A fifth mutant, bind (a skinned mesh drawn in its bind pose, systems/frame layer.rs posed), fails at IoU 0.80, so the oracle checks the pose. All 18 layers IoU >= 0.962; all five mutants fail. 2026-11-09 13:27:32 -08:00
shinyobjectz ed0ebd2c01 Layer pass before landing (L1): RAEA_HIDE_LAYERS's page CSS (hidden_css, layer_selector) moved from raea-runtime-bundle, which was over its 2000 lines, to raea-sys-layers (hide.rs); the render manifest's videos and text moved to engine/page motion/manifest.rs (motion.rs was over 500); raea-sys-layers in tools/layers.toml (systems, a facility raea-sys-frame builds on). Copies folded: a part's key from its props is raea_sys_layers::key_from_props (runtime/scene bevy_parts), an env switch set to 1 is raea_io_home::env_on (fresh.rs stamps, apps/game probing), and the ID scene draws a box shadow as its element's layer out to 1.5 deviations past its box (hiding an element hides its shadow) instead of skipping it. 2026-11-09 13:06:19 -08:00
shinyobjectz e029385319 Layer pass, the 3D's half (docs/review.feature R2b, R2e; work in progress, parked with the source stamps): each Engine::draw records its frame's meshes with --layers (systems/frame layer.rs record: every shown Mesh3d from the lowest-order active Camera3d drawn on the CPU straight at mask size, nearest first, as the layer of the nearest part up with a LayerKey; skinned meshes posed by their joints; no morph targets), and the file's mask is the page's where it painted and the 3D's elsewhere (raster.rs, Recorder::frame_3d). Names: a use's outermost element is named after its component (Badge), an unnamed part after its tag (Mesh3d), else aria-label, class, tag. RAEA_LAYERS=1 turns it on too, until --layers is in the help with its manual entry. bench/layers: a third mesh in front of the moving cube, written before it; mutants.sh breaks the pass four ways (keys swapped, the 3D 2 px right, the farthest triangle winning, the page under the 3D): each fails compare.sh while the pass passes all 15 layers at IoU >= 0.969. 2026-11-09 12:48:31 -08:00
shinyobjectz 7a3e87dddb Layer pass, the page's half (docs/review.feature R2b, R2c, R2e; work in progress, parked with the source stamps): raea render --layers writes NAME.layers v1 (systems/layers, raea-sys-layers: gzip of RAEALAYR, the header's table of layers, each frame's quarter-size mask as runs) and render.json's "layers" names it. The page is painted a second time once the frame's update has laid it out: blitz-paint now names the node each paint call draws for (painting()), and an ID scene on vello_cpu draws that node's layer index as a flat colour with antialiasing off (edges counted above 12/255 coverage, glyphs emboldened as the page draws them). bench/layers/compare.sh scores each layer's mask (its own pixels plus those of the layers inside it) against oracle.sh's: all 12 page layers pass at IoU >= 0.977 at frames 10, 45 and 80. The 2 mesh layers come with the 3D half. key_of moved to raea-sys-layers (systems/frame re-exports it). 2026-11-09 12:45:05 -08:00