This chapter is for everyone
who has either watched my previous DVD about Tracking in Blender,
or who are familiar with other tracking application.
So I won't go into detail about why the focal length is important?
What Camera Tracking is?
And what Camera Tracking is all about?
Just going to focus on the workflow and the interface,
and the changes to the previous version in Blender.
To get started,
let's go to the Motion Tracking layout,
where you find the Main Window
and the Open button.
Let's open up the footage.
In the Camera Tracking folder, I go to Footage,
then open
"Factory 3",
open the clip,
press F
for "fit to view",
and then Shft spacebar to make this window full screen.
F again, to make it fit to the view, and now we can start tracking.
If you didn't use Blender track for a while,
then let me give you a brief overview
over what's changed in the Interface.
On the left-hand in the Tool shelf, we have now tabs.
There's a tab for Tracking, where you will find all the operators
for setting up your Clip, adding Markers,
doing the Tracking Settings, and of course,
performing the actual tracking.
And then, there is the "Solve" tab, where you will find all the solving options.
We will use all these later.
First, let's go back to the Tracking tab.
On the right side, there are all the properties
of the current track,
of the footage, of the entire clip,
and some other things.
Now, to get started,
let's first load this into the memory,
by going to Clip, and then Prefetch,
you will find this purple line here.
The Cache Bar will fill up this
with this colour.
So, we know, this is now in our memory.
Let's add a first marker.
Add menu, and then click here.
Or even simpler,
Ctrl left click
on any trackable feature,
for example, this contrasted point
at the bottom of the column.
And if you want to move it later, just press G to grab it,
then you can
move it around.
Or you can also move it around in the Track Preview up here,
by left clicking and dragging this feature point.
What you see here is Blender's pattern area.
Can scale it up
by using this little handle here,
or just by pressing S.
If you want to see the search area, which of course we also have, you can press Alt S,
or look for the search area here in the Marker Display panel.
Tracking Blender is very easy.
Just press the Track Forward button,
that would track quite fast.
And if you want to be able to focus on the track while it's tracking,
you can center the view to the marker by pressing L,
and that will lock
the view
to this marker.
Now it will be centered all the time.
Shft left arrow to go back to the first frame,
then F
for "fit to view" again,
and then with the middle mouse button, you can also move your footage.
So that's Tracking in Blender.
Just grab a marker, press Track Forward.
If there's Track Forward, of course, there's also Track Backwards.
So Ctrl left click again on another marker.
Maybe, use this point at the bottom of the column again,
and track backwards.
Very easy.
In the previous versions of Blender,
though it's already quite a while ago,
so this was on the previous Tracking DVD,
you have SAD Tracking, KLD Tracking, and Hybrid Tracking,
in the Tracking settings.
We don't have them anymore. Now, we have different Motion Models.
So the Tracking in Blender is always quite precise.
Find the Tracking settings,
there is the Motion,
set to Location,
and we have Prepass enabled.
Prepass is the equivalent
of the old Hybrid Tracking,
which will perform a brute force search
in the search area for the feature.
If disable that,
Tracking will be even faster. But Blender will also eventually lose the track more easily.
But sometimes, it can work even without Prepass.
In this case, you can find here where it just leave the frame,
it is disabled.
Usually I keep Prepass enabled
because
it's still fast enough and would be more accurate.
Now, what's up with the Motion Model?
That's interesting, because we can make Blender deform the marker, for example,
for Rotation,
Location n Scale, or Location Rotation Scale.
Even more interesting, Affine or Perspective.
So let's say, I add the marker here on the floor,
then I would scale it up a little bit more.
And if I track that now, you can see,
it deforms with the footage.
So that's very very accurate and very nice.
If you look at the preview
up there,
it's barely changing at all.
So this is a rock solid marker.
Awesome.
So this is always useful if you track something on the floor, and the camera is moving,
perspective is changing,
then this will make it easier for Blender
to really track the feature
more accurately.
And also,
can help you to have longer tracks.
So that's the Motion Model.
What didn't change is the Keyframe or Previous Frame setting.
So usually it will look for a keyframe, which means,
if you have a marker,
let's use something here,
if I track
frame by frame with Alt right arrow,
up to frame 72,
and change something on the marker, for example, changing the search size,
then this would add a keyframe to this track
or to the marker.
And you can see that, if I track forward now,
this yellow bar, which indicate the already tracked frames,
will have this little darker yelllow spot.
So that's the keyframe,
and this will be the reference point for every new frame that I'm tracking.
In some situations, it can help to change that from Keyframe to Previous Frame.
And if I want to do that for the current marker now, I cannot do that over here.
For that, you go to the Tracking settings.
Those will always be the settings for the current active marker.
So I go here and change from Matching to Previous Frame,
and I can still track forward.
The benefit is,
sometimes it helps you to track longer,
but will also increase the probability of sliding markers,
which is not really nice.
So that's the Manual Tracking in Blender.
And
since these tracks are now finished, let's lock them with Ctrl L.
If you come from other tracking applications, then you know that
there's this Point Cloud Tracking, where you have lots and lots of feature points that are being tracked.
Blender is designed for supervised tracking.
So what we have been doing here is actually the way to go.
Still, if you want to have something a little bit more automatic,
you can use Feature Detection.
So here, in the Marker panel, we have Detect Features,
and that will track the frame for trackable spot,
and then you can start tracking.
Now the thing is, if you track them forward now, Blender will not add new markers,
if some of those markers has been disabled.
Also, it will use the setting that you had here in the Tracking settings.
Currently, I'm using Affine Tracking,
which is much more CPU intensive than location based tracking,
which is why this is now very slow.
Maybe I should have changed that before.
Anyway let's track this to the end.
You can already see that there are some of those red squares.
Those are the disabled markers.
So a marker that stops tracking will be automatically disabled.
So Feature Detection is not the same thing as the point cloud tracking
you have in other applications,
for example, in the after effects camera tracker or the new cinema 4D tracker,
it's just different.
Now the thing is, if you use Detect Features, then it's much more likely
that some of those tracks will start doing crazy things.
So you can go and scrap to the shot
and check for weird markers with weird behaviour.
But there's a tool that makes it easier to see those faulty tracks,
and that's the Curve View.
So if we leave the full screen mode with Shft Spacebar,
then you have the Curve View up here.
And usually,
this should automatically be set
to your current footage, to the active clip, which is here,
"Factory 3".
So let's change this to that clip,
and here you will have now,
the speed values
for X and Y for each marker.
And you can see that some of those tracks
have thess spikes,
which tells you that they have a problem.
Now, you can select those curves, and just go ahead and delete them by pressing X
or delete on your keyboard.
And
after you delete all these curves,
you should be good to go, in theory.
If you have tracked enough markers, then you can go ahead and solve that.
Now, how many are enough?
Well, you need at least
8 common tracks on both keyframes.
Now what's a keyframe?
Maybe, let's just first go over to this Solve panel.
Also go full screen again,
Solve panel,
and then here, you will find Keyframe A and B.
These keyframes are the initial frames that Blender use to establish the perspective
and the reconstruction of the scene.
And once it has that, would iterate over the other frames,
and solve them too.
So you can set them by hand.
Keyframe A and B, and it makes sense to set them
so there's lots perspective going on.
For example, this would be a good candidate for Keyframe B.
You can also make Blender to calculate that.
That's also something new.
So if you check Keyframe,
and then click on Solve Camera Motion,
Blender will first go over the tracks,
try to select the best keyframes.
The problem is, this can take quite long.
And if there are problematic tracks,
it can lead to weird results.
For example, here,
Keyframe A is 1, Keyframe B is 10,
and that's weird results,
that doesn't really look good.
For me, personally,
I think it's more safe to do it not automatic, but by yourself.
So let's set Keyframe View to 150,
where I can be sure that there is enough perspective.
If you Solve this again,
can see, it's even faster,
and the Solve error is better.
That is still not great. So we can perform a clean up of the markers.
So we go to Cleanup, and say
let's erase tracks that are shorter than 20.
And also select markers
where the Solve Error is higher than 1.
If you press Clean Tracks now, it'll select all of those.
Maybe this is a little bit too much,
so let's set Solve Error to 2.
Deselect them, Clean Tracks again and just erase those.
Solve again,
and the solve error is a little bit better now.
Of course, what's missing is the correct camera data.
So just as another application, you have to tell Blender what camera you have been using.
So we go to the Properties on the right side, go to Camera,
either set the sensor size yourself,
or you can also choose
from a bunch of presets.
Now with Presets, for lots of cameras,
the Arri Alexa, Blackmagic, or the camera
I've been using,
a Canon APS-C camera.
This was the Canon 550D,
it belongs to the family of
Canon APS-C cameras.
So sensor width has changed to 22.3,
and of course, we need to set the correct focus length.
Now the focal length will probably be something around 20.
I don't know for sure.
So let's try these settings.
Once we set them, we can solve again.
0.7, which is quite good already.
But we don't need to stop here.
We can also make Blender
estimate the better focal length.
So,
go to Refine,
set it to Focal Length,
Solve the camera motion,
and you can see the focal length is actually probably
more something like 20.6.
Since this was a cheap len, there is for sure some lens distortion,
and can make
Blender calculate that as well.
So go to Refine, set to K1 and K2,
Solve again,
you will find these values now change,
the Solve Error goes down a lot.
So this is actually a very good solution now,
0.2,
and can even check how this would look like,
if it would be Understorted.
So, that's a little bit better.
Probably,
it would make sense to track some of the features
that're on the outside or the borders of the frame.
Just to give Blender a little bit more information
about how the footage looks like,
at the borders of the frame,
where you will typically find the most lens distortion.
So we can try to track
a few more markers here,
in these areas.
And then,
Solve that again,
and hopefully, Blender will then
get a better estimate of the lens distortion.
Now one thing I didn't mention yet is that, you can clear a path of a marker.
So here,
I suspect that this marker is sliding a little bit
on the border of the frame,
so we can go ahead
and with the marker selected,
go back to the Tracking tab,
the Tracking panel,
and then clear the path forward.
That'll get rid of
all the sliding frames of this marker.
Solve again,
this should make it a little bit better now.
Now, there's another nice tool that has been added to Blender, which I didn't cover yet on the previous DVD,
and that is the Refine Forward and Backward button.
That's very handy if you have a marker that leaves the frame,
or something goes in front of it,
which I don't have in this example,
but let's just generate an example.
So
I put the marker
here,
track a few frames forward. And now, for some reason, I have to disable the marker.
Maybe something goes
in front of the feature here,
or at least, frame.
I just tracked up to this frame
and go a few frames forward.
Now let's say,
I want to continue tracking this feature.
I pressed G to enable the Marker again, and move it to the position where I think
I had it tracking.
I don't know for sure because I don't really have a reference.
And if I continue tracking now, I can happily do that,
but,
it might be a different spot,
as I have left the marker on frame 66.
Another nice thing is that, I can use this Refine Forward button
on the first frame, where I have enabled the Marker again,
and Blender will automatically compare that
to the last reference frame here.
Now I can continue tracking from here.
So now, I can be sure that, even if I disable a marker,
and enable it again,
even if it's a totally wrong spot,
Blender will be able
to come up with a better placement for the marker, so that I'm always tracking the correct spot.
Let me just delete this track,
and now proceed.
So what now? We have a solution,
and we want to see that in the Camera View.
So we have to do is, change this to the 3D Viewport,
maybe split the view, so that we can open up the Properties,
and then grab the camera,
then setup
Constraint,
Camera Solver,
and this will put in all the tracks for you.
This will place the camera on the correct Motion path,
this will now work.
This is a little bit tedious.
So the easier thing to do would be, instead of doing it manually,
to go to the Solve tab,
scroll down, and then Setup a Tracking Scene.
This will set up a camera solver for you. It would put the footage
in the background of your camera.
So if you press 0 to look through the camera,
you'll see your footage.
And the only thing that's missing now is the proper alignment.
To do that, you just grab 3 markers on the floor,
and go to the Orientation panel,
set Floor,
which already place your camera in the correct position.
Then what you can do next is to grab one marker,
Set it as the Origin,
and another one, Set it onto the X-axis,
this will rotate your camera correctly.
One thing I didn't mention yet, that is,
now we finally have a proper tripod solver,
so if you have a shot like this,
where you only have rotating camera
that didn't move at all,
a typical tripod shot.
What you can do is,
track features as you would always do,
you don't even have to track that many.
I mean,
you wouldn't even get away with 3,
although that would give you a good solution.
The point is, just track those markers,
and before you solve,
you just activate the Tripod button.
You don't even have to add keyframe.
You can even activate Refinement,
and then Solve the Camera Motion.
And that will Solve this as a tripod shot.
The camera will only be rotating and will not move at all,
and Blender will even calculate the proper focal length
and lens distortion, which is really nice.
So if you go and set up the tracking scene now,
you can see that Blender has now
this spherical shape,
and the camera itself
is only rotating,
so we can do with it whatever we want.
So if we rotate the camera,
the 3D points will always stick to the view.
And you can
nicely align your scene manually.
So, that's Tripod Solving in Blender.
Of course they are still new tools we didn't cover yet.
For example, different distortion model if you want to use GoPro for tracking,
or the Plane Track which is very interesting for compositing,
and of course,
the very powerful Masking mode in Blender.
But those will be for later chapters in this course.
I hope that this would get you up and running with Tracking in Blender.