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.
TypeScript 3dagent-skillsai-agentsai-videobevyclaude-codegame-enginegpulinuxmacosmotion-designmotion-graphicsreactrusttypescriptvideo-editingvideo-renderingwgpuwindows
Stills of a 2D piece skip the 3D rows' pass over the whole timeline
Leonardo Gonzalez2774a34db1a6
diff --git a/runtime/export/src/fed.rs b/runtime/export/src/fed.rsindex 536bdac0..34289607 100644--- a/runtime/export/src/fed.rs+++ b/runtime/export/src/fed.rs@@ -20,6 +20,27 @@ pub(crate) struct FrameLog {pub(crate) rows: Vec<(i64, f64, [f64; 5])>,}+/// Whether any of `frames` shows 3D: each rendered on its own in one runtime (frames are pure, so a frame stepped+/// alone is the frame a whole pass would have stepped), stopping at the first that does.+pub(crate) fn frames_hold_3d(js: &Path, dir: &Path, frames: &[i64]) -> R<bool> {+ edit_dir(dir);+ let mut app = App::new();+ app.add_plugins(MinimalPlugins).add_plugins(ReactPlugin::new(js.to_path_buf()));+ app.insert_resource(raea_runtime_react::OneBatch::default());+ settle(&mut app, Some(-1), 20.0)?.ok_or("the composition's settings didn't arrive")?;+ let mut held = false;+ for &f in frames {+ raea_runtime_bake::step_frames(&mut app, f, f + 1, |app, _| {+ held |= !scene_of(app.world_mut()).is_empty();+ Ok(())+ })?;+ if held {+ break;+ }+ }+ Ok(held)+}+/// The frames `scene_program_to` reads its rows from, with the composition's size and rate.////// Stepped as a bake steps (bake.rs, lightspeed T3): React renders a range of frames back to back (raea-frames) anddiff --git a/runtime/export/src/run.rs b/runtime/export/src/run.rsindex 7a9daf1e..afffe72f 100644--- a/runtime/export/src/run.rs+++ b/runtime/export/src/run.rs@@ -60,6 +60,16 @@ pub(crate) fn scene_program_to(js: &Path, dir: &Path, upto: i64) -> R<Option<rae/// A render's 3D rows as `scene_program_to` makes them, and the 3D parts that pass through each other on screen in/// `wanted` (one frame, a still; else all): said on stderr, and kept for the render's manifest (FED_CLIPPING).pub(crate) fn scene_program_checked(js: &Path, dir: &Path, upto: i64, wanted: Option<&[i64]>) -> R<Option<raea_core_program::ir::Program>> {+ // stills: the frames asked for looked at first, each on its own (frames are pure). When none of them shows 3D,+ // their render needs no rows, and a 2D piece's still skips stepping its whole timeline (an 80 s film's still took+ // 16 s here, all of it the rows' pass finding no 3D)+ if let Some(w) = wanted.filter(|w| !w.is_empty()) {+ raea_runtime_react::startup_mark("the 3D's rows: the wanted frames looked at");+ if !frames_hold_3d(js, dir, w)? {+ raea_runtime_react::startup_mark("the 3D's rows: none in the wanted frames");+ return Ok(None);+ }+ }raea_runtime_react::startup_mark("the 3D's rows: stepping React through the frames");let Some((frames, w, h, fps)) = scene_frames_to(js, dir, upto)? else { return Ok(None) };raea_runtime_react::startup_mark("the 3D's rows: frames stepped");