Repository navigation
fix(track): Planar Track honours forward, backward and already tracked; reports held frames (0.61.1) - #23
Merged
Conversation
…d, and reports held frames track.planar read no `track` value and always tracked both ways into a new tracker. Forward now tracks from the reference time to the end, backward from the start to the reference time, both does both, and another value is refused. With `track` left out (the Tracker panel's Already tracked, and what the agent tool described), the layer's Perspective tracker is pinned onto the target without tracking again, or a clear error says there is none. Frames that do not track still hold the last tracked surface (unchanged); they are now listed in the result's `held`, keyed with confidence 0 on the Planar Tracker, and counted in the Tracker panel's status line. Tests: eight Rust unit tests on a textured plane moved by a known homography per frame (surface_track, each direction, a bad value, reuse, nothing to reuse, a held frame) and four backend tests through /api/rpc. CI runs the engine's Rust unit tests.
Version sites, the same fifteen files as the last release: README.md (badge and the Version line), backend/app/__init__.py, frontend/package.json, frontend/package-lock.json (both fields), frontend/src/version.ts, native/fvx-core/Cargo.toml, Cargo.lock (the fvx-core entry) and pyproject.toml, src-tauri/Cargo.toml, Cargo.lock (the formvfx entry) and tauri.conf.json, docs/EXTENSIONS.md, and the version string in the three built demo scripts. No demo source changed since 0.61.0, so the demos were not rebuilt. A patch release: the Planar Track fix logged under 0.61.1 in the three HASHOUT logs.
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.
Summary
Planar Track (
track.planar, theplanar_trackagent tool and the Tracker panel's Planar Track section) now does what itstrackoption says. Patch release 0.61.1.trackis read. The engine service passedtrackand the panel offered Forward and Backward, Forward, Backward and Already tracked, but the engine never read it: every run tracked both ways into a new tracker. Now:forward: from the reference time to the end of the layer (orend).backward: from the start (orstart) to the reference time. A backward-only run keeps the reference frame (before, the backward pass always dropped it because the forward pass keyed it).both: both, as before.targetwith Corner Pin and Grow Bounds in one undo step, with no new tracker. It needstarget, does not read the mask orsurface, and when the layer has no such tracker it fails with "this layer has no Perspective tracker with tracked keys to reuse; pass track forward, backward or both to track the mask".held, the Planar Tracker keys confidence 0 on them instead of 100, and the panel's status line says how many frames held. The reuse path reports a frame as held when any of the four points keys confidence 0 there.planaris split into small helpers innative/fvx-core/src/engine/cmd/track.rs; the tracking, corner choice and Corner Pin maths are unchanged.planar_tracktool description says what each direction covers, what leavingtrackout does and whatheldmeans; the harness references are regenerated (./formvfx agents sync).testjob now also runs the engine's Rust unit tests (cargo test --locked --no-default-features --lib). Before this, the crate's existing Rust tests never ran in CI.Tests
New tests, each shown failing on the 0.61.0 code first, then passing:
native/fvx-core/src/engine/cmd/track_planar_tests.rs, 8 Rust unit tests. The fixture is a textured PNG in a precomp, moved by a known homography per frame through a keyed Corner Pin, with a mask around a region of it; expected corners come from the same homographies. Covered:surface_trackdirectly,both,forward,backward, a badtrackvalue, reuse of the existing tracker, reuse with nothing tracked, and a frame that fails to track (opacity 0 for one frame). Corner error bound 0.35 px; worst measured 0.131 px.cargo test --no-default-features --lib planar_tests, 2 passed, 6 failed (the two accuracy checks that use both directions pass; forward, backward, bad value, reuse, nothing to reuse and held fail).backend/tests/test_planar_track.py, 4 tests through/api/rpcwith the window key, on the built module as CI loads it: forward only, backward only, reuse without a second tracker, and the error with nothing tracked.Local run of what
.github/workflows/ci.ymlruns (macOS arm64, engine built with./formvfx install-native --dev, 701 commands, 306 effects, Python 3.14 venv frombackend/oc_install):cargo test --locked --no-default-features --libinnative/fvx-core: 12 passed (8 new, 4 existing).python -m compileall -q app formvfx_engine.pyandpython formvfx_engine.py --selfcheck: ok, core 0.61.1../formvfx agents sync --check: in step.enginejob (on port 18250): comp.new over/api/rpcok,mcp ok: 33 tools.venv/bin/python -m pytest tests -qinbackend: 296 passed, 4 skipped (the 4 new tests included).venv/bin/python ../setup/notices.py --check: third-party notices cover everything that ships.npm ci,npm audit --audit-level=low(0 vulnerabilities),npm run build: ok.python -m pytest frontend/tests/window -q -p no:cacheprovider: 3 passed.python3 setup/lint_text.py .(0 findings),py_compile setup/*.py,python3 setup/text_presets.py --check(in step).cargo check --lockedinsrc-tauriwith the placeholder sidecar: ok.Tests ran with a scratch HOME inside the clone and the keyring fail backend.
For the owner
trackout now reuses instead of tracking both ways. This matches the tool description and the panel's Already tracked option, but an outside caller that omittedtrackand expected a fresh track now gets the reuse, or the error when the layer has no Perspective tracker. The harness skill already tells agents to passtrack: "both". If you would rather keep both as the default, the alternative is an explicit value (for exampletracked) sent by the panel.testjob. It shares the rust-cache with the dev build.Left for the owner (not changed here)
trackerchoice for reuse. Reuse takes the current Perspective tracker or the last one;track.planardoes not accept atrackerargument (it is not in the RPC's argument list or the tool schema).startafter the reference. Whenstartis later than the reference time, the forward pass starts tracking atstartwhile the surface corners are read at the reference time..claude/skills/formvfx-harness/sub-skills/tracking-and-stabilizing/SUB-SKILL.md(and its.agentsmirror) says planar_track "sets the mask to mode None so the footage stays whole"; the engine does not change the mask mode, before or after this change.track.rsis about 1300 lines; moving planar tracking into its own module would be a separate refactor.How to ship