9 Replies Latest reply on Jan 12, 2010 11:01 PM by DC B. 09

    Woes dealing with stabilize motion

    DC B. 09 Level 1

      Hi everyone:



      I've been fighting with this 30s video, trying to stabilize the motion to no success. Take a look at the screenshot. The cameraman went around the camouflaged guy and the footage is somewhat rough. I've been trying to use the built in tracker but I can't seem to find two spots on him to track it all around 360 degrees in one sweep. I also tried to change track points to new ones (in a mid-point of the clip) but what happens is that the resulting track makes the footage jump to a new scale and rotation once that happens.


      Are there any ideas how to stabilize motion on this footage?


      PS. Eventually I will need to rotoscope this guy too

        • 1. Re: Woes dealing with stabilize motion
          Mylenium Most Valuable Participant

          You can reposition trackers by Alt+dragging the search area. This will offset the values so they stay contiguous when you track in segments. You may also wish to look into scripts like KeyTweak and TrackerViz and work with separate trackers. The scripts can then interpolate between them and smooth out any kinks. For more sophisticated work you would probably need a 3D tracking tool like Boujou or SynthEyes...



          • 2. Re: Woes dealing with stabilize motion
            DC B. 09 Level 1

            Thanks, Mylenium. But I can't seem to figure out this alt-dragging thing. I made a couple of screenshots of what happens, so please take a look. Somehow at the point where I alt-drag the search regions and attach points for both trackers the resulting stabilized footage jumps and rotates at the keyframe where it happens.

            • 3. Re: Woes dealing with stabilize motion
              DC B. 09 Level 1

              Here're the rest of the screenshots...

              • 4. Re: Woes dealing with stabilize motion
                Mylenium Most Valuable Participant

                Yes, of course, there is always some minor jumping. AE's tracker is simply not smart enough to deal with such issues and, since you stabilize rather than just track, any flaws appear more pronounced. That's why, regardlesss of the method used, the two scripts I mentioned would still come in handy. anotehr thing you might try is to use parenting, i.e. you track segment A, apply the data to a Null, then track segment B on the layer itself. You can then adjust any offsets by adjusting the parenting positions. One more method would be to use multiple trackers and average them using expressions. Your rotation logic can be easily expressed with some simple Math.atan() and you may be able to use other reference points...



                • 5. Re: Woes dealing with stabilize motion
                  DC B. 09 Level 1

                  Thanks, man! I actually figured this one out myself. Here's what I did (took me almost a day). I needed two (stationary) points in his body that weren't suppose to change in relationship to the camera (to provide the effect of the 360 degree rotation). One such point was on top of his head, but the second one needed some calculations. I realized to my delight that we shot it almost on a grid-like surface (see those stone tiles in the screenshot), so I tracked two cracks on the tiles (to make two imaginary lines) and calculated their intersection underneath his feet (using expressions) to come up with the second stationary point. See this screenshot for explanation:




                  This gave me an option to stabilize the rotation using those two points and it now looks pretty cool. I'm not sure if I did it the most complicated way possible, but it worked. So thanks again for your support!


                  PS. But now I have a different situation. The second guy's footage (the same 360 shot) has his feet cut out so I can't use the surface grid to calculate the bottom point (see attached file). But if I start tracking any points on his clothes the rotation wanders off to the side and creates this wobbling effect. I think I'm stumped with this one again.... do you have any ideas how I can stabilize it?


                  PS2. I did look into KeyTweak and TrackerViz plug-ins and they will be indispensable while rotoing (at this stage I'm still stabilizing)

                  • 6. Re: Woes dealing with stabilize motion
                    Mylenium Most Valuable Participant

                    What do you guys do? This is beginning to look like a gay pride fetish parade. *lol* Regarding your problem you might have some luck using mocha. From your shot I gather that there is still a lot of pavement visible which makes perfect food for tracking a plane which mocha can export. Once you have that, you could stabilize the camera by calculating the up axis using a simple cross product vector, transforming it to screen space and inverting the values...



                    • 7. Re: Woes dealing with stabilize motion
                      DC B. 09 Level 1

                      Haha. How did you know? This is actually an official trailer for the Austrian Gay Parade OK, seriously, it's a spoof video on a post-apocalyptic robot movies... (don't ask me for details).... :=) If I ever finish it I'll post a link.


                      I tried to employ Mocha to track the surface plane but unfortunately it failed. You see the problem is that there's no single spot on the plane that stays in the shot throughout the footage, so Mocha can't get a good track of it. I'll try something else and post here what I come up with. I'm actually thinking on making an ellipse in 3D space and have it auto-rotate with the footage and then use it as a keyframe on the guy's waist. If that is done the center of that ellipse will be one of the tracking points for stabilization. The second one will be on the guy's head as well. I haven't tried it yet, and my only concern so far is how to convert a point from a coordinate in 3D space to a 2D coordinate on a 2D layer surface?

                      • 8. Re: Woes dealing with stabilize motion
                        Mylenium Most Valuable Participant

                        Read Dan Ebberts' classic: http://www.motionscript.com/mastering-expressions/lst-lens-flare.html. You may just need to add a second equation to convert the point info of the ellipse to proper layer coordinates in 3D space relative to the layer's anchor point. If you still can't get any usable results, you may consider simply moving on and looking into 3D tracking/ matchmoving programs like SynthEyes or Boujou. They might be able to reconstruct a seamless scene from your footage and give you proper tracking references.



                        1 person found this helpful
                        • 9. Re: Woes dealing with stabilize motion
                          DC B. 09 Level 1

                          Mylenium, you're the man! I stabilized it with your support. Take a look at the screenshot:



                          I looked at the picture and saw that the bottom of the blue guy's jacket is always in the shot and that it is shaped in some sort of an oval. So I created an oval rotating 360 degrees, pushed it back in 3D space and used your suggestion on how to convert its anchor point (or the center) into a 2D coordinate (red dot):


                          [From a position of a layer for the bottom red dot - 2D layer. "Ellipse" is a 3D layer]



                          The top point was the track on top of his head (as I described above). And, that's it. I stabilized the footage using those two points (with the same expression as above for the tracker) and it now looks 100 times better.


                          So thanks again!!!