5 Replies Latest reply on Dec 17, 2014 12:08 PM by MikeHoium

    shape layer - offset size change?

    MikeHoium Level 1

      is it possible to animate size of a shape layer from an offset position?


      for example - you need a rounded cube to "grow" up on the Y axis, like you might have on an animated bar chart. Scale does not work as it distorts the rounding, and no matter where the anchor or center axis is located any changes to the size parameter effect the shape in both directions from the center of the shape.


      I realize I can do this with masks, I'd just like to keep it cleaner than that. I'd like to animated the points of a shape just like you can with a mask.

        • 1. Re: shape layer - offset size change?
          UQg Level 4

          Are you currently using a (custom) Path shape ? If so, changing the scale of the shape (or of the intermediary group if any) will indeed destroy the rounding.


          But if you start with a Rectangle Shape (Contents > add> Rectangle Path) you can set a rounding, then play with size (x and y independantly) and the rounding is preserved.



          • 2. Re: shape layer - offset size change?
            MikeHoium Level 1

            I understand you can adjust the size independently - what I looking to understand is how to animate size based on an offset anchor/axis, where the points in one end will not move and the other end will animate (and leave rounding intact)



            • 3. Re: shape layer - offset size change?
              Dave LaRonde Level 6

              A real 3D application is the answer.  Think Cinema 4D.  Or C4D lite, which comes with the recent version of AE.

              • 4. Re: shape layer - offset size change?
                MikeHoium Level 1

                Maybe I'm not being clear.


                If I had a solid with a square mask that has rounded corners I could select the upper 4 vertex and animate them on positive Y and I'd have my "growing rounded cube" that would stay "seated" at its base, and the rounding would be intact.


                If I have a rounded cube shape layer I can't use scale as it ruins the rounding, and if I animate the size parameter it will grow in both positive and negative Y from the shapes center - even if I have moved the anchor/axis to the base.


                So the question is - can a shape layer's size be animated with the size change made relative to a controllable anchor or axis position, or can the size only be animated evenly in both directions from it's spatial center?



                • 5. Re: Re: shape layer - offset size change?
                  UQg Level 4

                  Indeed this isnt verry practical.

                  If your animation is "static enough", the following expression might work for you though:


                  // expression for the position property of the rectangle shape:
                  refTime = s.numKeys>0 ? s.key(1).time : inPoint;
                  dpy = s.valueAtTime(refTime)[1] - s[1];
                  [p[0], p[1]+dpy*0.5];
                  // animate the size with keyframes



                  in the following picture there are two copies of the same rectangle shape, offset in time





                  • 6. Re: shape layer - offset size change?
                    MikeHoium Level 1

                    Thanks for taking the time to create that! My mission was to simplify the creation of simple growing shapes, so going the scripting route moves in the wrong direction for me


                    I guess for now the simple answer is "no", shape layers can't be easily sized in offset way