Tracking flies away when another roto covers it

I have a shot where I need to track the background behind some people walking.
I created garbage masks for the FG objects to track the BG


But when tracking the next frame looks like this:

The order of the layers looks like this:
2022-06-17_11-35-39
If I change so the Walls are on the top the tracked frame looks correct:

But all the FG objects does not cover the BG any longer.

What’s going? Am I doing something wrong?
If you want to try it yourself, here is a zip with the footage and a mocha frame.
https://crazypictures.myds.me:9132/sharing/TMnsJkzSq
The masking starts at frame 1001. The colorspace is ACEScg. Even if converting to RGB before going into Mocha I’m still getting the same problem.

After some more testing it seems like the problem lies in my DistortionMask (masking the undistortion-artifacts). I have it set to inverse.
If I instead create an individual roto for each side I’m not getting the bad tracking.
So it seems like there is some bug for inverted rotos.

You also have some corner vignetting you should use holdout mattes for as well.

Let me let @martinb know about the mattes.

I updated my roto to also cover the vignetting :slight_smile: but the problem with inverted rotos still persist.

Perfect, thanks for letting us know. I will see what Martin says.

I have not looked a the project but I am wondering:

  1. what are the tracking settings for the layer going off.
  2. What happens if you only try to track one layer at a time.
  3. Did you try to focus the track area just on one particular part of the graffiti image and not on the larger part of the wall?

An inverted matte is not calculated for a track matte.

A better approach is to draw a full rectangle over the entire image, then use “Add to spline” to cut a circle into the layer. This respects the hole in the matte without needing to invert, like so:

HOWEVER, we really should be respecting the inversion of a foreground matte for tracking purposes. I’ll see if this had been implemented or if this is a regression.