feat(engine): sub-frame multi-sample motion blur for rotation, scale and opacity
Summary
The motion blur catalog component (#4008) integrates an element's translation over the shutter window: it reads the element's position at the start and end of the window and stacks N equal-weight copies along that path. That matches a 180 degree shutter reference within a pixel for elements that move across the frame.
It cannot blur change that is not a position change inside the same frame:
- rotation during the shutter window (a spinning logo has crisp edges),
- scale changes (a zoom pop has no radial smear),
- opacity ramps and colour changes,
- anything driven by a filter, clip-path, or child animation rather than a transform on the blurred element.
After Effects handles all of these with one mechanism: the layer is re-rendered at several sub-frame times inside the shutter window and the results are averaged.
Proposal
Add an engine-level accumulation mode to frame capture: for each output frame, seek the timeline to K sub-frame positions spread over the shutter window (default 180 degrees, phase -90 degrees, K configurable), capture each, and average the captures into the output frame.
- Opt-in per composition (root attribute, for example
data-motion-blur-samples="8"anddata-shutter-angle="180"), default off so render cost is unchanged for existing projects. - Reuse the existing seek plumbing: the timeline is already sought per frame; this is K seeks per frame followed by a blend.
- Blend in linear light or at least document that the blend is in sRGB, so results match the component's behaviour.
- Preview/Studio can show the effect at a lower K or disable it, the way HDR preview already degrades.
Acceptance
- A spinning element renders with radial smear proportional to angular velocity; a scaling element renders with a radial zoom smear; an opacity ramp renders as the integrated opacity over the window.
- A translation-only composition rendered with the engine mode matches the catalog component output within the tolerance measured in #4008.
- Render time scales linearly with K and is unchanged when the mode is off.
Context
The catalog component stays as the cheap default for moving elements. The engine mode is what makes AE-style blur complete for rotation, scale, and fades, which are the cases people currently call "impossible on the web".
Source: heygen-com/hyperframes