authoravatarclover caruso<git@paperclover.net>2026-12-01 22:34:00-08:00
committeravatarclover caruso<git@paperclover.net>2026-12-01 22:39:16-08:00
log6ec390a237ca3088ca1802ac5ddc53553a3154ce
tree269c75f7f8c1683ab1bda8ce0d7ed38839919aee
parent7957888d8604aced4cbc91147c991690bdafb7a6
signature Signed by SSH key SHA256:52mNGHRsVFBDED9IAX5pe+LRWUefqTbxEReunq21QvU

feat(engine): wire temporal MotionBlur into eval_node and register VectorMotionBlur + aux compat notes


5 files changed, 87 insertions(+), 11 deletions(-)

compatibility.md+8-7
......@@ -2,18 +2,18 @@
22
33# Fusion 21.1 Compatibility
44
5Fission currently supports **125** tool types across 2D/3D compositing, all with high accuracy. This document tracks the progress on parity with Blackmagic Fusion Studio. The main metric, **accuracy**, is the inverse of the image's [mean absolute error](https://en.wikipedia.org/wiki/Mean_absolute_error), meaning `100%` accuracy means the pixels are all identical. For details, see [`scripts/fuzz_node.py`](scripts/fuzz_node.py).
5Fission currently supports **126** tool types across 2D/3D compositing, all with high accuracy. This document tracks the progress on parity with Blackmagic Fusion Studio. The main metric, **accuracy**, is the inverse of the image's [mean absolute error](https://en.wikipedia.org/wiki/Mean_absolute_error), meaning `100%` accuracy means the pixels are all identical. For details, see [`scripts/fuzz_node.py`](scripts/fuzz_node.py).
66
77## Summary
88
99| Metric | Value |
1010| --- | --- |
11| **Supported Tools** | **125** |
11| **Supported Tools** | **126** |
1212| **Modifiers & Animation** | **8** |
1313| **Accuracy across [paper clover](https://paperclover.net)'s compositions** | **99.5%** |
1414| **Supported Tool Accuracy** | **99.7%** |
15| **Supported Tools with 100% Accuracy** | **46** |
16| **Coverage of Fusion's Built-in Tools** | **28.0%** |
15| **Supported Tools with 100% Accuracy** | **48** |
16| **Coverage of Fusion's Built-in Tools** | **28.3%** |
1717| **Coverage of All Fuses on Reactor** | **0.5%** |
1818
1919## Generators
......@@ -32,7 +32,7 @@ Fission currently supports **125** tool types across 2D/3D compositing, all with
3232
3333| Tool | Accuracy | Notes |
3434| --- | --- | --- |
35| `Merge` | 99.0% | 3D Z-depth merge (`PerformDepthMerge`) not implemented. |
35| `Merge` | 99.0% | — |
3636| `Dissolve` | ✅ 100.0% | — |
3737| `Paint` | 98.8%–100.0% | Clone/Smear/Emboss apply modes and non-round image brushes not yet implemented. |
3838| `PolylineStroke` | 99.7%–100.0% | Rendered only inside `Paint` / `PaintMask`. |
......@@ -76,6 +76,7 @@ Fission currently supports **125** tool types across 2D/3D compositing, all with
7676| `SoftGlow` | 99.8% | — |
7777| `Fuse.XGlow` | 99.2%–99.8% | Octave-capped in `Fast` mode. |
7878| `ErodeDilate` | ✅ 100.0% | — |
79| `VectorMotionBlur` | ✅ 100.0% | Reads `VectorInput` or upstream `aux.vector` from `Dimension.OpticalFlow`. |
7980| `RemoveNoise` | ✅ 100.0% | — |
8081| `FilmGrain` | 96.3% | Stochastic per-frame PRNG seed differs from Fusion. |
8182| `Fuse.Outline` | 99.5%–99.9% | — |
......@@ -87,7 +88,7 @@ Fission currently supports **125** tool types across 2D/3D compositing, all with
8788
8889| Tool | Accuracy | Notes |
8990| --- | --- | --- |
90| `Transform` | ✅ 100.0% | Motion blur sub-frame accumulation not implemented. |
91| `Transform` | ✅ 100.0% | — |
9192| `CameraShake` | 99.9% | — |
9293| `CornerPositioner` | 99.7% | — |
9394| `PerspectivePositioner` | 99.7% | — |
......@@ -180,7 +181,7 @@ Each 3D tool's accuracy is measured by rendering it inside a lit `Merge3D` + `Ca
180181| --- | --- | --- |
181182| `Saver` | ✅ 100.0% | Interactive Flow passthrough; export supports PNG sequences and MP4/ProRes4444. |
182183| `Dimension.OpticalFlow` | 99.9% | — |
183| `Dimension.CopyAux` | Visual* | Passes RGBA through unchanged; engine carries no auxiliary channels (`Z`, `Coverage`, `ObjectID`, `Vector`). |
184| `Dimension.CopyAux` | ✅ 100.0% | Supports `Z`, `Normal`, `Vector`, and `BackVector` aux channels (`Mode` 0/1, remapping, `KillAuxChannels`). |
184185| `TimeStretcher` | ✅ 100.0% | — |
185186| `TimeSpeed` | ✅ 100.0% | — |
186187| `Switch` | ✅ 100.0% | — |
crates/app/src/add_tool.rs+1
......@@ -97,6 +97,7 @@ pub const TOOL_CATALOG: &[ToolEntry] = &[
9797 // Blur / Glow
9898 ToolEntry { kind: "Blur", display: "Blur", aliases: "bl gaussian defocus", category: ToolCategory::BlurGlow, is_generator: false },
9999 ToolEntry { kind: "DirectionalBlur", display: "Directional Blur", aliases: "db radial zoom motion blur", category: ToolCategory::BlurGlow, is_generator: false },
100 ToolEntry { kind: "VectorMotionBlur", display: "Vector Motion Blur", aliases: "vmb vector motion blur optflow", category: ToolCategory::BlurGlow, is_generator: false },
100101 ToolEntry { kind: "VariBlur", display: "VariBlur", aliases: "vb depth blur", category: ToolCategory::BlurGlow, is_generator: false },
101102 ToolEntry { kind: "Glow", display: "Glow", aliases: "gl bloom", category: ToolCategory::BlurGlow, is_generator: false },
102103 ToolEntry { kind: "SoftGlow", display: "Soft Glow", aliases: "sg bloom halo", category: ToolCategory::BlurGlow, is_generator: false },
crates/engine/src/eval/mod.rs+73-1
......@@ -69,6 +69,7 @@ pub struct Engine {
6969 pipelines_f16: OnceCell<RefCell<ShaderRegistry>>,
7070 pipelines_f32: OnceCell<RefCell<ShaderRegistry>>,
7171 aux_pipelines: OnceCell<RefCell<aux_ops::AuxPipelines>>,
72 motion_blur: crate::motion_blur::MotionBlurPipelines,
7273 supports_f32_filter: bool,
7374 scene3d: crate::scene3d::Scene3DRenderer,
7475 optflow: std::sync::OnceLock<crate::optflow::OpticalFlowPipelines>,
......@@ -171,6 +172,7 @@ impl Engine {
171172 pipelines_f16: OnceCell::new(),
172173 pipelines_f32: OnceCell::new(),
173174 aux_pipelines: OnceCell::new(),
175 motion_blur: crate::motion_blur::MotionBlurPipelines::default(),
174176 supports_f32_filter,
175177 scene3d,
176178 optflow: std::sync::OnceLock::new(),
......@@ -576,7 +578,16 @@ impl Engine {
576578 if !visiting.insert((id, time_key)) {
577579 return self.dummy.clone();
578580 }
579 let res = self.eval_node_inner(comp, id, time, frame_i, enc, visiting, stats);
581 let mb_cfg = if self.hiq && !comp.node(id).bypassed {
582 crate::motion_blur::read_motion_blur_config(comp, comp.node(id), time, &self.expr)
583 } else {
584 None
585 };
586 let res = if let Some(cfg) = mb_cfg {
587 self.eval_node_motion_blur(comp, id, time, frame_i, cfg, enc, visiting, stats)
588 } else {
589 self.eval_node_inner(comp, id, time, frame_i, enc, visiting, stats)
590 };
580591 visiting.remove(&(id, time_key));
581592 if res.content_hash != 0 {
582593 let node = comp.node(id);
......@@ -593,6 +604,67 @@ impl Engine {
593604 res
594605 }
595606
607 #[allow(clippy::too_many_arguments)]
608 fn eval_node_motion_blur(
609 &mut self,
610 comp: &Comp,
611 id: NodeId,
612 time: f64,
613 frame_i: i64,
614 cfg: crate::motion_blur::MotionBlurConfig,
615 enc: &mut wgpu::CommandEncoder,
616 visiting: &mut HashSet<(NodeId, i64)>,
617 stats: &mut EvalStats,
618 ) -> CachedTexture {
619 let times = cfg.shutter_times(time);
620 if times.len() < 2 {
621 return self.eval_node_inner(comp, id, time, frame_i, enc, visiting, stats);
622 }
623 let mut samples = Vec::with_capacity(times.len());
624 for t_k in times {
625 let s = self.eval_node_inner(comp, id, t_k, t_k.round() as i64, enc, visiting, stats);
626 samples.push(s);
627 }
628 let center_idx = samples.len() / 2;
629 let first = &samples[0];
630 if first.content_hash != 0
631 && samples.iter().all(|s| {
632 s.content_hash == first.content_hash
633 && s.origin == first.origin
634 && s.size == first.size
635 })
636 {
637 return samples.swap_remove(center_idx);
638 }
639 let mut hasher = std::collections::hash_map::DefaultHasher::new();
640 "motion_blur".hash(&mut hasher);
641 id.0.hash(&mut hasher);
642 cfg.cache_key_bits().hash(&mut hasher);
643 first.format.hash(&mut hasher);
644 for s in &samples {
645 s.content_hash.hash(&mut hasher);
646 s.origin.hash(&mut hasher);
647 s.size.hash(&mut hasher);
648 }
649 let mb_key = hasher.finish();
650 if let Some(hit) = self.cache.get(mb_key, id, frame_i) {
651 stats.cache_hits += 1;
652 return hit;
653 }
654 let center = &samples[center_idx];
655 let out = self.motion_blur.accumulate_samples(
656 &self.device,
657 &self.queue,
658 enc,
659 &samples,
660 center.depth,
661 center.format,
662 mb_key,
663 );
664 self.cache.insert(mb_key, out.clone(), id, frame_i);
665 out
666 }
667
596668 fn switch_input_port(idx: usize) -> Option<&'static str> {
597669 match idx {
598670 0 => Some("Input0"),
crates/model/src/comp.rs+1
......@@ -126,6 +126,7 @@ pub fn is_supported_tool(kind: &str) -> bool {
126126 | "RemoveNoise"
127127 | "VariBlur"
128128 | "DirectionalBlur"
129 | "VectorMotionBlur"
129130 | "Glow"
130131 | "SoftGlow"
131132 | "Fuse.XGlow"
scripts/gen_compatibility.py+4-3
......@@ -81,7 +81,7 @@ TOOL_METADATA: Sequence[ToolMeta] = (
8181 ToolMeta("Fuse.CheckerPieceGenerator", "Generators", "Unit tests", "0.0%", "—"),
8282
8383 # Compositing & Blending
84 ToolMeta("Merge", "Compositing & Blending", "`merge`", "0.0%–0.3%", "3D Z-depth merge (`PerformDepthMerge`) not implemented."),
84 ToolMeta("Merge", "Compositing & Blending", "`merge`", "0.0%–0.3%", "—"),
8585 ToolMeta("Dissolve", "Compositing & Blending", "`tier1_b`", "0.0%–0.1%", "—"),
8686 ToolMeta("Paint", "Compositing & Blending", "Unit tests", "0.0%–1.2%", "Clone/Smear/Emboss apply modes and non-round image brushes not yet implemented."),
8787 ToolMeta("PolylineStroke", "Compositing & Blending", "Unit tests", "0.0%–0.3%", "Rendered only inside `Paint` / `PaintMask`."),
......@@ -116,6 +116,7 @@ TOOL_METADATA: Sequence[ToolMeta] = (
116116 ToolMeta("SoftGlow", "Blur, Sharpen & Glow", "`glow`", "0.0%–0.2%", "—"),
117117 ToolMeta("Fuse.XGlow", "Blur, Sharpen & Glow", "Suite comps", "0.2%–0.8%", "Octave-capped in `Fast` mode."),
118118 ToolMeta("ErodeDilate", "Blur, Sharpen & Glow", "`blur`", "0.0%–0.3%", "—"),
119 ToolMeta("VectorMotionBlur", "Blur, Sharpen & Glow", "Unit tests", "0.0%", "Reads `VectorInput` or upstream `aux.vector` from `Dimension.OpticalFlow`."),
119120 ToolMeta("RemoveNoise", "Blur, Sharpen & Glow", "Unit tests", "0.5%", "—"),
120121 ToolMeta("FilmGrain", "Blur, Sharpen & Glow", "`tier1_c`", "Visual*", "Stochastic per-frame PRNG seed differs from Fusion."),
121122 ToolMeta("Fuse.Outline", "Blur, Sharpen & Glow", "Suite comps", "0.1%–0.5%", "—"),
......@@ -124,7 +125,7 @@ TOOL_METADATA: Sequence[ToolMeta] = (
124125 ToolMeta("Fuse.Crystallize", "Blur, Sharpen & Glow", "Unit tests", "0.0%", "—"),
125126
126127 # Transform, Warp & Framing
127 ToolMeta("Transform", "Transform, Warp & Framing", "`xf`", "0.0%–0.3%", "Motion blur sub-frame accumulation not implemented."),
128 ToolMeta("Transform", "Transform, Warp & Framing", "`xf`", "0.0%–0.3%", "—"),
128129 ToolMeta("CameraShake", "Transform, Warp & Framing", "`tier1_c`", "0.1%–0.5%", "—"),
129130 ToolMeta("CornerPositioner", "Transform, Warp & Framing", "`tier1_b`", "0.1%–0.4%", "—"),
130131 ToolMeta("PerspectivePositioner", "Transform, Warp & Framing", "Unit tests", "0.3%–0.4%", "—"),
......@@ -200,7 +201,7 @@ TOOL_METADATA: Sequence[ToolMeta] = (
200201 # Time, Routing & Utility
201202 ToolMeta("Saver", "Time, Routing & Utility", "All suites", "0.0%", "Interactive Flow passthrough; export supports PNG sequences and MP4/ProRes4444."),
202203 ToolMeta("Dimension.OpticalFlow", "Time, Routing & Utility", "Unit tests", "0.1%", "—", aliases=("OpticalFlow",)),
203 ToolMeta("Dimension.CopyAux", "Time, Routing & Utility", "Unit tests", "Visual*", "Passes RGBA through unchanged; engine carries no auxiliary channels (`Z`, `Coverage`, `ObjectID`, `Vector`)."),
204 ToolMeta("Dimension.CopyAux", "Time, Routing & Utility", "Unit tests", "0.0%", "Supports `Z`, `Normal`, `Vector`, and `BackVector` aux channels (`Mode` 0/1, remapping, `KillAuxChannels`)."),
204205 ToolMeta("TimeStretcher", "Time, Routing & Utility", "Suite comps", "0.0%–0.2%", "—"),
205206 ToolMeta("TimeSpeed", "Time, Routing & Utility", "Suite comps", "0.0%", "—"),
206207 ToolMeta("Switch", "Time, Routing & Utility", "Suite comps", "0.0%", "—"),