Jump to: Board index » General » Fusion

Point Tracker Trouble - Keep your foreground where it was

Learn about 3D compositing, animation, broadcast design and VFX workflows.
  • Author
  • Message
Offline
User avatar

Ferdinand13

  • Posts: 49
  • Joined: Thu Aug 09, 2018 10:08 am
  • Real Name: Philipp Zakrzewski

Point Tracker Trouble - Keep your foreground where it was

PostSun Oct 01, 2023 9:00 pm

Hey everyone,

Do you know this problem? You’re mid project on a composition inside the Fusion panel and either have to position an element in frame or draw a quick mask around an area of the image. You’re really meticulous and after about 15 minutes you’re done. The element or mask is perfect and sits at the right spot. Now all you’ve got to do is track that darn thing.

A simple 2D point track will do, so you add a Tracker node and off you go.
DR_Fusion_01.png
DR_Fusion_01.png (498.2 KiB) Viewed 4449 times

The track is perfect, now all you’ve got to do is attach your mask to the tracker.

Of course there are a lot of options, like going straight into the Tracker node and using its matchmove functionality, but it never really worked as expected for my needs, plus I find it’s too much of a black box approach. After all, Fusion is a node-based compositing tool and I’d like to see what I do and where.

So instead I’ll add a Transform node downstream from my element (i.e. mask or other foreground element), so it can do the matchmove for me.
DR_Fusion_02.png
DR_Fusion_02.png (494.74 KiB) Viewed 4449 times

If you’ve been working with Fusion for a while, you know what happens next. Half an hour of frustration of trying to somehow attach your mask (or other foreground object) to the track, while preventing it from jumping all over the frame.
DR_Fusion_03.png
DR_Fusion_03.png (501.23 KiB) Viewed 4449 times

And – if you’re like me – you can’t find any video or forum article that deals with this.

Well, after another episode of me slamming my head into the keyboard, I finally put some time aside to find a solution that works and I wanted to share it with everyone else, in case there’s a need. I know, the Fusion crack shots among you will most likely roll their eyes at me explaining something so simple in such detail, but bear with us normal people.
Offline
User avatar

Ferdinand13

  • Posts: 49
  • Joined: Thu Aug 09, 2018 10:08 am
  • Real Name: Philipp Zakrzewski

Re: Point Tracker Trouble - Keep your foreground where it wa

PostSun Oct 01, 2023 9:04 pm

THE QUICK READ

OK, if you don’t want to learn about the whole shebang, here’s the quick summary.
Let’s assume I want to track this star shape into the shot. I go to the frame that I think is most suitable (frame 50 in my case) and position the star shape in the upper right corner of the lower left window pane, because that is where I like it best.
DR_Fusion_04.png
DR_Fusion_04.png (657.97 KiB) Viewed 4389 times

I’ll make a note of the frame I was on when creating and positioning my element. We’ll call this the “reference frame”.
DR_Fusion_05.png
DR_Fusion_05.png (6.23 KiB) Viewed 4389 times

Add a Transform node downstream from your positioned element, let’s call it “Xf_MM_Trans”.
DR_Fusion_06.png
DR_Fusion_06.png (681.94 KiB) Viewed 4389 times
Last edited by Ferdinand13 on Sun Oct 01, 2023 10:08 pm, edited 1 time in total.
Offline
User avatar

Ferdinand13

  • Posts: 49
  • Joined: Thu Aug 09, 2018 10:08 am
  • Real Name: Philipp Zakrzewski

Re: Point Tracker Trouble - Keep your foreground where it wa

PostSun Oct 01, 2023 9:12 pm

Right click on the “Center” property in “Xf_MM_Trans” and select “Modify With”, choosing “Offset Position”. This adds an “Offset Position” modifier to this property.
DR_Fusion_07.png
DR_Fusion_07.png (41.16 KiB) Viewed 4389 times

Click on the “Modifiers” tab at the top of the Inspector, then right click on the “Position” property and select “Connect To”, choosing the Tracker you want to attach your star shape to and the type of tracking data you’re after.
DR_Fusion_08.png
DR_Fusion_08.png (120.46 KiB) Viewed 4389 times

In my case this is “PT_Track_1 / Tracker 1: Offset Position”.

Oh no! What we feared has happened – the star shape has jumped to a completely different part of the frame. What did we do wrong!?
DR_Fusion_09.png
DR_Fusion_09.png (489.71 KiB) Viewed 4389 times

Well actually, the issue here is that the tracker data overrides the original position of our Transform node (which sits at 0.5, 0.5 in X and Y). So if only we could find out by how much we’d have to offset the current position to get back to the original one?
Last edited by Ferdinand13 on Sun Oct 01, 2023 10:10 pm, edited 1 time in total.
Offline
User avatar

Ferdinand13

  • Posts: 49
  • Joined: Thu Aug 09, 2018 10:08 am
  • Real Name: Philipp Zakrzewski

Re: Point Tracker Trouble - Keep your foreground where it wa

PostSun Oct 01, 2023 9:20 pm

We’re in luck, there’s an “Offset” parameter right below “Position” and I’m about to reveal the secret.
DR_Fusion_10.png
DR_Fusion_10.png (25.14 KiB) Viewed 4389 times

Go back to the reference frame I’ve asked you to note down earlier. In the Inspector, double click into the X field of the “Position” parameter to select the entire value, then press CTRL/CMD + C to copy.

Click into the X field of the “Offset” parameter and enter “0.5 -“ then paste the value you just copied above. Press return and you’ll be left with the correct offset amount for the X-axis.

Do the same thing for Y, i.e. copying the value from the Y field of the “Position” parameter, then clicking into the Y field of the “Offset” parameter, typing “0.5 -“ then pasting the Y value and pressing return.
DR_Fusion_11.png
DR_Fusion_11.png (35.82 KiB) Viewed 4389 times

Now, if you did everything right, the element – the star shape in my case – should be back to where it was supposed to be and it should follow the tracker just as expected. Hooray!
DR_Fusion_12.png
DR_Fusion_12.png (491.11 KiB) Viewed 4389 times

A little note on the side – do NOT try to be smarter than me by using a pick whip expression to connect the “Position” with the “Offset” parameter. What you want is a “static” value in the Offset that doesn’t change. Doing this via an expression would change the Offset dynamically, meaning it wouldn’t work. Been there, done that ;)
Offline
User avatar

Ferdinand13

  • Posts: 49
  • Joined: Thu Aug 09, 2018 10:08 am
  • Real Name: Philipp Zakrzewski

Re: Point Tracker Trouble - Keep your foreground where it wa

PostSun Oct 01, 2023 9:33 pm

GOING DEEPER AND MAKING THINGS MORE COMPLICATED

First off, always make sure that your tracker is as close to the thing that your mask or foreground element refers to as possible. That’s simply because, even though this is a 2D track, we might have 3D movement still present in the form of parallax. This means, areas closer to the camera will move more than others.

In the case of my test footage, let's assume I drew a mask around the lower left window pane, because I want to colourise it. Based on the suggestion above, it is important to track the window pane close to where I intend to put my mask, which is why I tracked the upper right corner of the pane. This concept becomes even more important for the next issue…
DR_Fusion_13.png
DR_Fusion_13.png (675.35 KiB) Viewed 4388 times


Rotation!

Yes, the person holding the camera might not have only been shaking in X and Y, they might also have rolled side to side a little. What this means is that tracking just one position won’t be enough – because your mask will start to drift.

As you may or may not know, in order to track the rotation of a shot, you need to add another tracker. Nothing easier than that. We will just add another one, but where?

Bearing in mind what I mentioned above, regarding parallax, you want to put the second tracker as close to the same area/plane of the object you’re tracking as possible.

In my case this means I will put my second tracker in the lower left corner of the window pane. Let’s track that thing (make sure to “untick” the first tracker in the Tracker node’s “Tracker List” panel before you do that, so your first tracker doesn’t get tracked again).
DR_Fusion_14.png
DR_Fusion_14.png (732.4 KiB) Viewed 4388 times

Once that’s done, I’ve got the rotation tracked as well. How do I now add that to my match move?

First of all, you need to add another Transform node – let’s call it “Xf_MM_Rot” – downstream from “Xf_MM_Pos”.
DR_Fusion_15.png
DR_Fusion_15.png (719.88 KiB) Viewed 4388 times

As you remember, the Pivot point becomes quite important when dealing with rotation, so let’s fix that one first.
Last edited by Ferdinand13 on Sun Oct 01, 2023 10:14 pm, edited 1 time in total.
Offline
User avatar

Ferdinand13

  • Posts: 49
  • Joined: Thu Aug 09, 2018 10:08 am
  • Real Name: Philipp Zakrzewski

Re: Point Tracker Trouble - Keep your foreground where it wa

PostSun Oct 01, 2023 9:40 pm

Right click on “Pivot” of “Xf_MM_Rot” and connect it to the “PT_Track_1 / Tracker 1: Offset Position”.
DR_Fusion_16.png
DR_Fusion_16.png (151.56 KiB) Viewed 4378 times

With that, your Pivot point is located right where the first tracker is.
DR_Fusion_17.png
DR_Fusion_17.png (739.77 KiB) Viewed 4378 times

Now you’ve got to add the rotation tracking data. Right click on the “Angle” parameter of “Xf_MM_Rot” and select “PT_Track_1 / Unsteady Angle”.
DR_Fusion_18.png
DR_Fusion_18.png (169.29 KiB) Viewed 4378 times
Offline
User avatar

Ferdinand13

  • Posts: 49
  • Joined: Thu Aug 09, 2018 10:08 am
  • Real Name: Philipp Zakrzewski

Re: Point Tracker Trouble - Keep your foreground where it wa

PostSun Oct 01, 2023 9:51 pm

Your mask is now rotating along with the track, however you’ll notice that it is off, not matching the original position anymore.
DR_Fusion_19.png
DR_Fusion_19.png (740.08 KiB) Viewed 4375 times

This is because once again we have to offset the “Angle” property from its current value, so it matches the reference frame, where the angle was “0”. So we need to add or subtract whichever value we currently see in the “Angle” property, to bring things back to “0”. However, we can’t do this on the "Xf_MM_Rot" node, because the "Angle" parameter is already being driven by the tracker data.

Instead, we will use our other Transform node - "Xf_MM_Trans" - upstream.

Go to your reference frame and copy the “Angle” property from “Xf_MM_Rot”, then paste the value into the “Angle” property on “Xf_MM_Trans”, BUT this time you have to “negate” it. This means to either add a “-“ in front of the value or taking the “-“ away, in case you were copying a negative value in the first place.
DR_Fusion_20.png
DR_Fusion_20.png (784.35 KiB) Viewed 4375 times

This now negates whatever the rotation track data on “Xf_MM_Rot” added – we’re essentially back to an angle of “0” for our reference frame.

However, you might still notice that things are a little off. This is because the “Pivot” position of “Xf_MM_Trans” needs to match that of “Xf_MM_Rot”. So either right click on the “Pivot” property and once again select “Connect To”, choosing “PT_Track_1 / Tracker 1: Offset Position” or use the expression pick whip to link the “Pivot” property of “Xf_MM_Trans” to that of “Xf_MM_Rot”.
DR_Fusion_21.png
DR_Fusion_21.png (741.31 KiB) Viewed 4375 times
Last edited by Ferdinand13 on Sun Oct 01, 2023 10:21 pm, edited 3 times in total.
Offline
User avatar

Ferdinand13

  • Posts: 49
  • Joined: Thu Aug 09, 2018 10:08 am
  • Real Name: Philipp Zakrzewski

Re: Point Tracker Trouble - Keep your foreground where it wa

PostSun Oct 01, 2023 9:59 pm

And there you have it, referencing 2D tracking information – both position and rotation – anywhere in your graph via two Transform nodes.
DR_Fusion_22.png
DR_Fusion_22.png (828.83 KiB) Viewed 4365 times

Coming from After Effects originally, I can well and truly say that simple 2D tracks are finally working for me inside Fusion.

And if this seems like too much of a hassle, you can of course just use the match move functionality of the Tracker node instead ;) But for me, the workflow I've outlined above, is much more precise and flexible, so I'll stick with it.

I haven’t tested this with the “scale” property, which could come into play as well, if the camera were to move into or out of this scene. I hope the current setup accounts for that, but will check in more detail later.

Either way, I hope this helps whoever may end up in the same dilemma as me :D
Offline

Hendrik Proosa

  • Posts: 2954
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Point Tracker Trouble - Keep your foreground where it wa

PostMon Oct 02, 2023 7:37 am

Just out of interest, is there a simpler way as this is A LOT of futsing for something as simple as applying a tracker based transform. I'm not an everyday Fu user, but in my preferred comp software, all of the above goes like this:
1) Create a tracker node
2) Add and track as many point trackers as necessary and set their contributions to TRS
3) Set reference frame in tracker node (ref frame is where transform becomes identity matrix)
4) Export a matchmove transform (or stabilize or cornerpin or whatever necessary) from tracker
5) Add that transform to your element or mask etc. Done.
I do stuff.
Offline
User avatar

Ferdinand13

  • Posts: 49
  • Joined: Thu Aug 09, 2018 10:08 am
  • Real Name: Philipp Zakrzewski

Re: Point Tracker Trouble - Keep your foreground where it wa

PostMon Oct 02, 2023 9:33 am

Hendrik Proosa wrote:Just out of interest, is there a simpler way as this is A LOT of futsing for something as simple as applying a tracker based transform. I'm not an everyday Fu user, but in my preferred comp software, all of the above goes like this:
1) Create a tracker node
2) Add and track as many point trackers as necessary and set their contributions to TRS
3) Set reference frame in tracker node (ref frame is where transform becomes identity matrix)
4) Export a matchmove transform (or stabilize or cornerpin or whatever necessary) from tracker
5) Add that transform to your element or mask etc. Done.


Hey Hendrik,

It's good that you asked, because it forced me to re-evaluate the Tracker node again. As I said, over the last couple of years it never really made sense to me, but I think I might have cracked it now.

Have a look below:
Tracker_Operation.png
Tracker_Operation.png (753.22 KiB) Viewed 4259 times


With these settings in the "Operation" tab, I was able to achieve the same matchmove as with the rather complex setup outlined above :D

I think I was never able to wrap my hand around the "Match Move Settings" before, but now that I did a deep dive on how to recreate this by hand, I think I've got a better understanding.

The "Pivot type" refers to the section above, where I explained that you had to make the FG rotate around the right point in order to match the movement. This is why I chose "Selected Tracker" here.

Below I selected "Tracker 1", because that is the tracker located in the upper right corner of the bottom left window pane (as you can see from the picture).

The last one - "Reference" was the one that never made sense to me before (and which even the manual can't quite explain clearly).

"Start" or "End" are self explanatory as the first or last frame in your comp. But "Select time" always confused me. The manual says that "Select time: Lets you select the current frame."

But going by my tests today, it doesn't actually do that. Instead it seems to remember the "reference frame" I mentioned earlier, i.e. if you track from frame 50 (to the beginning and to the end) then choosing "Select time" seems to pick frame 50. Which in my case is exactly what I needed.

So bottom line, this seems to be a MUCH quicker way of achieving what I was after :D

If "Select time" does indeed do what I think it does, then the Tracker node finally makes sense to me :)
Offline

Hendrik Proosa

  • Posts: 2954
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Point Tracker Trouble - Keep your foreground where it wa

PostMon Oct 02, 2023 10:02 am

In this case you are using the tracker node itself, meaning you drag the full trackers data along too with every copy. Is there a way to export a transform from it?
I do stuff.
Offline
User avatar

Ferdinand13

  • Posts: 49
  • Joined: Thu Aug 09, 2018 10:08 am
  • Real Name: Philipp Zakrzewski

Re: Point Tracker Trouble - Keep your foreground where it wa

PostMon Oct 02, 2023 10:11 am

Hendrik Proosa wrote:In this case you are using the tracker node itself, meaning you drag the full trackers data along too with every copy. Is there a way to export a transform from it?


Not directly. I think you could copy and paste the Tracker node or create an instance of it that remains linked to the first tracker.

However, I already worked ahead a little ;)

If you download the "Reactor" plugin there's an updated version of the Tracker node called "TrackerPlus". Take a look at the screen grab below:
TrackerPlus_Operation.png
TrackerPlus_Operation.png (708.37 KiB) Viewed 4253 times

With this you get the option to pick your reference frame directly and - as you can see from the button at the bottom - export a transform node that should have all of the data baked in, similar to what the Planar Tracker node can do.

Hope this helps :)
Offline

Manuel López

  • Posts: 39
  • Joined: Thu Sep 14, 2017 11:48 pm

Re: Point Tracker Trouble - Keep your foreground where it wa

PostMon Oct 02, 2023 9:00 pm

Hendrik Proosa wrote:4) Export a matchmove transform (or stabilize or cornerpin or whatever necessary) from tracker


Where in the tracker node is the option for you can export a transform?
Offline

Manuel López

  • Posts: 39
  • Joined: Thu Sep 14, 2017 11:48 pm

Re: Point Tracker Trouble - Keep your foreground where it wa

PostTue Oct 03, 2023 4:26 am

Without using an Offset modifier, you can connect a tracker to a mask and have it stay in position. It is tested with a tracker for displacement and it works correctly. Possibly it works for rotation and scale, but I have not tested it.

1) Method that works without conditions (in any frame): connect the tracker before drawing the mask (Center XY>Connect To>Tracker1>Unsteady Position).

2) Method with reference frame and with the mask already made: connect the tracker either in the first frame, last frame or in the reference frame (where the tracker starts). To do so, in the tracker operation tab, in Match Move Setting, the reference must be set to Start, End or Select time respectively.
Last edited by Manuel López on Tue Oct 03, 2023 8:44 am, edited 1 time in total.
Offline

Ayush2910

  • Posts: 1
  • Joined: Tue Oct 03, 2023 4:50 am
  • Real Name: Ayush Raj Iyer

Re: Point Tracker Trouble - Keep your foreground where it wa

PostTue Oct 03, 2023 4:54 am

Hi there guys,

I am new to Resolve and have been trying to use the object-tracking feature on numerous occasions, but it has never worked for me. I create the mask for the object with no issues, but then when I navigate to the tracking tab and try scrubbing through the scene with the scrubber in the tab the mask does not follow the object it was created for. Any ideas?

Also when using the smoothening feature for masking does the smoother you make the edges of the mask remove any brightening you've done to the actual masked object or just affect the contrast between the mask and the background?

Any help would be much appreciated!
Offline

Hendrik Proosa

  • Posts: 2954
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Point Tracker Trouble - Keep your foreground where it wa

PostTue Oct 03, 2023 8:44 am

Manuel López wrote:
Hendrik Proosa wrote:4) Export a matchmove transform (or stabilize or cornerpin or whatever necessary) from tracker


Where in the tracker node is the option for you can export a transform?

In section Export there is a combobox for selecting what to export and a button "create". But if you read the post you quoted you'll see it isn't in Fusion.
I do stuff.
Offline

Manuel López

  • Posts: 39
  • Joined: Thu Sep 14, 2017 11:48 pm

Re: Point Tracker Trouble - Keep your foreground where it wa

PostTue Oct 03, 2023 8:52 am

Ah, sorry, I didn't get it right.

Return to Fusion

Who is online

Users browsing this forum: No registered users and 15 guests