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.

log: the 3D camera is the shadow LOD origin, and bevy_time's warning is filtered (#104, #89 item 7)

Mattias Hjemgaardab0babcce7d9
diff --git a/engine/render/src/engine/open.rs b/engine/render/src/engine/open.rs
index 2c12f9f1..b5daf6a2 100644
--- a/engine/render/src/engine/open.rs
+++ b/engine/render/src/engine/open.rs
@@ -46,7 +46,8 @@ impl Engine {
// quiet on a good run: bevy_log's "Could not set global logger" (raea_io_trace owns `log` in a play
// or a render, and its records go there, as meant) and a pass-timing readback that missed a frame
// (RenderDiagnosticsPlugin's "Failed to download render statistics buffer": one second's bevy_passes lost)
- .set(bevy::log::LogPlugin { level: bevy::log::Level::WARN, filter: format!("{}bevy_log=off,bevy_asset::io::web=error,bevy_asset::io::source=error,fontdb=error,bevy_render::diagnostic::internal=error", bevy::log::DEFAULT_FILTER), ..default() })
+ // and bevy_time's "did not receive the time from the render world" (raea steps Time by frame)
+ .set(bevy::log::LogPlugin { level: bevy::log::Level::WARN, filter: format!("{}bevy_log=off,bevy_asset::io::web=error,bevy_asset::io::source=error,fontdb=error,bevy_render::diagnostic::internal=error,bevy_time=error", bevy::log::DEFAULT_FILTER), ..default() })
// glTF models (scene3d) load from the paths their rows name, which are the edit's files wherever they are.
// Hot reload (Bevy's file_watcher, in the bevy-all build) only when asked, RAEA_BEVY_WATCH=1: a render or a
// baked play reloading an asset mid-run would draw frames that a render alone doesn't
diff --git a/engine/render/src/engine/spawn.rs b/engine/render/src/engine/spawn.rs
index 68f891a4..baa42612 100644
--- a/engine/render/src/engine/spawn.rs
+++ b/engine/render/src/engine/spawn.rs
@@ -59,6 +59,8 @@ pub(crate) fn spawn_camera(world: &mut World, e: Entity, vals: &BTreeMap<String,
// single-sampled prepass (compose.rs)
if has_3d && !preview() && !vals.contains_key("ssao") && !vals.contains_key("aa") && !vals.contains_key("outline") && !vals.contains_key("frame_looks") && !vals.contains_key("passes") { Msaa::default() } else { Msaa::Off },
Transform::from_xyz(g("x", 0.0), g("y", 2.0), g("z", 9.0)).looking_at(Vec3::new(g("look_x", 0.0), g("look_y", 1.0), g("look_z", 0.0)), Vec3::Y),
+ // the shadow LOD origin (drawing into an image, Bevy picked one and warned on every 3D run)
+ bevy::camera::ShadowLodOrigin,
));
// three.js-style scenes (raea's 3D): a vertical field of view in degrees, and an ambient
// light on the camera (brightness in cd/m²); without them the camera is as it always was
diff --git a/io/trace/src/lib.rs b/io/trace/src/lib.rs
index 5595c63e..20af9257 100644
--- a/io/trace/src/lib.rs
+++ b/io/trace/src/lib.rs
@@ -315,7 +315,9 @@ impl log::Log for Logger {
// acts on: the `log` crate is third-party crates' (Bevy's Ctrl+C handler at info, fontdb's skipped faces: a
// system font it can't parse, or a missing @font-face file raea_sys_page_net already names), which printed
// on every render and buried what mattered (#34)
- if r.level() <= log::Level::Warn && !r.target().starts_with("fontdb") {
+ // bevy_time's "did not receive the time from the render world" too: raea drives Time by frame with the render
+ // world in step, so it says nothing a reader acts on
+ if r.level() <= log::Level::Warn && !r.target().starts_with("fontdb") && !r.target().starts_with("bevy_time") {
eprintln!("[{} {}] {}", r.level(), r.target(), r.args());
}
event("log", json!({"level": r.level().as_str(), "target": r.target(), "message": r.args().to_string()}));