6 Replies Latest reply on Feb 5, 2011 6:42 PM by Lost In My Mind

    Scale one side

    Lost In My Mind Level 1

      I'm baaaaaaack! Don't act so excited Todd . The good news is I am RTFM! Took some time off whiles my Mother passed away from cancer, house burnt down, Father had major heartattack, Sister diagnosed with cancer, several close friends passed away, etc. Good news is I'm still above ground (at least as of this writing!)   So, started taking an AE class at the local college to help get my mind on other things. Professor isn't too knowledgeable about it, but at least he admits it. Says he is mainly a 3D Max kind of a guy. First project is the ole bouncing ball deal. When it hits something, I only want that side to deform, but of course when I try to scale it, it deforms equally on both sides. Some programs allow you to hold Ctrl to do what I need, but no luck here.  As always, any and all help is appreciated. Thanks. Cin

      PS. Great to see so many of the same great people still hear! 

        • 1. Re: Scale one side
          TimeRemapper Level 4

          You need to reposition the anchor point, and un-link the scale parameter (click the chain icon to break the link).

          Screen shot 2011-02-04 at 12.45.37 PM.png

          • 2. Re: Scale one side
            Rick Gerard Adobe Community Professional & MVP

            You can also just grab the bounding box in the composition window. Scaling is only constrained there when you hold down the shift key.


            You can also use expressions tied to a slider, Expressions tied to velocity, corner pin, and a bunch of other options.

            • 3. Re: Scale one side
              Mylenium Most Valuable Participant

              If you just want one side to deform, you will need to apply distortion effects rather than use scaling. The simplest way in your case would be to use mesh warp with a suitably crude subdivision setting (2x2 up to 4x4), then enable the Distortion Mesh stopwatch and animate the deformation while animating the position conventionally...



              • 4. Re: Scale one side
                Lost In My Mind Level 1

                WOW, Timeremapper, Rick, and Mylenium, now that's what I call a welcoming committee!! I tried what Time and Rick suggested, but the 'ball' still distorts on other sides than just the bottom for me. I was so desperate last night I started messing with what Mylenium suggested on my own, but figured I was making it too hard as usual, and thought I better post before I wasted too much time. Will keep working to see if I can get a 'ball' to flatten on just the bottom, while retaining the rest of its shape. Thanks again all!   Cin

                • 5. Re: Scale one side
                  Rick Gerard Adobe Community Professional & MVP

                  Just to flatten the bottom try using the reshape effect and an expression.


                  Reshape uses two masks. The expression will look at the y position of the layer and adjust the percentage between the two mask positions as the layer comes in contact with the floor. Here's the steps. Should only take you about 5 minutes.


                  1. Ctrl/Cmnd + Y to create a new solid layer.
                  2. Name it ball.
                  3. Tab to the size and type 100, tab again type 100 again, then pick a nice red color.
                  4. Press Q twice to reveal the Ellipse tool in the Tool Bar.
                  5. Double click the Ellipse tool to create a perfect circle.
                  6. Move to the timeline and select Mask 1 then press Ctrl/Cmnd + D do duplicate the mask.
                  7. Press V on the keyboard to change to the direct selection tool.
                  8. Lock mask 1
                  9. Click on the bottom vertex on mask 2. You should see two bezier handles.
                  10. press the arrow up key 20 times to move the bottom vertex up 20 pixels (your comp view must be at 100%).
                  11. Press the Y key to select the Anchor Point / Pan behind tool.
                  12. Select the anchor point and move it to the same position as the bottom vertex of Mask 2.
                  13. Press the V key to return to the direct selection tool.
                  14. Add Effects>Distort>Reshape to the "ball" layer.
                  15. Select Mask 1 for the Source Mask, Mask 2 for the destination.
                  16. Hold down the Alt/Option key and click on the Percent stopwatch to add an expression.
                  17. Copy and paste in this expression:
                  f = 400; // y position of floor
                  d = 20;  // offset of mask 2
                  p = position[1]; // Y position of anchor point
                  if (p <=  f - d) {
                       squash = 0
                  else if (p> f - d) {
                       squash = linear(p, f-20, f, 0, 100)

                  Now whenever the ball layer moves to a Y position of 400 pixels the Reshape Effect will make a transition from mask 1 to mask


                  In plain english this is what the expression says: I will define the floor (f) at a Y value of 400 pixels, I moved the bottom vertex of Mask 2 up 20 pixels so I will call that "d" for deformation. I will find the position of the layer by defining the Y value of the position as "p." Now if the position (p) is less than or equal to the position of the floor (f) minus the new bottom of the reshaped layer (d) I will set the squash value to 0%. If the y position (p)is greater than the the position of the floor (f) minus the offset (d) then, now here comes the fun part, I want you to look at the value of p (the position) and when the value changes from the floor position -20 to the floor position make a linear transition between the value of 0 and 100. In other words from 380 to 400 change the squash percentage from 0 to 100.


                  Three more steps and you're ready to animate your auto squishing ball.

                  1. Create a new solid (Ctrl/Cmnd + Y) called floor that's about twice the size of your composition.
                  2. Make the layer 3D and rotate it on the X axis 90º
                  3. Change the layer's Y position to 400 and you're ready to animate your bouncing ball


                  You could also use this same same expression idea for the scale property by say scaling between 100 and 80%, or you can simply move the anchor point very near the bottom of the ball layer then animate the y scale value. The key to making most of these ideas work well is moving the anchor point.


                  Hope this helps open your eyes to the possibilities. There are also about a hundred other ways to do the same thing.

                  • 6. Re: Scale one side
                    Lost In My Mind Level 1

                    Hope this helps open your eyes to the possibilities.

                    Oh sure, I almost had that figured out on my own......NOT!!!  Don't have a large enough vocabulary to describe how amazing I think you are! I still haven't forgotten how you helped with that displacement map on the mountain that you also showed me how to do. Thank you for taking the time to not leave a single step out, as I would surely goof it up. Just following your receipe, I learned 3 or 4 new tips and tricks I never knew, or forgot! AE is good, but it's you guys that make it great!! Don't know what you do for a living, but I sure hope it involves AE.    


                    PS. Just so you know, I would never take credit for any of your work. I will be sure to share with my class and teacher, who and where this info came from. He probably wouldn't beleive me anyway!    Thanks again. Cin