Blender 2.8 Camera tracking tutorial (part 1)

Blender 2.8 Camera tracking tutorial (part 1)


hey guys welcome back to another blender
2.8 tutorial and today I’m going to be showing you how to do 3d camera tracking
all inside of blender without any add-ons necessary now because 3d camera tracking
is such a big and broad topic and there’s a lot of techniques and 3d
camera tracking I’m going to take this tutorial and split it up into two parts
so in this first part we’re going to be dealing with footage that has tracking
markers which makes it much easier to track and remember our goal is to make a
camera object inside blender that matches the motion of the shot so we
want the camera to move in the same way and also have the same perspective and
by doing a bunch of point tracks on our footage blender can solve for our camera
so obviously in this shot we’re going to choose to track the markers on our sheet
of paper and a harder shot we’re going to need to get more creative with what
we pick to track but in this case we just have it really easy so the first
step is converting this video into an image sequence and this step isn’t
entirely necessary but an image sequence doesn’t have a frame rate which
ultimately gives us a lot more control so when you can it’s always best to work
with image sequences but again you don’t have to if you don’t want to so all we
have to do is go into the movie clip editor and then just import in our
footage now that it’s imported you see on the
right panel which you can click end to toggle you see a whole bunch of
information like the resolution the framerate and also the duration which is
in frames and we want the settings in our blender project to reflect these for
the video duration there’s two ways to do this we can either change it manually
here to 139 or we can click this button called set scene frames which does it
for us automatically and now these both have the same frame duration next we
need to match the frame rates and to do this go to the output tab and then look
for the frame rate options now in our case we have a very weird frame rate
which is 29.87 and you see that’s not an option here so
we’re gonna have to use custom and we can’t just type in 29.87 because in this case it’s just gonna round up to thirty instead
what we’re going to do is scale both of these by a hundred so we have 2987 over a hundred and you can think of this as
division which gives us our correct custom frame rate and also we have the
correct resolution of 1080p by default now we just go into compositing and
start setting up some nodes so make sure that you have nodes and auto render
enabled so you can see what you’re doing and we’re going to take this render
layers node and delete it with X because we don’t need it for this to bring in
our footage just click shift a to add and then go to input and then movie clip
and this gives us our node and make sure that this is set to the correct footage
that we imported before and now all we have to do is hook these two up and if
we want to see what we’re doing we’re just going to also add in a viewer node
and then just hook it up as well now that we’re done with the setup we’re
just going to go to the output tab and then set this export to JPEG and this
isn’t really the highest quality format but it doesn’t really matter for this
tutorial and then we’re just going to create a new folder and set an output
path and while we’re still in Eevee we can just hit ctrl f12 to render out our
animation now that we’ve converted into an image
sequence we can start up a new blender project again we’re gonna go to the
movie clip editor but this time we’re going to import in our image sequence
and to import in an image sequence just select all your frames with a and then
import them and remember that an image sequence doesn’t have a frame rate so we
can just go to the output tab and freely choose our frame rate so I’m going to
choose 30 frames per second and for the project duration we’re just going to hit
set scene frames again and that’s going to automatically take care of it for us
now notice that when we scrub through the timeline the footage is a bit choppy
and to fix this what you have to do is click prefetch which loads this whole
sequence into memory and now this is playing much more smoothly
remember that we get our camera solve by just having a bunch of point tracks
for the blender camera solver we need to make sure that there’s always at least 8
trackers visible during any frame in the shot so the name of the game is getting
as many high quality trackers as possible we want trackers that last for
a long time and have a very low average error and to help us with this we want
to make sure that we’re using the best settings for our trackers the first
thing we need to pick is a motion type and there’s a lot of options like
location for example which tracks the location of a pattern between frames but
in this case it probably makes the most sense to use perspective because our
markers are kind of getting perspective warped as the camera is moving we can
also enable normalize which is going to help blender ignore some subtle lighting
changes that might have thrown off our track otherwise this does take some more
time to compute but generally it is worth it lastly in the tracking settings
extra we’re going to pick a correlation value of 0.9 this number is basically
just a threshold that the tracker needs to meet during every frame so it doesn’t
stop so when this value 0 it’s just going to ignore any error and just keep
tracking and instead if this number is 1 it needs to be a hundred percent
confident during every frame that it’s correct or otherwise it’s immediately
going to terminate so 0.9 is a very high value which demands a very high accuracy
but it does give us a little bit of wiggle room so it’s not stopping
constantly and now we can begin adding in trackers with control click and in
the tracking panel we get a zoomed in window of our tracker which lets us make
fine adjustments and center it we can also scale up this tracker with s so
our whole feature is inside the bounding box now there’s also a second hidden
bounding box which we can show with alt s and this is called the search box the
search box just defines where we’re going to search for our pattern between
each frame so a larger search box means it’s going to search a larger area but
that’s also more computationally expensive for this shot the camera isn’t
moving around very quickly so we can keep this search box rather small once
we’re happy with everything we can begin tracking manually by hitting alt and
then right arrow this is how we track frame by frame and you see that it’s
sticking on very well to center this tracker to the view you can just hit L
and that’s going to lock it to the center and after
doing a few more frames manually we can have it go through the rest of the
footage by just hitting ctrl T and it tracks all the way to the end and of
course we can also check how good this tracker is throughout the shot once
we’re happy with this tracker we can just lock it by hitting ctrl L and this
means that we’re done with the tracker and we can’t accidentally move it and
mess with the keyframes or anything like that so now we go back to the first
frame with shift left arrow and we have to do the rest of the trackers now this
isn’t going to take as long because we can do all of them at once so I’m just
going to pick a couple trackers we don’t need to do every single feature let’s do
something like ten when you set up all your trackers you can just select all of
them with a and then we’re just gonna hit ctrl T and they’re gonna track all
together then we can just hit control L to lock all of them and now it’s finally
time to work on our camera solve so just go over to the solve panel and you see a
whole bunch of options here so we’re just gonna take them one at a time for
the tripod option we’re gonna keep this disabled because this shot has a free
moving camera it’s not locked to a tripod and it’s not a nodal pan now for
keyframe and keyframe a and B options what this basically lets us do is when
we do our camera solve we pick some range that we deem to be very accurate
and then it’s just going to extrapolate that so keyframe a and B is basically
defining this range now in this case we don’t really know what we should pick
for keyframe a and keyframe B so we’re just gonna let blender decide by
enabling this keyframe checkbox and now we can click solve camera motion and
blender is going to solve for our camera and we get some number which is our
solve error which generally we want to make as small as possible a solve error
under 1 is somewhat ok but if we can get it under 0.5 then that’s pretty good
basically we want to get this value as close to zero as possible and as a
result our solve is going to become better and better the first thing we can
do to lower our solver errors go over to the refine options and you see that we
have a whole bunch of choices we are going to choose the focal length and K 1
and K2 option so that blender tries to calculate what the focal length was in
the shot that’s essentially how zoomed in we were and also the lens distortion
which are these K1 and K2 numbers and then we can just click solve camera
motion again the trick for lowering our solve error
is to go into clip display and then enable info and this is going to give us
information about the error of each individual tracker that we had obviously
what we want to do is find the tracker with the highest error and then just
delete it we then click solve camera motion again and we should have a lower
solve error so let’s say that we’re happy with this now and we want to
incorporate it into our 3d scene all we have to do is click set up tracking
scene and already this is looking very wrong but that’s because we just didn’t
set up our world orientation the first thing we do is select three trackers on
this table and set this to be our floor we can also pick one of these trackers
in particular and set this to be the world origin so everything is going to
be centered from this point we can then pick any two trackers and choose a
distance and then pick set scale so that the distance between these two points is
defined to be however many units we put in lastly to set up the x and y axes
with respect to the origin all we have to do select a tracker to the left of
the origin and then click set x-axis and then we pick a new tracker below the
origin and click set y-axis and now you see our camera solve is behaving how we
expected we can see our results by going into the rendered view in cycles
the plane becomes transparent because it’s set to be a shadow catcher however
there are no shadows to fix this all we have to do select our plane and bring it
into the foreground collection we can also go to the background layer that was
set up when we did our camera solve and we can delete it and now you see that
everything is working out as we expect we’re now gonna go into compositing and
set up our nodes before we render and you see we already have this whole
network that again is set up by default when you selected set up tracking scene
I’m just gonna delete this with X and show you how to make a custom node setup
we’re going to click shift day to add and then we need our movie clip for the
background and then our render layers for the foreground and we can then
overlay these two just using an alpha over node and then finally we’re just
going to add a composite node and also a viewer node so we can see what we’re
doing and so far you see that we have the background but not our 3d objects
and that’s because we didn’t render anything yet so I’m just gonna go to the
first frame and then hit f12 to render and then you see that our render layers
node updates and then everything works out as it should finally in the output
tab I’m going to set this to render as a JPEG sequence which we can save in a new
folder and now all we have to do is hit ctrl f12 to render out the animation
and that is the basics of 3d camera tracking in blender 2.8 so in the next
video I’m going to be going over much more difficult footage but also we’re
gonna get much more in depth about how the 3d camera tracker works so thank you
guys for watching and I’ll see you guys in the next one

100 Comments

  • Michael Lombardi

    June 17, 2019

    I did this tutorial a few months ago flawlessly, after a few beta updates I’m did the same tutorial and even with simple track points blender can’t hold a track with the same settings as compared to earlier beta versions…did something changed? And settings up a scene now with correct orientation seems impossible now?

    Reply
  • Riley_MDS/DANVXT

    June 17, 2019

    how do you render the result?
    i tried to render it, but the object still doesn't show up, it does show up, but it looks transparent so how to fix this, please i need a solution ( i think i missed something )

    Reply
  • Jack Davenport

    June 17, 2019

    It's so amazing that a free, open source program can now do what only expensive, professional software could do before. Really awesome to see 😀

    Reply
  • Unbiased Observer

    June 17, 2019

    At 8:38 to 8:40 you did a whole bunch of things very quickly without explaining. Had to slow down the video and pause play through it to figure out what you did. Please try not to do that?

    Reply
  • sumit verma

    June 18, 2019

    Having problems with shadows…no shadows were seen under Suzanne plus my plane is visible along with Suzanne…did i messed up anything..?

    Reply
  • HVUDA CZ

    June 18, 2019

    tracking points for half an hour

    solve error – 1.6

    FUUUUUUUUUUUUCCKKKKKKK

    Reply
  • SpicyMelon

    June 19, 2019

    I’m so confused now. I did literal everything right. Set up nodes to correct spots and made sure the alpha over thing was all good and set background and matched lighting and deleted background layer and everything and still the render only shows my 3D models not the clip. Why!?!? The composition looks identical. I was so determined that I even matched the positions of the nodes just because

    Reply
  • Christian Laufs

    June 19, 2019

    How can i enable "Auto Render" in Compositing? I dont have that box.

    Reply
  • kristianboy 44

    June 19, 2019

    please reply when i render i get only 3d models without the video, but when i go in camera by pressing numpad 0 i see everything correctly

    Reply
  • Simon Hren

    June 20, 2019

    tutorial au pair. like it. keep up. have fun, s

    Reply
  • Aadi Khan

    June 21, 2019

    HELP !!when I render plane uder cube is still there and if I remove it shadow removes

    Reply
  • Nuhan Khan

    June 21, 2019

    for some reason I can't see that video in the 3d viewport

    Reply
  • Shafian Siddique

    June 21, 2019

    I was struggling so much with blender's tracking system…..Thanks to you now i understand quiet nicely. Keep making these awesome tutorials dude.

    Reply
  • Spectrum TO

    June 21, 2019

    Composition didn't work

    Reply
  • M7snitor

    June 21, 2019

    bro my solve error was 1. something when i put focal length k1 k2 it turned to 0.2 …. blender did such a great job

    Reply
  • unfa

    June 22, 2019

    Fantastic tutorial. Very clear, information packed and easy to follow. This one 10-minute video is all you need to start camera tracking in Blender!

    Reply
  • Vodkalashnikov

    June 22, 2019

    i have a question. Can you answer please?

    when i click set scale , the error says two tracks with bundles should be selected.

    what i have to do please help me

    Reply
  • Peter Hall

    June 23, 2019

    Brilliant, clear tutorial. Straight to the point. Loved it and had my own success following this!

    Reply
  • רפאל כהן

    June 23, 2019

    How do you know the frame rate?

    Reply
  • AnTon Malek

    June 24, 2019

    Is there a way to render this with the plane invisible in eevee?

    Reply
  • Parallellook

    June 27, 2019

    Wow you can do enithing White Blender!

    Reply
  • Spectrum TO

    June 28, 2019

    So i got error 273 and 3064.5mm lens

    Reply
  • dumbuz

    June 29, 2019

    I got a solve error of 125.5. Well then.

    Reply
  • Ben Frans

    June 29, 2019

    Nice, no-nonsense tutorial. Subscribed.

    Reply
  • AWESOME GAMERS

    June 30, 2019

    My plane is showing up in the animation and not as a shadow catcher. 😢

    Reply
  • Aidan Webb

    July 2, 2019

    my solve error was 30…

    Reply
  • LR18

    July 2, 2019

    Just curious what your render time was on this? I've added a cube and sphere with some metallic materials and its been rendering for over an hour. Only about half way through currently.

    Reply
  • Just A Gamer

    July 6, 2019

    Bro slowdown on that compositing guide.

    Reply
  • Jeremy MCSSJ

    July 8, 2019

    2:59 *blender

    Reply
  • Leben in 360

    July 9, 2019

    #blender #tracking #cameratracking #tipsandtricks #tremendous #3d Thank you!

    Reply
  • ello propello

    July 9, 2019

    awesome 🙂

    Reply
  • Mundala PC

    July 10, 2019

    WHY ALWAYS THE MONKEY

    Reply
  • Narwal Manu

    July 10, 2019

    Sole error: 150.4665 XD

    Reply
  • TechTheGuy

    July 10, 2019

    8:50 it says that three trackers with bundles are needed to orient the floor

    Reply
  • FECU!

    July 12, 2019

    My render lays node didn't update when I hit f12, even though I get it in the camera view… Ideas?

    Reply
  • Philip

    July 12, 2019

    solve error 0.4427

    Reply
  • luha.cinema

    July 13, 2019

    i have clicked on setup tracking scene and changed the render engine to cycles everything works but if I go to rendered view the background video is not there anymore and I only can see the cube and its shadow please help.

    Reply
  • creepyman 01

    July 15, 2019

    HELP my 3d object layer isn't see throu

    Reply
  • B K

    July 17, 2019

    Amazing, man! I appreciate your efforts!

    Reply
  • colymoliTM

    July 20, 2019

    how i remove the paper in the final clip?

    Reply
  • colymoliTM

    July 21, 2019

    btw i can only see the render scene, not the clip after camera solve. also with your custom note setup. nvm i shuld switch to cycles render xD

    Reply
  • Dakimomoe

    July 24, 2019

    My only problem is that it's taking so long render each frame :/

    Reply
  • RA VEN

    July 27, 2019

    Ive been doing rendering and animation a week already and because of your tutorials Im getting better thanks bro

    Reply
  • Pawel X

    July 29, 2019

    What was the point of setting the frame rate before exporting the image sequence? It doesn't affect the images. It only matters after we import the sequence and output the movie.

    Reply
  • FlamingOre Muhammed fadi

    July 30, 2019

    when i make it into an image sequence, it zooms
    pls help

    Reply
  • K Bhill

    July 30, 2019

    When I click setup tracking scene the 3D viewport doesn't pop up and my tracks don't appear in the 3D viewport. I already solved the camera motion.

    Reply
  • Kull_Kid

    July 30, 2019

    where can i download the paper he uses

    Reply
  • Diseños Zeta

    July 31, 2019

    ¿Porqué el título del vídeo y su información está en español pero en el vídeo se habla en inglés??????

    Reply
  • Xanzi

    August 1, 2019

    How can you change the focal of the camera?

    When I try look at my result, the whole thing looks like a fisheye, the image is basically distorted and is circular

    Reply
  • Solutions

    August 2, 2019

    Amazing.

    Reply
  • mouse FOREVER

    August 5, 2019

    people where to find the lessons of this dance ?

    Reply
  • Normal Guy

    August 6, 2019

    I can't get the object to show up in render, only when I delete the clip from the editor I can see it for a second and then the clip renders on top.

    Reply
  • Johannes Seife

    August 10, 2019

    9:25 my plane doesnt become transparent what ca i do?

    Reply
  • MVF Xiedinian

    August 10, 2019

    I don't know how many times I've followed the exact steps you show, but the 2.8 official release isn't working the same for me. I have done this many times in blender 2.7 and later, but it isn't working at all, period! Does 2.8 work differently than 2.8 beta?

    Reply
  • Kris Li

    August 12, 2019

    I don't know what I did wrong but when I enter cycle mode the "ground" layer doesn't become transparent. Even when I put it into the foreground.

    Reply
  • Jae Hyun

    August 12, 2019

    hey how to hide shadow catcher when i go to cycles render it dose not hides

    Reply
  • Jae Hyun

    August 12, 2019

    I don't know what I did wrong but when I enter cycle mode the "ground" layer doesn't become transparent. Even when I put it into the foreground.

    Reply
  • Jae Hyun

    August 12, 2019

    tell me someone help me

    Reply
  • Derpson Dude

    August 12, 2019

    the ground layer and background (default scene) don't go transparent and display the video.

    Reply
  • Emilio Huizar

    August 12, 2019

    Nice tutorial! Is there any type of paper like that one that we can print out for easy tracking?

    Reply
  • toonsy

    August 13, 2019

    When I click the button "Setup Tracking Scene" it creates a simple scene without the tracking marks and without the background. Someone please help.

    Reply
  • Energetic Stunts

    August 17, 2019

    I want to render the foreground with the 3d object, but everytime I export, the foreground is not transparent and therefore has its own background, am I doing something wrong?

    Reply
  • DryChicken

    August 17, 2019

    where do i get the marker file to print it out?

    Reply
  • InCGTrainingTotatoC

    August 17, 2019

    you're going very fast

    Reply
  • InCGTrainingTotatoC

    August 17, 2019

    Hey CGMatter , the ground plane is in front of my footage

    Reply
  • Vorspiegelung007

    August 18, 2019

    meh, the video is not showing in blender for me grr

    Reply
  • Special Dude

    August 22, 2019

    Do you see how LIGHTING FAST that path tracing render when he says something about the plane as a shadow catcher.

    Reply
  • Alt Ruistic

    August 22, 2019

    I really appreciate your tutorials, but using the camera tracking tools in Blender is such a hassle …
    There are open source tools like Meshroom (https://alicevision.org/#meshroom) or Colmap (https://demuc.de/colmap/) that allow you to do these steps fully automatically. See for example this video: https://www.youtube.com/watch?v=v_O6tYKQEBA
    You can import the results into Blender using this Addon (https://github.com/SBCV/Blender-Addon-Photogrammetry-Importer)

    Reply
  • Lennard Schober

    August 22, 2019

    For everyone that has problems with the ground not disappearing: select the ground, go to the render tab>film and check „Transparency“ 😉

    Reply
  • Xenthio

    August 24, 2019

    not gonna brag but my solve error was only 0.3

    ok maybe bragging a bit

    Reply
  • sam daskivich

    August 24, 2019

    why is my solve error 4.3354?

    Reply
  • LowQualityContent

    August 25, 2019

    My render layers node doesn't show anything

    Reply
  • Wu John

    August 30, 2019

    The ground plane not transparent ,even set the film transparent.

    Reply
  • The Everything Core

    August 31, 2019

    awesome tutorial! I just found out how to make it work on EEVEE and rendering in jsut a few mins instead of waiting a thousand years for cycle to render lol.

    Reply
  • TerminatorPg

    September 2, 2019

    I'm leaving it at 2.3 i had had enough lol… My highest was 125…

    Reply
  • Rivvy

    September 3, 2019

    Need a lil help here. How do you set the plane to be a shadow catcher? Mine doesn't disappear. It just turns even grayer..thanks in advance.

    Reply
  • Kevin Element

    September 6, 2019

    You da MAN! Your tut is exemplar…no fuss…just shotgun knowledge. Thank you!

    Reply
  • Emufasar

    September 7, 2019

    Where can I get something to print out to do this

    Reply
  • Puer Latinophilus

    September 9, 2019

    In preview everything's perfect. But when I press render, Blender produces an empty background image. So the final result is just a gray background with my models in the foreground. Why?

    Reply
  • 田中孝弥

    September 10, 2019

    I played a video, but the marker does not track. What is the cause?

    Reply
  • 103683e

    September 14, 2019

    I did it, I made it, It's rendering right now !

    Reply
  • Rijaja

    September 14, 2019

    All day I've tried different makers I printed with different methods, I've shot lost of clips that all failed because I couldn't track or the solve error was too high (never less than 50, up to 120) and after trying with markers like on your paper sheet and removing the worst maker, I reached a solve error of 0.0957 !

    Reply
  • Alfiano Fong

    September 19, 2019

    WOW

    Reply
  • weeliano

    September 20, 2019

    Just curious, is there any way to adjust the brightness and contrast of the tracking clip? I know other trackers can enhance the details by adjusting the brightness contrast and sharpness of the clip that is being tracked. Other than running the footage through the node compositor and exporting another clip to track, is there a more direct way to do this?

    Reply
  • simon the digger

    September 20, 2019

    my video wasnt playing in the camera did i miss something

    Reply
  • simon the digger

    September 20, 2019

    is it possible for eevee to render the shadows and remove the plane as cycles is very slow

    Reply
  • بايت - BITE

    September 21, 2019

    didn't work, my other trackers are not moving after few frames

    Reply
  • Ignacy Wegner

    September 21, 2019

    When I mix my images with the alpha over node, the either my video shows up, my monkey head shows up or they both show up at reduced opacity. Does anyone know how to fix this. PLEASE HELP!!!

    Reply
  • S.J. Snape

    September 21, 2019

    i don't understand,by me the solve error is : nan ?!

    Reply
  • S.J. Snape

    September 21, 2019

    and if I try to set three tracks to floor it coms the error : three tracks with bundles are needed to orient the floor

    Reply
  • Ignacy Wegner

    September 22, 2019

    not gonna brag but my solve error was 64.91

    Reply
  • S.J. Snape

    September 22, 2019

    haha my solve error is 68.7724

    Reply
  • Trending Cartoon shows

    September 24, 2019

    Why i dont have auto render button in compositing tab at 2:25.. I am using 2.81 experimental

    Reply
  • SuspiciousStuff

    September 28, 2019

    u didnt show what if i get wrong track half wayu thru? i wanna keep half good track and dont want rest what do i do

    Reply
  • its MNR

    October 1, 2019

    Foreground is better rendered.. but background is not visible..wt to do

    Reply
  • mohamed khalid

    October 1, 2019

    hi
    I have one problem when I finish the motion tracking and switch to render mode the plane become over the background and don't be the shadow catcher as the tutorial
    any help please

    Reply
  • Roro Proven

    October 2, 2019

    For those who still see the plane when changing the render engine to Cycles, click on the "view object types" tab (little eye with an arrow next to it, on the upper side). And disable the object type visibility > mesh

    Reply
  • rrv raider

    October 5, 2019

    At some point in your video I see these axes showing up in the markers. Is that a setting somewhere to make these visible?

    Reply
  • Dead shot

    October 6, 2019

    Who's gonna spend the next 28 hours with no computer…
    I know I will

    Reply
  • Zhyrox

    October 9, 2019

    help i dont have the auto render option
    how to enable it

    Reply

Leave a Reply