- Search area.
The mysterious parameters that have always been there,
but few people used it,
and it was mostly overlooked or misunderstood.
(funk jazz music)
With the latest Mocha release, it's time for a change.
It became much easier to see how change
in the search area affects the track.
So let's take a look how you can get better tracking results
by understanding how it really works.
(logo music)
(whooshing)
So what I have here are some sample clips that I shot
to demonstrate to you the basic concept.
We have the same object, same scene that I've just merged
with the split screen,
and the only difference is the speed
of how fast the object is moving.
I made the speed difference very obvious,
so you really could see how different the search area
would be for both of them.
On the very first frame of the clip,
I draw two simple shapes that would look more
or less the same.
(funk jazz music)
By default, the horizontal and vertical values
for the search area are set to auto,
but it's a bit hard to understand
what these values really mean.
That's why in Mocha 2023 release,
we added an option to visualize it.
Now you can go up into Layer Map options,
click and hold,
and into Dropdown Menu, choose Selected Search Area.
Click on that, then enable your Mattes,
and boom.
Now you can see the same way how Mocha sees.
What it shows us is an area
of pixels where Mocha would look for our object
of interest in the next frame.
When it is set to auto,
the size of the search area is defined by two things.
One of them is the spline itself.
If I adjust the spline, it also affects the search area.
The other thing is the track motion.
But currently my play hit is located
on the first frame,
and we don't have any track data at all.
That's why both of these areas looks the same.
Yet look what will happen if I track just one frame forward.
Suddenly the search area for these two objects began
to look completely different.
This is because the search area is also calculated based
on the estimated motion.
For example, the top object does not move too much.
Since we tracked one frame,
Mocha now expect this object to continue moving
at the same speed.
And there is no reason to look
for it across the entire frame.
The small area to look for is just enough.
This makes tracking go much faster and more accurate,
rather than if Mocha would try
to analyze the whole area of the frame.
Which is especially critical nowadays,
when the resolutions are just
keep getting bigger and bigger.
The bottom object on the other hand
is moving quite rapidly.
So which requires a larger source area
in order not to lose the object.
Meaning for the next frame,
Mocha expects to find the same texture pattern
rather here or here.
I would track a few more frames,
so you can see that this behavior remains consistent.
Mocha does a pretty good job of estimating the motion
and adjusting the search area on the fly.
However, not all objects move
in such a linear and consistent way.
So there are rare cases where you would want
to adjust the search area size manual.
(electric guitar upbeat music)
This is a perfect example of a clip,
where an object changes speed very quickly.
Let's try to track it and see what will happen.
I draw a circle shape and try to track forwards.
It starts fine.
But then, oops.
Mocha just refuses to continue to track.
Let's enable the search area visibility
to see why is that.
The ball was completely static
for the first half of the clip,
and Mocha does not expect any rapid motion to happen.
Our search area is simply not big enough
to follow that motion.
And sure you could use things
as adjust track or manual track,
but the simple solution would be just
to increase the search area.
I turn off the auto checkbox and adjust the values
until it's big enough to cover the area
where the object is going to be the next frame.
Something like this.
Now the track goes just fine
until the ball completely leaves the frame.
(electric guitar upbeat music)
Problem solved.
(electric guitar upbeat music)
On the less explicit examples, you may not get an error,
but instead your shape may just slip
from an object, like here.
And that's not due to occlusions,
as I already excluded that with the masks.
Let's see if the same trick would help us here.
So I enable the search area visibility,
turn off the auto checkbox.
This size is probably too huge to me,
so I actually make it a bit smaller.
(electric guitar upbeat music)
This should be fine and give it a second try.
(electric guitar upbeat music)
Now we can successfully continue
to track without any of the slipping,
and apply our favorite effects afterwards,
without the pain of doing the manual adjustments.
(electric guitar upbeat music)
But now you might mistakenly think that having
a larger search area is always the cure.
Why not just have it big all the time?
Well, in some cases, having a bigger search area
would lead into bigger trouble.
If you ever had situations,
where your spline suddenly jumps
in completely wrong direction,
stick with me to learn why this may happen.
If you are working on a clip that has a bunch
of repetitive objects,
like people wearing the same uniform,
or any other repetitive pattern,
it's actually better to have a relatively small search area.
Here I have a clip of a bunch of grapes.
Say I wanna track this particular one in the middle.
Let's first take a look at how the tracking
would go with the default setting,
when the search area is set to auto.
(electric guitar upbeat music)
The height and the width is being adjusted every frame,
based on the track motion,
and everything stays pretty fine.
But if the search area would be too large,
this is what can happen.
Due to some light changes and the fact
that the old grapes are looking the same,
it's hard for Mocha to get which one is which.
Our shape suddenly jumped from one grape to another.
But if I make the search area smaller again,
the tracking would go just fine as it should.
That's why it is set to auto
by default to help keep the tracking accurate.
This works for most of the shots.
But as we have seen,
sometimes it is necessary to adjust it manually
to get good results.
Having the option to visualize it,
make it much easier to get the size right.
(electric guitar upbeat music)
And here you have it.
We've demystified how the search area really works,
and now you can apply this knowledge
to overcome some various tracking challenges
that may have previously confused you.
My name is Elizabeth Postov for BORISFX.
See you next time.
(electric guitar upbeat music)