Skip to content

programmatic video rendering framework that is actually fast

docs(skill): address review comments

Dmitriy Kovalenko5c450345fed3
diff --git a/fframes-three-d/src/render/post.rs b/fframes-three-d/src/render/post.rs
index b3722db6..dc7f8c0b 100644
--- a/fframes-three-d/src/render/post.rs
+++ b/fframes-three-d/src/render/post.rs
@@ -45,8 +45,9 @@ pub enum ToneMapping {
/// white.
#[default]
Aces,
- /// three.js `NeutralToneMapping` (Khronos PBR Neutral). It keeps the hue and saturation
- /// of mid and bright base colors.
+ /// three.js `NeutralToneMapping` (Khronos PBR Neutral). It keeps the hue of base colors
+ /// and the saturation of mid colors. Above 0.76 (linear) it compresses the brightest
+ /// channel toward 1 and mixes the color with white, so highlights lose saturation.
///
/// The curve subtracts 0.04 (linear) from every channel. This removes the 4% white
/// reflection that a lit dielectric gets from a bright environment. A color whose darkest
diff --git a/skills/fframes-video/references/3d.md b/skills/fframes-video/references/3d.md
index 19c1222e..b95d94d4 100644
--- a/skills/fframes-video/references/3d.md
+++ b/skills/fframes-video/references/3d.md
@@ -131,8 +131,9 @@ In `render_frame`: `let image = self.shot.image(t, frame.animate(&self.open));`
- **Matching the look.** Pick one lighting setup per video: `Environment::studio()` for
products, an HDR panorama (`Environment::map`) for real places. `ToneMapping::Neutral`
keeps the hue of mid and bright brand colors on light grounds, but it crushes dark colors:
- below sRGB `#505050` they go toward black and shift in hue (`#1a1c20` renders near
- `#080c13`). For a dark ground or a dark product use ACES (the default, filmic, shifts
+ below sRGB `#505050` they go toward black and shift in hue (`#1a1c20` renders as `#02060f` on an
+ unlit material, and near `#080c13` on a standard material under a white directional
+ light). For a dark ground or a dark product use ACES (the default, filmic, shifts
saturated colors) with `.exposure(1.3)` to `.exposure(1.6)`, or `ToneMapping::Linear` when
flat and unlit colors must match their hex exactly. Match the SVG palette with
`fframes::Color::from(rgb)` of the material colors.
diff --git a/skills/fframes-video/references/api.md b/skills/fframes-video/references/api.md
index f2926f71..3a99b699 100644
--- a/skills/fframes-video/references/api.md
+++ b/skills/fframes-video/references/api.md
@@ -126,8 +126,9 @@ fframes::svgr!(
caps the natural settle time; omit the end in `timeline!` to let the spring settle.
- For precomputed geometry, motion-blur subframes or a custom clock,
`runtime.solve(&elapsed_seconds)` evaluates the same easing
- directly. Handle times before the start and after `get_duration()` explicitly: `Linear`
- and `Spring` do not clamp them (the bezier easings do). Use a custom curve only when the required motion is not represented
+ directly. Handle times before the start and after `get_duration()` explicitly: `Linear`,
+ `Spring` and a diagonal `CubicBezier` (`x1 == y1` and `x2 == y2`) do not clamp them; the
+ other bezier easings do. Use a custom curve only when the required motion is not represented
by the available easings.
- Easing: `Linear`, `EaseIn`, `EaseOut`, `EaseInOut`, `CubicBezier(x1, y1, x2, y2)`, `Spring {..}`.
Use the named ones and `Spring`; `design.md` says which fits where.
@@ -181,8 +182,10 @@ family, size and weight in the `<text>` attributes. `text-anchor="middle"` cente
and combine providers with `CombinedMediaProvider::from([&static_media as &dyn MediaProvider, &media])`.
- Video frames: `frame.get_synced_video_frame(ctx, "clip.mp4", &SyncVideoFrameInput { start_from, looping, speed, editor_fallback_image })`
(`speed: 2.0` plays twice as fast, `..Default::default()` keeps 1.0)
- then `let image = video_frame.into_image();` and `<image href={image.href()} .../>` (needs
- the `compile-time-svgtree` feature). The video frame itself has no `href()`.
+ returns an `Option`: `let Some(video_frame) = .. else { return Svgr::empty() };` then
+ `let image = video_frame.into_image();` and `<image href={image.href()} .../>` (needs the
+ `compile-time-svgtree` feature). The video frame itself has no `href()`, and its methods
+ need `use fframes::FFramesSyncedVideoFrame;`.
`start_from` is when the video starts on the timeline, not a position in the file.
- Footage: `Clip::new("IMG_0926.mov", 19.2..24.7)` is seconds 19.2 to 24.7 of the file,
`Clip::new("cam.mp4", 0.0..)` the whole file (`.at(1.2)` starts it at 1.2 s of the scene, `.speed(1.5)`, `.reverse()`, `.looping()`).