Expand description
Compositions (ffcine.comp/1, docs/compositing.md): a canvas and layers, bottom first,
whose parameters are param tracks (ffcine_core::anim). A comp is read and validated once
(Comp), cut into pieces at layer in/out points (Comp::pieces), and each piece is
lowered on the CPU into what the GPU pass takes: a base input and grade plus
ffcine_render::Layers with every track sampled per frame (Comp::lower). The piece’s
key hashes those sampled values, not the track definitions.
Built (steps 2 and 3 of the plan): video, still, solid, text and nested comp
layers, placement (size, fit, content, crop, transform), radius, shape mask,
blend, fade, the canvas background and fade, and base promotion. Text lowers to
ffcine_render::Overlays drawn under the next layer up; a nested comp to a
ffcine_render::LayerSource::Scene composited in the same pass. Per-layer grades, time
remapping and filter graphs are rejected with the step that adds them.
templates (layout, story) write a comp out from a few parameters when a comp file
names one ("template": {...}).
Modules§
- limits
- Limits a comp is checked against (
docs/compositing.md#limits). - templates
- Templates (
docs/compositing.md#templates): functions from a few parameters to an ordinary comp document, run when a comp file is read. A comp file names one as"template": {"story": {...}}or"template": {"layout": {...}, "panels": [...], ...};expandwrites it out (ffcine comp lowerprints the result), so templates add no render path and the plan keys only see the lowered layers.
Structs§
- Canvas
- The canvas: size, rate, duration, and the animated background and fade.
- Comp
- A composition: a canvas and layers, bottom first.
- Comp
Layer - One layer.
- Piece
- A lowered piece: comp frames
from..from + frames.
Enums§
- Base
- The pass’s input.
- Fit
- How the source fills the layer’s box.
- Mask
Shape - A mask’s shape.
- Source
- What a layer shows.
Constants§
- SCHEMA
- The schema name (
"schema": "ffcine.comp/1").
Traits§
- Media
- What lowering needs to know about media files.
Functions§
- frame_
pick - The source frame a layer frame shows, from its source times at the frame (
s) and half a frame later (mid), on a source ofratefps andframesframes. Moving forward, it is thefpsfilter’s pick (round=near, half away from zero): the last source frame whose remapped time rounds to this frame or earlier, i.e. the last one strictly beforemid(a frame exactly onmidrounds to the next one). Holding or going back, the nearest frame tos. Clamped to the source. - is_comp
- Whether
vis a comp document (schemaisffcine.comp/N), as opposed to a timeline. - is_
comp_ file - Whether the file at
pathis a comp document (JSON, or YAML by extension);falsefor timelines and unreadable files. - read_
document - A comp file’s document as written (JSON, or YAML for
.yaml/.yml), templates not expanded (crate::templates::expanddoes that).