6 Replies Latest reply on Oct 7, 2015 6:39 AM by BenTaylor

    Is there a way to keyframe parented corner pins?

    BenTaylor

      I have imported tracked corner pin data from Mocha.

      I have created another layer within after effects, with a corner pin effect applied, and have parented the corner pins to the keyframed corner pins that I imported from Mocha.

       

      I am now needing to adjust the position of the parented corner pins, while keeping them relative to their parent.

      Any help would be definitely appreciated!

      Thanks in advance.

        • 1. Re: Is there a way to keyframe parented corner pins?
          Mylenium Most Valuable Participant

          That's what expressions do. A basic example would be:

           

          myPinSource=thisComp.layer("whatever").transform.position;

          myPinComp=myPin.toComp(myPin.anchorPoint);

           

          X=myPinComp[0]+value[0];

          Y=myPinComp[1]+value[1];

           

          [X,Y]

           

          If you need something else, you will have to explain your setup in more detail.

           

          Mylenium

          • 2. Re: Is there a way to keyframe parented corner pins?
            BenTaylor Level 1

            Hey thanks for the response. Yes I was indeed hoping for an expression to help me out.

             

            In more detail- I am tracking a face, with the intention of have the two lower corner pins tracked to the temples of the face and to the chin, and the upper corner pins hand animated, so as to insert motion graphics (I have attached an example).

            But as you can image, as the face turns, I need the corner pin from the hidden side of the face, to move to the chin while still staying tracked to maintain correct motion, and as the face turns to the opposite side, I need the points to swap.

             

            Is there an expression that allows me to manually move a keyframe that is parented?

             

            Thanks,

            Ben

            Ps. Other ways to achieve this outcome are also welcome

            Example image.png

            • 3. Re: Is there a way to keyframe parented corner pins?
              Mylenium Most Valuable Participant

              You would simply add up position data, e.g. from using point controls on a comp sized invisible layer or Nulls. I'd probably simply blend between the keyframed data and the tracker keyframes using an expression slider. Of course you have to have the input data on separate layers, not the actual layer you are deforming or else the evaluation doesn't work out.

               

              myBlend=thisComp.layer("whatever").effect("Blend")("Slider")

               

              myPinManual=thisComp.layer("whatever").effect("Point a")("Point");

              myPinTracked=thisComp.layer("whatelse").transform.position;

               

              X=linear(myBlend,0,100,myPinManual[0],myPinTracked[0]);

              Y=linear(myBlend,0,100,myPinManual[1],myPinTracked[1]);

               

              [X,Y]

               

              Mylenium

              • 4. Re: Is there a way to keyframe parented corner pins?
                BenTaylor Level 1

                Okay thanks for that.

                I've never tried the blending expressions before.

                Although, I have discover another way to do it.


                If I copy the tracked corner pin keyframes to the position of separate nulls, I am then able to delete the corner pin data imported from Mocha, and still have the position data from each corner pin, now on the position of null objects.

                From there I can create my corner pin layer and parent each corner pin to the position of the corresponding null object. However, the difference is- this allows me to transform the world position of each corner pin, by adding slider controls for the X and Y axis on the end of the transform position of each corner pin (picture attached for reference).

                 

                Anybody in my position should understand what is going on.

                It's a tiny bit tedious, but once the setup is there, it's easy as!Screen Shot 2015-10-07 at 11.25.15 am.png

                • 5. Re: Is there a way to keyframe parented corner pins?
                  Mathias Moehl Adobe Community Professional

                  This looks like a perfect application for the "Live Expressions instead of Keyframes" feature of MochaImport+.

                  With this, you can apply mocha corner pin data and still add keyframes on top of the track.

                   

                  See this tutorial for details:

                   

                  fix_inaccurate_tracks.jpg?itok=seV8A6VT

                  Fixing Inaccurate Tracks with MochaImport+ v5.1 | mamoworld

                  • 6. Re: Is there a way to keyframe parented corner pins?
                    BenTaylor Level 1

                    This is super handy!

                    The way I have detailed earlier (though sounding more tedious) is actually probably more useful for the scene I'm creating, however this is insanely handy and I'm glad you posted the tutorial cause I have meaning to check it out for ages!

                    So thanks a bunch