Repository navigation
CC Particle World: motion blur (#1195) - #1292
Merged
Merged
Conversation
…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.
Member
|
Merged, thank you @vbasky! It landed on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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::applyout ofSpritePlan::finishso 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.catalogtest: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.