Skip to content

CC Particle World: motion blur (#1195) - #1292

Merged
bflatastic merged 1 commit into
storytold:mainfrom
vbasky:fix/1195-particle-mblur
Oct 16, 2026
Merged

bflatastic merged 1 commit into
storytold:mainfrom
vbasky:fix/1195-particle-mblur

Conversation

@vbasky

@vbasky vbasky commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Closes #1195

What it does

When both the composition's and the layer's motion-blur switches are on, the renderer already passes every effect the comp shutter (angle, phase, samples) through EffectEnv::shutter. CC Particle World now honours it: the stepped simulation is sampled at 2..64 instants across the shutter (the comp's Samples Per Frame, clamped as Transform does), each instant's sprite field is splatted, the fields are averaged, and the averaged image meets the layer through the sprite plan's existing Transfer Mode post (Composite/Screen/Add/Black Background). Fast particles draw motion trails instead of a frozen sharp field.

The GPU particle pass defers to the CPU for the shutter case (catalog::gpu_supported, mirroring how Turbulent Displace's locked pinning and Cell Pattern's HQ variants already fall back), so CPU and GPU previews agree; all other settings keep the GPU path.

Also factored Post::apply out of SpritePlan::finish so the blurred average can reuse the exact same post logic.

Tests

  • sim::tests::particle_world_motion_blur_trails: with a 360-degree shutter the output differs from the sharp frame, lights more pixels, and keeps alpha energy within tolerance.
  • catalog test: gpu_supported("ec.sim.ccparticleworld") is false while the shutter is open, true otherwise.
  • cargo test -p effectcraft-effects --lib: 450 passed; -p effectcraft-gpu --lib: 212 passed; fmt + clippy --all-targets -D warnings clean.

Closes #1195.

…torytold#1195)

With the comp's and the layer's motion-blur switches on, the renderer
hands effects the shutter (angle, phase, samples) — CC Particle World
now uses it: eight to sixty-four sprite fields sampled across the shutter
are averaged into the transfer, so fast particles draw the motion trails
After Effects shows instead of one sharp frozen field.

The GPU particle pass defers to the CPU while the shutter is open
(catalog::gpu_supported), keeping the oracle identical on both backends.

Tests: sim::particle_world_motion_blur_trails (blurred differs from
sharp, lights more pixels, keeps alpha energy) and a catalog assertion
for the CPU gate; effects 450 and gpu 212 lib tests pass; fmt and
clippy -D warnings clean.
@bflatastic

Copy link
Copy Markdown
Member

Merged, thank you @vbasky! It landed on main with a batch of community PRs, after a full workspace build and test run on Windows: fmt, clippy -D warnings, about 3,500 tests, layers, assets and wasm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CC Particle World: support motion blur

2 participants