M12.6: 3D Camera Tracker effect + UI

Effect > Perspective > 3D Camera Tracker (Shot Type, Horizontal Angle of
View, Show/Render Track Points, Track Point Size, Target Size, Advanced:
Solve Method, Method Used, Average Error, Detailed Analysis, Auto-delete
Points Across Time, Hide Warning Banner); tracks and solve stored in the
effect with keys (frame edits re-track, setting / deleted-point edits only
re-solve). Background job (Analyzing in background (step 1 of 2) / Solving
camera banner, cancel, one undo step). Commands: track.camera (replaces the
stub), camera.analyze/cancel/solveStatus/points/selectPoints/
createFromSolve/create/setGroundPlane/deletePoints; the one-node 3D Tracker
Camera keyed per frame and text / solids / nulls / shadow catcher + light on
the target plane, Create Multiple. Viewer: depth-sized coloured targets,
hover target plane, click / shift / marquee selection, AE right-click menu,
Delete; Effect Controls Analyze / Cancel / Create Camera; Tracker panel
Track Camera. Solver: adaptive noise thresholds, denser keyframes, quick
tripod check, faster Cholesky and parallel Schur complement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-02 23:02:47 -04:00
co-authored by Claude Opus 5.5
parent bab4f88c22
commit cba8d7e737
28 changed files with 2771 additions and 54 deletions
+20 -10
View File
@@ -298,6 +298,23 @@ pub fn sym_eigen(a: &[f64], n: usize) -> (Vec<f64>, Vec<f64>) {
(vals, vecs)
}
/// Dot product, four lanes (lets the compiler vectorise).
fn dot_n(a: &[f64], b: &[f64]) -> f64 {
let mut acc = [0.0f64; 4];
let (ca, cb) = (a.chunks_exact(4), b.chunks_exact(4));
let (ra, rb) = (ca.remainder(), cb.remainder());
for (x, y) in ca.zip(cb) {
for k in 0..4 {
acc[k] += x[k] * y[k];
}
}
let mut s = acc[0] + acc[1] + acc[2] + acc[3];
for (x, y) in ra.iter().zip(rb) {
s += x * y;
}
s
}
/// Solve `A x = b` for a symmetric positive definite `A` (`n × n`, row-major) in place by
/// Cholesky factorisation. Returns false when `A` is not positive definite.
pub fn cholesky_solve(a: &mut [f64], n: usize, b: &mut [f64]) -> bool {
@@ -313,16 +330,9 @@ pub fn cholesky_solve(a: &mut [f64], n: usize, b: &mut [f64]) -> bool {
a[j * n + j] = d;
let (head, tail) = a.split_at_mut((j + 1) * n);
let rowj = &head[j * n..j * n + j];
// Rows below j are independent.
use rayon::prelude::*;
let work = |row: &mut [f64]| {
let s: f64 = row[j] - row[..j].iter().zip(rowj).map(|(a, b)| a * b).sum::<f64>();
row[j] = s / d;
};
if n - j > 192 {
tail.par_chunks_mut(n).for_each(work);
} else {
tail.chunks_mut(n).for_each(work);
// Rows below j (sequential: per-column parallel dispatch costs more than it saves).
for row in tail.chunks_mut(n) {
row[j] = (row[j] - dot_n(&row[..j], rowj)) / d;
}
}
// Forward: L y = b.