From d918aa6e13bf6a89e81d974f20a85826540ece54 Mon Sep 17 00:00:00 2001 From: arnav-hiwarkar Date: Tue, 17 Nov 2026 16:09:29 +0530 Subject: [PATCH] #3467: Radial Blur Amount takes After Effects' range 0..1000 After Effects records 0..1000 for Radial Blur's Amount (slider 0..100); EffectCraft's hard range stopped at 100, so prop.set and the value editors clamped 200 to 100. The hard maximum is now 1000; the slider range and default are unchanged. The engine range test covers prop.set at both ends, undo and redo, save and reopen, and a project saved with the old range. The parameter leaves the .aep range guard's list of known narrower ranges. --- crates/aep/src/export/fx_defs.rs | 1 - crates/effects/src/misc.rs | 27 +++++++++++++++++++++++- crates/engine/src/tests/effect_ranges.rs | 1 + 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/crates/aep/src/export/fx_defs.rs b/crates/aep/src/export/fx_defs.rs index 338e00fc5..fb83eed8a 100644 --- a/crates/aep/src/export/fx_defs.rs +++ b/crates/aep/src/export/fx_defs.rs @@ -730,7 +730,6 @@ mod tests { ("ec.perspective.dropshadow", "softness", 3464), ("ec.blur.compound", "maximumBlur", 3465), ("ec.blur.sharpen", "amount", 3466), - ("ec.blur.radial", "amount", 3467), ("ec.blur.ccradial", "amount", 3468), ("ec.distort.turbulentdisplace", "amount", 3469), ("ec.time.pixelmotionblur", "shutterAngle", 3481), diff --git a/crates/effects/src/misc.rs b/crates/effects/src/misc.rs index 9c7131657..168dd6110 100644 --- a/crates/effects/src/misc.rs +++ b/crates/effects/src/misc.rs @@ -786,7 +786,8 @@ pub fn specs() -> Vec { "Radial Blur", "Blur & Sharpen", vec![ - p("amount", "Amount", num(10.0), slider(0.0, 100.0, 0.0, 100.0, 1)), + // After Effects accepts 0..1000; its slider shows 0..100 (#3467). + p("amount", "Amount", num(10.0), slider(0.0, 1000.0, 0.0, 100.0, 1)), p("center", "Center", Value::Vec2([0.5, 0.5]), ParamUi::Point), p("type", "Type", Value::Enum(0), popup(&["Spin", "Zoom"])), // Our blur is always fully anti-aliased; the choice is kept for compatibility. @@ -1147,6 +1148,30 @@ mod tests { } } + /// Spin and Zoom at both ends of Amount (0..1000) and both Antialiasing settings give finite + /// colours over an opaque layer and keep it opaque (#3467). + #[test] + fn radial_blur_is_finite_across_the_amount_range() { + let mut img = effectcraft_raster::Image::new(48, 40); + img.rows_mut().for_each(|(y, row)| { + for (x, px) in row.iter_mut().enumerate() { + *px = [x as f32 / 47.0, y as f32 / 39.0, 0.5, 1.0]; + } + }); + for ty in 0..2 { + for aa in 0..2 { + for amount in [0.0, 100.0, 200.0, 1000.0] { + let vals = [("amount", num(amount)), ("type", Value::Enum(ty)), ("center", Value::Vec2([10.0, 30.0])), ("antialiasing", Value::Enum(aa))]; + let o = run_fx("ec.blur.radial", &vals, img.clone(), 0.0, EffectEnv::default()); + assert_eq!((o.img.width, o.img.height), (48, 40)); + for p in &o.img.data { + assert!(p.iter().all(|v| v.is_finite()) && (p[3] - 1.0).abs() < 1e-5, "type {ty} aa {aa} amount {amount}: {p:?}"); + } + } + } + } + } + /// After Effects 2026, Venetian Blinds Completion 40, Direction 30, Width 50, Feather 5 on /// an opaque 480 × 270 layer: alpha (0..255) along row y = 135. The transparent band starts /// at the layer centre's phase, both edges are Gaussian (σ = Feather / 2). diff --git a/crates/engine/src/tests/effect_ranges.rs b/crates/engine/src/tests/effect_ranges.rs index 7deaaa911..6cc457888 100644 --- a/crates/engine/src/tests/effect_ranges.rs +++ b/crates/engine/src/tests/effect_ranges.rs @@ -60,6 +60,7 @@ const ROWS: &[(u32, &str, &str, f64, f64)] = &[ (3471, "ec.distort.transform", "scaleHeight", -30000.0, 30000.0), (3471, "ec.distort.transform", "scaleWidth", -30000.0, 30000.0), (3470, "ec.distort.turbulentdisplace", "evolutionOptions/randomSeed", 0.0, 100000.0), + (3467, "ec.blur.radial", "amount", 0.0, 1000.0), ]; fn path(effect: &str, param: &str) -> String {