Commit Graph
371 Commits
Author SHA1 Message Date
Brandon ThomasandClaude Opus 5.5 26228247e2 Follow-ups to the batch: name numbering keeps no double space (#2908), Material Options error names the parameters (#2924), corrupt file timecodes stay on timecode (#2835), restore #2934's scroll-gutter asserts, #2825's Motion Tile test compiles
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 09:30:22 -05:00
Brandon Thomas 7a172b04e0 Merge PR #2825 2026-11-03 09:08:08 -05:00
Brandon Thomas a768cdb42f Merge PR #2878 2026-11-03 09:08:08 -05:00
Brandon Thomas 0a91567425 Merge PR #2834 2026-11-03 09:04:45 -05:00
Brandon Thomas 5720043d32 Merge PR #2922 2026-11-03 09:04:45 -05:00
Dylan M. Taylor d025b59e6d OCIO config: a mismatched closing bracket ends a flow collection, and multiline flows are assembled in linear time (#2939) 2026-11-03 06:03:05 -05:00
JonRC 1b5c28ee1d Follow-up to #2919: Match Grain matches no grain without a clean sample box
A source with no box-sized area clear of transparent pixels (a small
layer inside a blur's padding) got no sample boxes, and
grain_stats_boxes then measured the whole image, edge included. With no
clean box Match Grain now matches no grain, as After Effects applies
none when its samples hold transparent areas. Compensate for Existing
Noise took the same route through the layer's own boxes, so a layer
with no clean box now has nothing taken off. grain_stats_boxes keeps
its empty-list fallback.
2026-11-02 23:17:04 -03:00
JonRC c6ab02b83a Fix #2919: Match Grain takes no sample box beside transparent pixels
A box's own pixels had to be opaque, but the high-pass that measures its
grain reads 3 px around it, and a transparent pixel there is black once
unpremultiplied. A blur earlier in the stack pads the layer with
transparent pixels, so boxes along that border measured the edge as
strong, smooth colour grain, and Match Grain drew 12 px colour cells
from a clean source on the frames that picked them. Boxes now need their
3 px surround opaque too (a summed-area table keeps the check O(1) per
candidate). Remove Grain picks its boxes the same way.
2026-11-02 22:49:52 -03:00
arnav-hiwarkarandClaude Opus 5.5 da5bf7b45a Follow-up to #2803: document the Timewarp speed-ramp tests and test host
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 22:54:04 +05:30
f15b619a92 Follow-up to #2823: box each of several objects around its whole matte on correction frames (#2830)
* Follow-up to #2823: box each of several objects around its whole matte on correction frames

With several objects, a correction frame's box came from the model's cut
of that object's strokes on the frame alone. A stroke on part of the
object boxed only that part, and SAM 2 followed only that part from
there on. Each object's matte is now carried to the frame with its own
strokes, from its first prompted frame or its nearest tracked frame, by
the walk Chain::ensure uses (now Chain::carry). These mattes are not
cached, since object keys hold tracked results.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Follow-up to #2823: carry corrections before the base from the base outwards

Prompt frames were visited in ascending order, but before the base the
carry walks towards it, so each correction there re-walked from the
root. Visit each side from the base outwards and sort the prompts back
into frame order for the tracker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Follow-up to #2823: find an object's carry root in one pass over its strokes

The root search scanned every frame's strokes from the prompt frame to
the base, for every prompt. Take the object's foreground stroke on the
way that is nearest the base in one pass instead; the root is the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* M13.35: reproduce an earlier object correction losing tracked matte

* M13.35: carry earlier object corrections from valid tracked mattes

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-02 18:01:39 +01:00
arnav-hiwarkarandClaude Opus 5.5 324a6326da Fix #2803: Timewarp plays an animated Speed as a rate
Timewarp's Adjust Time By = Speed showed source time t x speed(t) / 100,
using only the Speed value at the current frame. With Speed keyframed
(a speed ramp), the source jumped to another part of the footage at the
change, and while Speed eased down it ran backwards or held still.

An animated Speed (keyframes or an expression) is now integrated over
layer time from 0 through the effect host's param_at, on a fixed
sub-frame grid with a bounded sample count. A static Speed keeps the
exact previous formula, so the Timewarp goldens are unchanged.

Local: effectcraft-effects time_fx lib tests (8), timewarp golden,
clippy -p effectcraft-effects. Full cargo xtask ci deferred to GitHub CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 22:14:39 +05:30
JonRC ace329d126 Roto Brush: a Freeze job reads the frozen cache once (#2833)
frame_matte looked up the frozen mattes for every frame, and that hashes
the whole serialized cache and recomputes its keys, so freezing a long
span again grew with frames times cache size. The Freeze job now
resolves the applicable cache once (applying_frozen) and passes it to
frame_matte.
2026-11-02 12:32:25 -03:00
JonRC 1cd7c2e6f6 Roto Brush: freezing again keeps frames that are frozen already (#2833)
With frozen mattes now used in a session without the model that froze
them, a second Freeze in such a session still segmented every frame
again, so it replaced the model's matte with the session engine's.
frame_matte, which only Freeze calls, now returns a frame's frozen matte
while the frozen mattes apply, and segments only frames that have none.
2026-11-02 11:42:22 -03:00
JonRC c08e6f6d5f Roto Brush: keep frozen mattes in a session without their model (#2833)
The frozen key hashes the chain keys, whose seed holds the session's
model, so mattes frozen with SAM 2.1 didn't match in a session on
Classic, such as a fresh effectcraft-cli render, and the frame was
segmented again with Classic. Accept the key under any Roto Brush model
too, as Object Matte has done since #1852. frozen_key is unchanged for
projects frozen today, and editing a stroke or a matte setting still
makes the frozen mattes stale.
2026-11-02 11:04:25 -03:00
ashandClaude Opus 5.5 9d7baea5cc Fix #2823: Propagate boxes SAM 2 around the matte shown on the stroked frame (#2826)
* Fix #2823: Propagate boxes SAM 2 around the matte shown on the stroked frame

The tracker's box prompt came from the classic graph cut of the strokes,
which can leak into the background; SAM 2 then filled the whole box.
Build the box from the model's own matte (segment_with), the one shown
before Propagate. segment_with falls back to the classic cut when the
model can't segment, so non-model paths are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix #2823: box a lone object around the matte shown on correction frames too

A correction frame shows a matte propagated from the frame before, not a
fresh model cut, so the tracker's box came from a different matte than
the one on screen. With one object the box now comes from Chain::ensure,
the matte shown on that frame. Several objects share one shown matte, so
each keeps the model's cut of its own strokes. Cancelling while the shown
matte is computed stops instead of falling back, and the prompt frame is
read only when needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 14:18:41 +01:00
rahul05ranjan 540ee9fbc5 Motion Tile: mirror folds sample the edge texel, not the transparent outside
A tile boundary that lands exactly on an output pixel centre puts the tile
fraction at exactly 0 or 1, and the sample position at the source's geometric
edge — where sample_bilinear mixes in half a texel of the transparent outside.
The fold column comes out half-faded: a visible seam line along the mirrored
boundary, which sweeps the tile as Tile Center animates across pixel centres
(#2820). Both the CPU path and the GPU kernel switch to the clamped sampler,
which repeats the edge texel there; interior samples are untouched, and the
default single-tile identity mapping already sampled texel centres.

The regression test puts the folds exactly on pixel centres (tileWidth 50%,
centre on the layer, mirror on) and asserts the fold columns stay opaque and
equal the edge texels they mirror — it fails on the unfixed code at alpha 0.5.

Fixes #2820

Co-authored-by: rahul05ranjan <11793455+rahul05ranjan@users.noreply.github.com>
2026-11-02 12:30:58 +00:00
Brandon ThomasandClaude Opus 5.5 dc1f9eab74 Batch fixes: rustfmt, is_multiple_of in the Vegas test, drop a Swedish row #2718 retired
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:20:24 -04:00
Brandon ThomasandClaude Opus 5.5 4b7767401b Follow-up to #2687: an even sample count keeps the Vegas midpoint
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 10:58:38 -04:00
MarekSpodBiedry a25114f019 Sample long Vegas segments finely so they stay smooth round corners (#2566) 2026-10-30 15:01:37 +01:00
Kristian Myram 5eaed8b218 #1539: reopen saved object mattes with their cache evicted 2026-10-30 10:20:55 +01:00
Kristian Myram 4f64208587 #1539: keep per-object mattes when only one object is followed 2026-10-30 10:17:19 +01:00
Kristian Myram a4f5c516ed #1539: validate benchmark inputs and preserve shared refinement strokes 2026-10-30 10:00:33 +01:00
Kristian Myram baa1ca31b3 #1539: preserve stroke corrections and current main APIs 2026-10-30 08:49:47 +01:00
Kristian Myram 365abf0f2d Roto Brush: discard failed tracks and bound SAM2 caches (#1539) 2026-10-30 08:43:33 +01:00
Kristian Myram b148397d4e #1539: keep Show Object empty when its tracked matte is missing 2026-10-30 08:43:33 +01:00
Kristian Myram 31307d15dc #1539: bound saved tracking decoders by validated plane dimensions 2026-10-30 08:43:33 +01:00
Claude 36ed77820d Roto Brush: keep saved tracking when nothing is retracked, read saved object mattes under their own keys, let Freeze use complete saved tracking without its model
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RDvxCS8xcR28VArjzn1x7U
2026-10-30 08:43:32 +01:00
Claude 66d8e5e948 SAM 2 roto tracker: review fixes (direction-limited tracking, non-blocking model reload, per-object start passes, loader dispatch, CLI errors, hints)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RDvxCS8xcR28VArjzn1x7U
2026-10-30 08:43:32 +01:00
Kristian Myram 6d10a6e932 S2.75: propagate saved tracking with the newly selected model 2026-10-30 08:43:32 +01:00
Kristian Myram 8a6d48cdc8 S2.74: bound pending multi-object tracking masks 2026-10-30 08:43:32 +01:00
Kristian MyramandClaude Sonnet 5.5 f67a17e765 S2.70: each object keeps its own matte; Show Object outputs one of them
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 08:43:32 +01:00
Kristian MyramandClaude Sonnet 5.5 08bf6e43fe S2.69: several objects in one Roto Brush instance, tracked in one SAM 2 pass
Strokes carry an object (0 for older projects, nothing written for 0). The
tracker follows every object in one pass and the mattes are united; the
confidence of a frame is the least sure object's. Object picker in the Layer
panel's bar; roto.options/stroke/clearStrokes/status take or report objects.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 08:43:32 +01:00
Kristian MyramandClaude Sonnet 5.5 0e0db685bf S2.45: a correction stroke re-tracks only the frames it changes
Chain::track tracks the frames of the span without a tracked result, in a window
that restarts at the nearest prompted frame; unchanged spans are not tracked
again. Test with a recording tracker: first pass 0..20, no second pass, then a
correction on frame 8 tracks 8..20 with that prompt only.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 08:43:31 +01:00
Kristian MyramandClaude Sonnet 5.5 7eb91ca44c S2.43: track several objects in one SAM 2 pass
TrackRequest takes a list of objects (each with its prompts on its frames) and
the tracker reports (object, frame, result); frame encodings are shared, objects
may start on different frames. VideoTracker::propagate_objects runs a subset.
Limits: 32 objects. Test: two discs, one prompted on frame 0 and one on frame 2.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 08:43:31 +01:00
Kristian MyramandClaude Sonnet 5.5 1fb51600d5 S2.65: prompt SAM 2 with a box from the classic matte on stroke frames
On real footage the stroke frame came out partial (clicks make SAM 2 pick a
part of the object). Measured on a multi-part figure: clicks only IoU 0.41,
with a box around the figure IoU 1.00. Chain::track now adds the box of the
classic engine's matte of the strokes to each prompt; a box stroke wins.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 08:43:31 +01:00
Claude 1eee687ebc Roto Brush: save the tracked frames in the project
The tracked frames lived only in memory, so a saved project lost them: a render in another
process (effectcraft-cli render-frame) segmented the frames again with the classic engine.
A propagate with a tracker now saves the frames it followed with the instance, in a hidden
parameter beside Freeze's (TrackCache: each frame's matte, Refine Edge band, colour models and
confidence, keyed by the inputs it was tracked from).

- They apply while the strokes and span they came from are unchanged, whichever model Settings
  choose, so a project renders the same when it reopens, without the model loaded or chosen.
- A stroke or span change makes them stale until the next Propagate. A Propagate replaces them;
  with the classic engine it leaves none.
- roto.status reports tracker.saved (the model they came from) and a notice when Settings
  choose another model.
- The save at job completion is not an undo step (the frames are a cache of the strokes) and is
  skipped if the strokes changed while tracking. Decoding checks the saved size, so a corrupt
  project is ignored rather than overflowing.

Object Matte saves nothing. Projects saved before this change open unchanged (the parameter is
filled in on open).

Tests: a saved project reopens with the model unloaded and renders the saved frames through
Chain::ensure; choosing the classic engine keeps them until a classic Propagate replaces them; a
stroke change makes them stale. The SAM 2 tests and the failing-tracker test take the Roto test
lock.

Claude-Session: https://claude.ai/code/session_0136kZtXrYo5VUWEFxWduwUD
2026-10-30 08:43:30 +01:00
Claude a7417b578d Roto Brush: don't run the classic engine silently under a selected model
With SAM 2 (or MobileSAM) chosen, a propagate that started before the model had loaded ran
the whole job on the classic engine and reported nothing. The chosen model is now in use
before a job that segments with it starts (Roto Brush 2.0 / 3.0 and Object Matte):

- roto.propagate and the other Roto jobs wait for a load or download under way when called with
  wait: true (bounded to 10 minutes). Without wait they refuse while the model is still loading,
  and start the load in the background. A model that is not installed, or failed to load, is
  refused either way.
- roto.status reports model {selected, installed, active, loading, error} and a notice while the
  chosen model is not the one in use. source is "model" for a frame the model segmented on its own,
  instead of "classical".
- Auto-propagate keeps edited instances pending while the model loads, and shows errors as toasts
  instead of dropping them.
- Docs: what propagate does now; tracked frames live in the session that ran propagate and are not
  saved in the project file, so a separate render process does not show them; roto.model.select
  lists sam2.1-hiera-tiny.

Tests: a selected model that is not installed refuses to propagate (no weights needed); SAM 2
selected without wait is loaded before propagate (EFFECTCRAFT_SAM2). The SAM 2 tests and the
failing-tracker test take the Roto test lock, since they share the process-wide model slot.

Claude-Session: https://claude.ai/code/session_0136kZtXrYo5VUWEFxWduwUD
2026-10-30 08:43:30 +01:00
Kristian MyramandClaude Sonnet 5.5 c1f5ff9f7d S2.41: Roto Brush follows the object with SAM 2
When the chosen model has a tracker, roto.propagate runs one tracking pass over
the span: prompts from the strokes (a handful of points, which SAM 2 trusts),
the clip tracked both ways, each frame's probability map refined by the same
graph cut with the strokes as hard constraints. Results are cached under their
own keys with a per-frame confidence and an occluded flag; roto.status reports
them (source: tracker|classical). Without a tracker nothing changes.
Real weights: IoU 0.98 on all 21 frames, confidence 0.99.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 08:43:30 +01:00
bflatasticandClaude Opus 5.5 adff749f33 Tests: Simple Choker keeps growing the matte down to -100 (#2102)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 10:23:11 +07:00
bflatasticandClaude Opus 5.5 05841f5cc6 Merge main into #1610; no conflicts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 09:23:38 +07:00
bflatasticandClaude Opus 5.5 43c7cbb9aa Merge main into #2620; clean merge, no conflicts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 07:47:41 +07:00
bflatastic 33ce4bbbed Merge remote-tracking branch 'origin/main' into HEAD 2026-10-30 07:05:19 +07:00
bflatastic d6e99c0db8 Merge remote-tracking branch 'origin/main' into HEAD 2026-10-30 07:03:44 +07:00
Marco Arnulfo efd6ab97dc fix(effects): cover Particle World's Texture Layer buffer before sampling it
Text and shape layers hand over a buffer that spans only their content;
the clamped sampling then stretched its edge pixels across the squares.
2026-10-30 00:52:10 +01:00
Marco Arnulfo a76c65bd00 fix(effects): keep Particle World on the GPU unless Textured Square draws the Texture Layer
A Texture Layer left set with another Particle Type forced the CPU for
nothing. gpu_supported now asks the same predicate the CPU path uses.
2026-10-30 00:52:10 +01:00
Marco Arnulfo 2a5e9066e5 fix(effects): draw Particle World's Texture Layer in the motion-trail samples too
With the shutter open the textured squares fell back to the particle
colour. Both branches now draw through the same sprite closure, and the
sharp frame goes through plan.post like the trails.
2026-10-30 00:52:10 +01:00
Marco Arnulfo 0c35a7a889 fix(effects): let CC Particle World's Textured Square use a Texture Layer (fixes #1465) 2026-10-30 00:52:10 +01:00
bflatastic 56fde5c3d6 Merge main into #1279; effects/lib.rs: keep the PR's Buf::grow_left_top/align beside main's budgeted Buf::pad, and put cover_plan's doc comment back on cover_plan (the PR's new items had split it off) 2026-10-30 05:53:43 +07:00
bflatastic c53dd7f0a0 Merge main into #2600; clean 2026-10-30 05:46:55 +07:00
BFlat 77bea50f0b Merge pull request #2617 from storytold/docs/2565-readme-effect-count
README: 308 effects, and a test keeps the count current (#2565)
2026-10-30 05:42:00 +07:00