Skip to main content
Inspiring
December 19, 2016
Answered

Tell camera to follow an object?

  • December 19, 2016
  • 4 replies
  • 19866 views

I have a wide shot of my dad cutting grass with his lawn mower. I want to zoom in on him and let the camera follow my dad. I have watched tutorials on camera tracking and motion tracking. But I can't figure out how I can follow the lawn mower when zoomed in. Any tutorials you can link to?

I'm new to this, and the lessons on adobe didn't tell me how to do it. Just point me in the right directions. I'm out of words on how to search for the right tutorial.

    This topic has been closed for replies.
    Correct answer Rick Gerard

    we should have insisted on getting the shot earlier this would save a lot of time here. there is a lot of movement here, the camera is moving and also the mower - doing this manually could be a nightmare. I think the solution is in between both approaches offered to you here: use the tracking for the anchor point to stabilize almost all the X and Y, and correct just a tad and zoom using Z position to only what you need - only a few key-frames, I am assuming it's not important to have a constant scale in the frame because this can look unnatural as well.

    I can try showing you in more detail later but just wanted to see if it works

    track the footage using stabilize motion and set a feature region. set it to adapt motion on every frame and if confidence is below 80%. when he gets to the tree there is some manual adjusting going on. you may have to move the feature region and attach point together or in separate on occasion.

    apply, set the layer as 3D so it will be easier to hover over it with just position, set the title safe markers so I can have a cross-hair right in the middle

    adjust the Z position to zoom in and set keyframes when I need to adjust (only a few)

    and there you go in only a few minutes as my girlfriend's giving me a frown face because we need to go:

    as I said, will try later to show you in more detail. curious to see how others may approach this too!


    I would use a similar approach. It took just a minute or two to find a feature in the frame that stayed in the frame for the entire shot. It's just a little pile of debris. I resized the search and detail areas so I could have enough detail to get a good track:

    Here it is in the full frame:

    On the first attempt at tracking starting from this frame I got to about 26 seconds before the track slipped and I had to go back a few frames and start tracking. Most of the time, if you loos your detail area and you go back to the last good frame you can just track forward one frame at a time using the far icon on the right for one or two frames and then go back to automated tracking and everything will be fine. When I got to the end of the clip I pressed the U key to reveal the keyframes, moved the CTI to the left of the first keyframe and pressed the K key to select the next keyframe. I then tracked backwards to the start of the clip. I had to stop and repeat the fix the lost track trick twice. With the track locked down perfectly I applied motion stabilize to X and Y. You get a comp that looks like this:

    The shot moves out of frame, but that's OK, I'll fix that in the next step.

    The first thing to do is change the tracked footage layer to 3D. This comp is pre-composed and a One Node camera is added. A one node camera is the easiest type of camera to control in this specific situation. If the shot was just slightly different you might be better off with a 2 node camera. Collapse transformations for the footage layer is enabled so that the nested comp (pre-comp) is treated like the 3D layer that it is and the camera can see beyond the edges of the comp frame.

    To maintain the resolution of the footage so that the effective scale stays at 100% I resized the comp to a smaller size so that I framed up dad to close to the maximum size I wanted him in the frame and then adjusted the X and Y position of the camera to compose the shot. I choose the NTSC DV Widescreen Square Pixel preset because that's a standard frame size that will work in a movie player. If your footage was 4D or bigger I would have picked HD 1080 square pixels. I would not make up my own frame size.

    Now I just quickly scrubbed through the footage and set a few X Y and Z position keyframes to keep dad in the shot by just scrubbing through the comp until the footage moved out of frame and then started moving back again. I then selected all of the camera position keyframes and pressed F9 to Easy Ease all of them and checked the shot. I had to go back and adjust about 3 of the keyframes to smooth out the 'camera moves' and everything was done. Total time about 10 minutes. Here's the final timeline:

    The final animation project had a natural look to it and you would never suspect that there were problems that needed to be fixed.

    Tracking the mower and stabilizing that part of the shot would not be a viable option because of the way dad moves almost out of the shot up by the tree. This was the easiest way for me to get to where I needed to be in the least amount of time while maintaining the maximum quality of the video. I I had the original full size video in hand I would have probably just resized the main comp to standard HD and used that for the maximum close up so that the camera moved only back in Z space when I animated it to change the framing.

    Either of these methods will give you a satisfactory result. The important lesson to learn here is not in the specific technique but in how to think about the problem. Your problem is solved by stopping as much of the camera movement as possible in the most effective way possible then by adding a virtual camera to the shot or by animating scale and position (harder to make look natural with only a few keyframes, but you would only know that after you had a bunch of experience).

    Good luck with the project. Here's my completed project for you to take a look at:Dropbox - dadMowing.aep​. All you'll have to do is point to your dropbox footage and you should be good to go. (note: your browser may add a .txt extension to the AEP file when it downloads. Just delete the .txt and the project should open.)

    4 replies

    Community Expert
    December 23, 2016

    All of the monkeying around with the track area with the lawn mower as the target is the reason I chose to find that spot of grass that stayed in the frame. I then eyeballed camera move which is what a real camera operator would have done and even pot in a simulated camera on a crane move. I think it's a lot easier to get natural looking camera work this way.

    Total time for my project 10 minutes. Check out the project I uploaded.

    I always try to find the method that will give me the results that I need in least amount of time with least amount of fooling around.

    Roei Tzoref
    Legend
    December 23, 2016

    Lesson learned. 

    Yes, manually moving the camera on a stabilized shot proved natural and in far lesser time. good practice though. nice job and thanks for the lesson.

    I would like to add to this technique if you don't mind. I would create a Rig for the camera (right click on the Camera->Create Orbit Null) and use a two window setup set to front and active camera. in front view with the null I would move only X and Y with my selection tool, and with the Camera I would only move the Z. now I can comfortably adjust my null to go where my mower is and adjust the motion path the way I want it.

    HaugenAuthor
    Inspiring
    December 25, 2016

    So many thanks, guys! I'm out of words. Speechless! This must be the best christmas gift. You are so helpful. I'm diving into you tutorials, and I will give this a shot.

    The jump is because of the tree. Dad got some trouble there, so I had to stop the time lapse for e minute or so. So it's unfixable.. But what you both achieved is what I want to achieve. And If I can't make it work now, I'm useless. Then I should go out and make a snowman instead.

    I write back when I figured this one out.

    Roei Tzoref
    Legend
    December 21, 2016

    Bottom line, Op: we need to see the footage. you can render an HD composition with the sequence (HDTV at the desired frame rate will do) to an mp4 file using AME and upload to dropbox or google drive. it's also worth describing again what exactly is the purpose here? is this important for this to be a totally locked shot on the lawn mower, or there's some wiggle room? without seeing the shot and trying some things it's really a guess work what will work best for you: manually (position/anchor point) or semi-automatically (stabilizing).

    Roei Tzoref
    Legend
    December 19, 2016

    it appears you want to stabilize the shot (whice requires tracking to be executed accurately) around your dad. Is that correct? Can you show us the footage and also a frame of the result you had in mind?

    HaugenAuthor
    Inspiring
    December 20, 2016

    Don't have much time now, but will show you the footage later. On another computer. But, yes. I think I need a tracker. I was hoping AE had a tracker that I could put on the lawn mower, and then let AE track the mowers movement. And when I assign the AE camera to the tracking, it will follow the mower perfectly.

    Roei Tzoref
    Legend
    December 20, 2016

    You can stabilize your footage. How complicated this should be is dependent upon the specific shot. The basic setup is this:

    1. Highlight the footage

    2. Open the tracker window and select stabilize motion

    3. Select a feature region to track and adjust the search region and track the footage

    4. hit Apply

    if the attach point had no special problems, you now have a stabilized shot around the attach point. You can scale the footage if you want.

    more about it here: Tracking and stabilization motion workflows in After Effects

    Dave_LaRonde
    Inspiring
    December 19, 2016

    You don't HAVE to track it.  You don't even need 3D.  Just Scale up the layer and animate the position property.  It ought to work pretty well.

    HaugenAuthor
    Inspiring
    December 19, 2016

    It's a hyperlapse, with 700 images. Do you mean I need to keyframe every movement? I want to keep the lawn mower in the center all the time.

    Dave_LaRonde
    Inspiring
    December 19, 2016

    You imported this as a image sequence, right?

    So it sits in a comp as one layer, right?

    Scale it up.  Animate horizontal position.  If it takes you any more than 10 minutes to get it right, write back.