Skip to main content
mattb74522626
Inspiring
October 31, 2018
Answered

Stretch and squash

  • October 31, 2018
  • 2 replies
  • 1252 views

Hello,

I was wondering if someone could help me. I’m trying to do an animation of a bike bpunching around. Does anyone have a suggestion about how to stretch and squash the wheels as they hit and leave the floor? I made a rig for the wheels with transform and warp but it just follows the wheel as it goes round. Teally appreciate any help

Thanks

    This topic has been closed for replies.
    Correct answer Byron Cortez

    The single wheel puts it into a precomposition and there you have to roll, just roll. Then that precomposition you put in the composition where is the other part of the bike, the chassis. The chassis you put as a father the precomposition of the wheel, you adjust the Anchor Point to the center of the wheel and there you modify the scale to give the effect of Stetch ans Squash or you use the Bezier Warp effect.

    2 replies

    Inspiring
    November 2, 2018
    ScooterD76
    Legend
    November 2, 2018

    Nesting a pre-comp of your spinning wheel should acheive what you are after- once you nest that into another comp you can do your distortions and the wheel will keep spinning. you can also move the anchor point of this second comp, if desired.

    Community Expert
    November 3, 2018

    What we really need to see is a screenshot of your comp with the modified properties of the layers revealed. Select all critical layers, press UU, PrintScreen and paste and we can help you. If you're on a Mac Cmnd + 3 will capture a screenshot, then just drag it to the forum.

    If you want the movement realistic then my approach would be an expression to drive the rotation of the wheel and a displacement map to deform the tire. Something like this: Dropbox - Bouncy Wheel(CC (14)).aep

    This is what that comp looks like:

    Let me talk about the wheel first. I used a polystar to create the spokes, a stroked ellipse (1) to create the rim, another ellipse (2) with a diameter larger than the first one with dashes and round caps added to make the tread. I wanted the rotation of the spokes to match the rotation of the tire tread so I used the Pickwhip to tie the rotation of the two ellipses together.

    To make the roll along the ground I created a fairly simple expression to take the y position of the layer and turn that into ellipse 2's rotation value. The expression looks like this:

    s = content("Ellipse 2").content("Stroke 1").strokeWidth / 2;

    d = content("Ellipse 2").content("Ellipse Path 1").size[1] + s;

    c =  Math.PI * d;

    a = c / 360;

    p = transform.position[0];

         p / a

    Here's what it all means. The "s" variable is simply half the stroke width. "d" is the diameter of the ellipse plus half the stroke width

    "c" calculates the circumference of the wheel. "a" calculates the rotation angle based on the circumference. "p" is the Y position. The final step is to divide the position value by the angle. The wheel now rotates perfectly along a horizontal ground line. If you want the wheel to rotate as it follows a curved path at an angle the expression gets a lot more complicated.

    Now let's talk about the displacement map. I started by just double-clicking the Rectangle tool to create a shape layer the same size as the comp. The rectangle is filled with a gradient. Displacement map works by moving pixels up or down based on value. 50% gray doesn't move any pixels, white or black moves them one way or the other by the value entered for horizontal or vertical movement in the Displacement Map UI. I set the white as the start color, 50% gray as the end color and moved the endpoint to the bottom of the wheel and put the start point below it about half the thickness of the tire. X values for start and end points were identical to make the line horizontal. I then duplicated the gradient in the timeline and changed the top copy to radial, set the blend mode to overlay and moved the start point up to give me a bump in the road. I duplicated the second gradient again and adjusted the start and end points to create another bump.

    The last step is to set the vertical displacement to 100 to squash the wheel and set a couple of position keyframes and added a little movement in Y at the start, middle, and end of each bump.

    The effect is fairly realistic. I hope this helps. This project and post are part of a presentation I am preparing for a presentation to educators that teach After Effects.

    Byron CortezCommunity ExpertCorrect answer
    Community Expert
    October 31, 2018

    The single wheel puts it into a precomposition and there you have to roll, just roll. Then that precomposition you put in the composition where is the other part of the bike, the chassis. The chassis you put as a father the precomposition of the wheel, you adjust the Anchor Point to the center of the wheel and there you modify the scale to give the effect of Stetch ans Squash or you use the Bezier Warp effect.

    Byron.
    mattb74522626
    Inspiring
    October 31, 2018

    Thanks for your reply! The front and back wheel are attached to the chassis and move at the same time Along with the panels. I basically want to anchor something to the bottom of the wheel so that when it turns the stretch and squash are vertical regardless of where the wheel turns. Do you have any thoughts on how I could do that?

    Thansk so much!!

    P.M.B
    Legend
    November 2, 2018

    mattb74522626  wrote

    I basically want to anchor something to the bottom of the wheel 

    Thansk so much!!

    Like what?   Are you asking how to anchor "something" to the bottom of the wheel or are you asking how to achieve squash and stretch?

    It sounds to me like you have some pre-conceived notion of what you need to do and you're asking how to do it.  But do you know your pre-conceived notion is correct and or achievable?

    If, on the other hand, you're asking how to achieve squash and stretch re-read byron's post very carefully.  You need  a pre-comp of a wheel turning. You then put that in your main comp and set the squash and stretch using parenting

    ~Gutterfish