2 Replies Latest reply on May 17, 2015 12:01 AM by Rick Gerard

    What's a good way to line up "before and after" shots for a transition when they don't match?


      I have two clips, both were shot using a glidecam, simply walking down the middle of a street with buildings on either side.  The camera position is slightly off on the second shot, and the timing is a little faster.  I want to do a "before and after" transition starting at a big window on the right side of the street.  The idea is to localize the transition at the window, then spread it to the remainder of the shot.


      I've used motion tracking before, but only when the object I'm adding in is stationary, like text, or to replace the image on a TV screen, etc.  How do I go about tracking this window on both shots and matching them up?

        • 1. Re: What's a good way to line up "before and after" shots for a transition when they don't match?
          Mylenium Most Valuable Participant

          That's nothing that you can do with only motion tracking. You will quite likely need corrective warping using distortion effects and also of course timewarping to adjust the timing. Either way, without seeing teh footage noboy will be able to advise specifically.



          • 2. Re: What's a good way to line up "before and after" shots for a transition when they don't match?
            Rick Gerard Adobe Community Professional & MVP

            Here's what I would do for part 1

            1. Pick the edit point where you want to transition between the two clips
            2. choose the number of frames you want to use for the transition
            3. Split the leading clip at the start of the transition
            4. Set the out point of the leading clip to the end of the transition
            5. Set the in point of the following clip at the start of the transition
            6. Split the following clip at the end of the transition
            7. Select the transition portion of both clips and pre-compose the clips trimming the pre-comp to the length of the selected clips

            Now you have two short clips in a pre-comp that you can monkey with to make the transition work as seamlessly as you can. It is important to note that these two sections of the transition do not need to be the same length. If the transition part of the leading clip is 60 frames long and the transition part of the trailing clip is 50 frames long then that is OK and you can match them up by shortening the longer clip using time remapping. Once both sections are the same length you set up the alignment by stabilizing both shots using AE's tracker. If there is a perspective shift then you'll have to track position, scale and rotation. In your shot you describe a window or a TV screen that you want to match up. You want to end up with the area of interest stabilized so that it doesn't move on the screen. You do this one shot at a time by hiding the shot on the top layer.


            Now comes the likening up part. Add a null to the comp and make it the parent of the top layer. Set the blend mode of the top shot to difference or screen, or overlay so you can see the difference between the top shot and the bottom shot. Now line up the two TV screens by moving the null. Once both shots are lined up change the blend mode back to normal and animate the opacity of the top layer to complete the transition.


            The last part of the process is to remove the stabilization by adding two nulls, one for the top layer and one for the bottom layer. You'll tie the Anchor point of the stabilized layer to the position property of the Null using just the pickwhip. If you tracked scale and rotation you'll need to add an expression to the rotation and the scale property of the null that point to the stabilized layer. After the expressions are added you parent the stabilized layer to the null for that layer and you're done.


            Here are the expressions for the null if the layer is named "stablizied':




            x = value[0];

            y = value[1];

            tx = thisComp.layer("stabilized").transform.scale[0];

            ty = thisComp.layer("stabilized").transform.scale[1];

            nx = x/tx*x;

            ny = y/ty*y;

            [nx, ny]


            - thisComp.layer("stabilized").rotation

            I would suggest that you save these expressions as an animation preset.


            The last step is to scale the top layer and move it using the first null you added so that the overlay is perfect. There may be some masking required and you may have to scale the shots from beginning to end to keep the shots full frame.