Page 1 of 1

Remove incorrect keyframes from planar tracker data?

PostPosted: Sun Oct 17, 2021 7:48 am
by TCP786
Can you remove certain frames from the middle of a planar tracker's tracking data? I have a shot that tracked well for the most part, but there's a quick camera movement in the middle with enough motion blur that my planar transform is erratically changing size during those frames. Can I just remove those frames from the tracking data and have it just interpolate during that section? Deleting the splines for the problematic frames didn't seem to work.

Re: Remove incorrect keyframes from planar tracker data?

PostPosted: Sun Oct 17, 2021 3:43 pm
by TheBloke
Yeah you can delete keyframes and it will interpolate the transformation where keyframes are missing.

Here's a couple of examples in a comp.
TestPlanarRemoveKFs.comp.zip
(13.59 KiB) Downloaded 86 times

Image

In both examples the the source 'footage' is a moving black rectangle. In the first example, this movement is linear; in the second, it's eased via the default "smooth" operation that does an ease-out, ease-in.

Each example has an 'Original' Planar Transform, with all its keyframes, and a 'RemoveKF' Planar Transform, in which I've removed nearly all the keyframes. In the Linear example I removed all but the first and last keyframes, and in the Eased version I removed all but the first three and last three.

These Planar Transforms are then used to merge a red rectangle over the original black rectangle.

In the linear example, the RemoveKF Planar Transform has the red rectangle sticking to the black rectangle: it works even with only two keyframes because the movement is completely consistent and linear.

In the eased example, the red rectangle starts and ends in the right place, but slips off in the middle, because the few keyframes remaining aren't enough to follow the eased movement of the black rectangle.

Re: Remove incorrect keyframes from planar tracker data?

PostPosted: Mon Oct 18, 2021 1:51 am
by TCP786
Hmmm, interesting. I was doing it right, and it was working, but my shot moves in weird ways that the interpolation doesn't work for. Bummer. There isn't a way to edit a planar transform, right? I think I might have asked that somewhere else before.

Re: Remove incorrect keyframes from planar tracker data?

PostPosted: Mon Oct 18, 2021 9:40 am
by TheBloke
Inside Fusion, no I don't believe so. Other than re-tracking and then making a new Planar Transform.

Technically it would be possible to modify the track in a text editor. A Planar Transform stores its transformations like this:
Code: Select all
[1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, RH = { 1.33333333333333, 1.33333333333333 }, Flags = { Linear = true, LockedY = true }, Value = Matrix { RefTime = 0, ToRef = { [0] = 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -0.00653926283121109, 0.00601110193464494, 0, 1 } } },
The Matrix assigned to Value is the transformation data. If you could work out what that was doing exactly, you could create any transformation you wanted by filling in the appropriate values.

Re: Remove incorrect keyframes from planar tracker data?

PostPosted: Mon Oct 18, 2021 10:14 am
by Hendrik Proosa
One theoretical option would be to bake the transform to four cornerpin points, and then animate/interpolate those as needed. Matrix multing the corner positions (unity coords or something else) with transformation matrix of planar tranaform should do it.

Re: Remove incorrect keyframes from planar tracker data?

PostPosted: Mon Oct 18, 2021 12:53 pm
by birdseye
Another not very technical option could be to nudge the original Planar Transform with a second Transform or DVE Transform

Re: Remove incorrect keyframes from planar tracker data?

PostPosted: Wed Oct 20, 2021 8:39 pm
by Joe Laffey
Another option is to skip past that problem frame and retrack from there with a new Planar Tracker and then dissolve between the two. You then fudge the messed up frame with transforms/GridWarp.