8 Replies Latest reply on Sep 11, 2017 3:47 PM by Kevin-Monahan

    tracking an object that gets bigger

    getho Level 2

      Its been 20 years since I last did anything more than really basic tracking, and I'm a bit bamboozled that it seems to be as crap now as it was then. (I hardly used AE back then, I used effect, which had great tracking, but autodesk killed it eventually.)


      I've trying to track a sign that comes towards the camera. WHen its far away the corners are too small to track, and when its close the tracker just wanders off all around around it. 


      Eventually I want to replace the sign with video, but to start with I've got to center the sign on screen.  Can someone please point me to the best mode or methodology?

        • 1. Re: tracking an object that gets bigger
          Rick Gerard Adobe Community Professional & MVP

          It would really help to see a couple of frames from your video. You probably want to use Mocha AE to do this kind of tracking. On the other hand your detail areas may not be big enough especially when the sign gets big. There is nothing that keeps you from changing the size of the search area as you go along, you just need to make sure that the attach points stay attached to the point you want to follow.


          Maybe this tutorial I did will give you some pointers. The TV doesn't get bigger, it moves left to right, but the Mocha tracking is the same. Depending on the angle you may want to turn on perspective.

          There are also a bunch of great tutorials on the Imagineer site (now Boris FX)

          Online Video Tutorials « Imagineer Systems

          2 people found this helpful
          • 2. Re: tracking an object that gets bigger
            getho Level 2

            Hi Rick,

            thanks for linking that vid, yes looks like mocha will be perfect for what I want to do.  Just spent a few hours fddling with the 3d tracker, and I can see it'll be good for some things but not for this. (And also AE crashing like crazy).

            • 3. Re: tracking an object that gets bigger
              Rick Gerard Adobe Community Professional & MVP

              AE's camera tracker may work but it's really not for replacing signs. There are a lot more predictable and reliable ways to do that. The camera tracker is for reproducing camera movement so you can add 3D elements to the scene, slightly different than replacing a sign.


              If the shot works for that then sure you can use Camera Tracker, but generally Mocha is more efficient.

              • 4. Re: tracking an object that gets bigger
                getho Level 2

                thanks rick. I just stabilsed the shot and its ready for mocha, but when I "track in mocha ae" it asks me to create a new project. The OK button is greyed out as its waiting for me to import footage. But isn't the footage I'm importing just being sent from AE?


                FFS I just exported the footage.

                It would not import


                mov (quicktime using cineform codec)

                open exr caused it to crash.

                • 5. Re: tracking an object that gets bigger
                  Rick Gerard Adobe Community Professional & MVP

                  If you are using warp stabilizer first and then trying to insert something in the shot the workflow is probably wrong. You want as much information and as little distortion as possible before your track.


                  Let's take a really bad shot with a lot of rolling shutter problems, some crazy barrel distortion and explore the workflow.

                  1. Fix the lens distortion. After Effects does not have lens profiles so you will either need to do this by guessing or shoot a test grid and set up your own lens profile.
                  2. Pre-compose and fix the rolling shutter problems using Rolling Shutter Repair. Render the repaired footage to a suitable digital intermediate using a visually lossless and if possible 10 bit or better codec.
                  3. Track the DI and perform the composite. Complete all masking and color corrections so the composite is as seamless as possible
                  4. Render a second DI or if the shot is fairly short and renders fairly quickly nest your composite in a new composition
                  5. Now it is time for warp stabilizer. Warp stabilize and render.

                  Here's why this is a better workflow. First let's talk about lens distortion and rolling shutter problems. It is really difficult to fit an undistorted graphic or other element in a shot with lens distortion or rolling shutter problems because corner pinning expects straight lines. You can fix the curves by adding masks but if the inserted element moves away from the edge of the frame you will have to animate the mask and match the distortion in the shot by warping the image. The same thing applies to the rolling shutter shear. It's incredibly difficult to duplicate that kind of distortion in an image.


                  Now Let's talk about what happens when you Warp Stabilize. After Effects makes it's best guess at what motion you want to keep and what motion you want to smooth out by warping or moving pixels in the frame. It can do a really good job on some shots but there are always going to be changes in geometry. If there are fast camera moves or jerks you will have different levels of motion blur in the shot that you also have to deal with. If you warp stabilize first, then composite, you will have to add these distortions to your inserted elements to keep them looking right. This can take a tremendous amount of work and a lot of manual key framing. It's a lot easier to let the tracking follow edges and details so your composite sticks to the footage. With the right motion blur settings you can even match the motion blur in the original shot without keyframes. Once the composite works you can run warp stabilizer on the entire shot and it will treat the composite like it was real footage and everything will be "warped" into a more stable shot at the same time hiding your visual trickery and selling the shot.


                  It should go without saying that this all depends on the shot, the tracking method used, the placement in the frame, and the elements you are adding to the frame. Sometimes you can get away with a lot. The mark of an experienced FVX artist is knowing how much they can get away with so the project stays within the budget. I have found that 90% of the time, if you need to run warp stabilizer the composite always works best if you do it before you warp stabilize. I have also found that fixing lens distortion is critical if there is a lot barrel distortion in the lens and your composite approaches the edge of the frame.


                  I hope this helps. Good luck with your composite. If you have time try tracking and compositing both ways, before and after warp stabilizing.

                  • 6. Re: tracking an object that gets bigger
                    getho Level 2

                    Hi Rick,

                    I just followed your video tutorial, but when I paste the tracking data from mocha well it doesnt work:

                    just to clarify:

                    I'm selecting export tracking data format: ae corner pin [corner pin only, supports RG warp and mocha import)

                    Then pasting it into the corner pin effect I've just added to my layer.


                    I cant tell whether your'e pasting into both corner pin and CC power pin. When I try to do that I get 2 copies of corner pin.


                    When I paste the mocha data , I dont see the sign fullscreen like you did on the demo.

                    • 7. Re: tracking an object that gets bigger
                      Rick Gerard Adobe Community Professional & MVP

                      You have to select Corner pin and paste in the nested comp (pre-comp). Power pin should already be set up with expressions tied to the four corners. Corner Pin is turned off. I should have included a project file but I don't have the bandwidth to include the footage.


                      Here is a link to the animation preset that I use all the time for this kind of tracking. Stabilized Corner Pin.ffx  Feel free to download it and give it a try.

                      • 8. Re: tracking an object that gets bigger
                        Kevin-Monahan Adobe Employee

                        Hi getho,

                        Sorry for this issue. Did you ever find a solution? Please let us know if you have or if you still need help.