Advanced Squash and Stretch Rig in After Effects

  • Share
 

Similar lessons

Advanced Squash and Stretch Rig in After Effects


Need a quick primer on the basics of Squash and Stretch? Check out this helpful After Effects lesson.

If you've taken Animation Bootcamp you know how important Squash and Stretch is to making your animations come to life. It’s the great multi-tasker, doing things like mimicking motion blur and adding a sense of flexibility and volume to what you’re animating.

The easiest way get squashing and stretching in After Effects is by using the scale property which can give you uniform, clean looking squash and stretch. That’s good for some things, but it can get boring after a while.

In this lesson you’re going to learn how to build a sweet squash and stretch rig that will warp and bend your characters in a more interesting way that the scale property alone can't. You’ll be pairing up effects with simple expressions to build a rig that keeps you in control without adding a ton of extra keyframes.

BONUS: Because it’s built with effects and expressions you can save it as an animation preset for easy re-use!

If you want to grab the finished rig you can log in and download it.

If you have any questions, click over to the Q&A tab to post them. Other students can answer you, and we'll put our team on the case to try and get you a solution ASAP.

Download Project Files
    00:00:00,093(organ cha cha music)
    00:00:00,926(popping noise)
    00:00:02,538(single vocal ah)
    00:00:03,889(group vocal ah)
    00:00:09,098(upbeat drum music)
    00:00:19,125(electronic background music) - Hey, this is Jake Bartlett
    00:00:20,198for School of Motion
    00:00:21,469and in this lesson I'm going to be teaching you
    00:00:23,518about an advanced squash and stretch method.
    00:00:26,586Now if you're not familiar with
    00:00:27,419the squash and stretch animation principle,
    00:00:29,090you should definitely go back and watch Joey's lesson
    00:00:31,832on what it is, why it's important, and how to do it.
    00:00:35,556That'll get you up to speed,
    00:00:36,726then you can come back to this lesson
    00:00:38,116and learn how to apply it in a more advanced way.
    00:00:40,611Squash and stretch can add a whole lot of life
    00:00:42,619to your animations and it's really great
    00:00:44,460for making things look cartoony.
    00:00:46,086Now what we're going to do in this lesson
    00:00:47,396is streamline the entire process
    00:00:49,567of applying squash and stretch
    00:00:50,919to anything you wanna animate.
    00:00:52,801Simple shapes, text, characters, anything at all.
    00:00:56,937And on top of that, we're gonna be adding
    00:00:58,163an extra level of detail
    00:00:59,720that will create unique deformations
    00:01:01,646with your squash and stretch.
    00:01:03,614We're gonna be using a few expressions,
    00:01:05,005but none of them are too complicated,
    00:01:06,603so don't worry if you're not too savvy with them.
    00:01:08,691And don't forget to sign up for a free
    00:01:09,839School of Motion student account, so that you
    00:01:12,022can have access to my project files for this lesson
    00:01:14,497as well as all the other lessons on School of Motion.
    00:01:17,056Plus, you'll be added to our weekly newsletter,
    00:01:19,028which keeps you up-to-date on this industry
    00:01:20,952and everything that's happening
    00:01:21,936over here at School of Motion.
    00:01:23,632Now squash and stretch is a super helpful technique
    00:01:26,128for giving life to your animations,
    00:01:27,973but sometimes just using the Scale property
    00:01:30,389makes it all look a little too uniform
    00:01:32,068and can start to look a little plain.
    00:01:33,745Let me show you what I mean by that.
    00:01:35,302I've set up this little demo to explain
    00:01:37,882what squash and stretch is and then what we'll be doing.
    00:01:40,997So on the left side you see there's no warping at all.
    00:01:43,698This little chiclet guy is just jumping up,
    00:01:46,235falling down, there's no squash and stretch.
    00:01:48,404In the middle here, I'm using the Scale property
    00:01:51,475to drive the squash and stretch.
    00:01:53,112So the character anticipates his jump,
    00:01:55,406squishes down, hops up in the air,
    00:01:57,861and then deforms to make a much more cartoony,
    00:02:00,564bouncy, squishy looking animation.
    00:02:03,061That gets the job done and a lot of times,
    00:02:04,738it can look just fine.
    00:02:06,089But what we're about to do is add another level of detail
    00:02:08,916that you can see over on this third character,
    00:02:11,371where we're not only scaling the layer,
    00:02:13,253but we're also deforming the shape.
    00:02:15,669So right in here, you can see that the character
    00:02:17,389is bending in a way that just animating the Scale property
    00:02:20,293wouldn't allow us to do.
    00:02:22,258That little extra detail
    00:02:23,609can add a lot of life to your animations.
    00:02:26,066So let's jump in and see how we can make this happen.
    00:02:28,317I'm gonna make a new comp.
    00:02:30,2011920 by 1080, 24 frames per second.
    00:02:32,986And I'll make the background white so it's easy to see.
    00:02:35,486And I'll start by making a new solid
    00:02:37,125and I'll just make it 200 by 200 pixels,
    00:02:40,034and pick a nice orange color.
    00:02:42,818Hit OK.
    00:02:44,906And then I'm going to add the Warp effect.
    00:02:47,691So I will find Warp and apply it.
    00:02:51,334So let's take a look at what this effect is doing.
    00:02:53,217You may be familiar with it already,
    00:02:55,139but it just allows you to bend and distort
    00:02:56,642whatever it's applied to in some preset ways.
    00:02:59,877So by default it's set to the Arc Warp Style,
    00:03:03,443and I have this Bend control,
    00:03:05,204which allows me to control how much it bends
    00:03:07,457and in what direction.
    00:03:09,423I can also choose which axis to warp it on,
    00:03:12,410so we can go vertical or horizontal.
    00:03:17,156And if you go through the warp styles,
    00:03:18,427there are all different kinds of warps
    00:03:19,914that you can apply to your layers.
    00:03:22,496So you can take some time to look through all of these.
    00:03:24,707We're gonna be using the Bulge warp style for this.
    00:03:27,819And as you can see, this warps the top and bottom
    00:03:30,563when it's set to Horizontal.
    00:03:32,283And if I change it to Vertical,
    00:03:34,207it'll kinda push the edges out or bring them in.
    00:03:37,032This is how we're going to be using it,
    00:03:38,711so make sure the Warp Style is set to Bulge,
    00:03:41,416and your Warp Axis is set to Vertical.
    00:03:44,366Some other controls we have
    00:03:45,199are Horizontal Distortion and Vertical Distortion,
    00:03:47,540and these are also gonna come into play.
    00:03:49,382If I adjust this, you can see that it kind of skews
    00:03:52,164the layer left and right, or up and down.
    00:03:57,241Now one important thing to take note of
    00:03:59,013is that right now this Warp effect
    00:04:00,202is basing the warp on the size of the layer.
    00:04:04,012But if I were to make a Shape layer,
    00:04:06,591and I'll make the square the same size as our Solid,
    00:04:10,890and I'll just push it over to the side so we can see it,
    00:04:13,387and then I apply the Warp effect to that,
    00:04:16,824you can see this is not working the same way.
    00:04:18,707If I move my Shape layer around,
    00:04:21,248it doesn't really seem to make sense at all.
    00:04:23,337What's actually happening
    00:04:25,014is that because this is a vector layer
    00:04:27,390and not a raster layer like the Solid,
    00:04:29,642the effect is being based on the bounding box
    00:04:32,385of the comp rather than the bounding box of the layer.
    00:04:36,235And that's how it's going to work for any layer
    00:04:38,036that's vector or continuously rasterized.
    00:04:41,022So Shape layers, Text layers,
    00:04:43,272and continuously rasterized comps.
    00:04:45,565The workaround for these types of layers
    00:04:47,204is to precomp the artwork before you apply the effect.
    00:04:50,124So if you're gonna be using Shape layers or text,
    00:04:52,787anything that the warp isn't based around
    00:04:54,302the bounding box of the layer,
    00:04:56,062make sure that it's precomposed.
    00:04:58,151So if I remove the effects and precompose this layer,
    00:05:01,876name it Box, this precomp is still the same size
    00:05:05,724as my main comp, so I need to go into it
    00:05:08,306and change the size to be 200 by 200.
    00:05:11,584Now I could leave a little bit of room
    00:05:13,468around the outside edges if I wanted
    00:05:15,271and that would be just fine.
    00:05:16,949So let's say 250.
    00:05:19,159And that might give you a little bit more room
    00:05:20,466to customize this if you were turning it
    00:05:21,757into a character like my example.
    00:05:24,934But then we come back out to our main comp.
    00:05:26,979I'll copy this effect onto the box.
    00:05:29,312Now it works exactly how it needs to.
    00:05:33,856Alright, I'm gonna delete that layer and we can move on.
    00:05:37,379The first thing I wanna do is link this Vertical Distortion
    00:05:40,959to the Bend amount so that those two numbers
    00:05:43,497are always the same and I only have to animate one of them
    00:05:46,896to get the result of both of them.
    00:05:49,311So I'm just gonna open up the effect
    00:05:51,278and then I'll add an expression on the Vertical Distortion
    00:05:53,692by holding Option and clicking on the Stopwatch,
    00:05:56,394and then pick-whipping the Bend value.
    00:05:59,767That will automatically generate the expression code
    00:06:01,773that it needs to reference that effect.
    00:06:04,106I'll click off of it and now whatever this value is set to,
    00:06:07,954the Vertical Distortion value will update with it.
    00:06:10,658So already we're simplifying our process
    00:06:12,132by cutting out one of the properties
    00:06:13,730that we would've had to keyframe by hand.
    00:06:15,857I'm gonna set this to zero for now.
    00:06:17,618And we could drive the squash and stretch
    00:06:19,337part of this effect using the Scale property.
    00:06:21,917So I could open up the Scale, unlink them,
    00:06:24,005set this one to 50 and this one to 150,
    00:06:26,751but that squash and stretch is based on the anchor point,
    00:06:29,579and I would want it to be at the base of the layer.
    00:06:32,158So if I move that down to the base, that could work,
    00:06:34,574but now my anchor point is at the base of the layer
    00:06:36,622so things like the rotation
    00:06:37,768are gonna be based on that as well.
    00:06:40,389So instead of using the Scale property,
    00:06:42,560we're gonna use an effect that's gonna make
    00:06:44,198the squash and stretch completely separate
    00:06:46,245from the Transform controls of the layer.
    00:06:48,786So we'll come over to the Effects & Presets
    00:06:50,749and type in transform and apply the Transform effect.
    00:06:55,430Now if you've never used this effect before,
    00:06:57,355it basically just gives you
    00:06:58,623all of the transform properties that any layer already has,
    00:07:02,924as well as some additional controls
    00:07:04,847that are gonna help us out with this rig.
    00:07:06,975So here I've got a scale.
    00:07:08,695I can reposition the layer.
    00:07:10,375And you'll notice that the actual layer itself
    00:07:12,953is not moving, it's just the contents within it.
    00:07:16,311So this added level of control is really gonna help
    00:07:18,440making animation a lot more controlled and fine tuned.
    00:07:22,496So let me recenter that.
    00:07:24,791The first thing I wanna do
    00:07:25,897is be able to change the anchor point.
    00:07:27,983So if I grab the anchor point and adjust it,
    00:07:31,178you see that's shifting my layer around.
    00:07:34,536To fix that, I need the position to go
    00:07:36,789where the anchor point is and then
    00:07:40,954the layer will scale off of that point.
    00:07:43,572But I want that to automatically happen
    00:07:45,498wherever I put the anchor point the position to go with it.
    00:07:48,240So we're gonna add another expression.
    00:07:50,287I'll press E to bring up my effects,
    00:07:52,172twirl down Transform, and I just wanna link Position
    00:07:55,242to the anchor point.
    00:07:56,225The same way we linked Vertical Distortion to the Bend.
    00:07:59,401So I'll hold down Option,
    00:08:00,794click on the Stopwatch for Position,
    00:08:02,634and then use the Expression pick-whip
    00:08:04,599to select the anchor point.
    00:08:07,507Let go, click off.
    00:08:09,062And now wherever I put this anchor point
    00:08:11,029the position moves with it.
    00:08:12,420Now my layer is still moving because I changed the Scale.
    00:08:14,957So let me put that back at 100.
    00:08:17,453But here we go.
    00:08:18,312Now I can move this anchor point around
    00:08:20,371and the layer stays where it should.
    00:08:22,417So I will just drop this down to the bottom center.
    00:08:26,060And then I wanna unlink my scale, width and height.
    00:08:28,354So I will uncheck this Uniform Scale.
    00:08:30,935So now I can independently adjust the height and the width.
    00:08:35,149And that will allow me to animate my squash and stretch.
    00:08:38,466Now these are two separate properties,
    00:08:39,611but I don't wanna have to keyframe both of them
    00:08:41,533to drive my squash and stretch.
    00:08:43,262So if you remember from Joey's lesson,
    00:08:45,225you want your layer to pretty much maintain
    00:08:47,190the same volume at all times.
    00:08:49,603So if you were to scale the height down to 50,
    00:08:52,550you would want the width to scale up to 150.
    00:08:55,787And the way you can always check this math
    00:08:57,138is just add up these two values
    00:08:59,101and make sure they always equal 200.
    00:09:01,888So if this is 125, then this should be 75,
    00:09:06,147that equals 200, the volume is maintained.
    00:09:09,915But when you're animating, you don't wanna have to think
    00:09:12,289about all that math, and frankly you shouldn't have to.
    00:09:15,932So we're gonna solve this with expressions
    00:09:17,981so that After Effects does the math for us
    00:09:20,192and these two values always equal 200.
    00:09:23,345To do that, I'm just gonna Option-click
    00:09:25,514on the Scale Width property,
    00:09:27,398and I'm gonna type in 200 minus,
    00:09:30,837and then I will pick-whip the Scale Height.
    00:09:34,198So this value should be 200 minus whatever this is set to.
    00:09:38,991If I click off of that, that simple little equation
    00:09:41,349is now calculating my squash and stretch for me,
    00:09:44,665so all I have to do is animate the Scale Height
    00:09:47,241and the volume of that layer will always be contained.
    00:09:50,883So very simple little equation,
    00:09:52,683but it completely simplifies the process
    00:09:55,137of animating squash and stretch.
    00:09:57,429And just to reiterate what this anchor point is doing.
    00:09:59,681If I clicked and dragged it to the top of the layer instead,
    00:10:03,410now my squash and stretch is based on the top.
    00:10:06,726So I will just put that back down at the base,
    00:10:11,860and we can move on.
    00:10:13,375Let me set this back to 100.
    00:10:15,341And the next thing I need to do is get the Bend
    00:10:17,470to work with that Scale Height.
    00:10:19,353So all we have to do is animate a single property,
    00:10:22,958and all of our warping and squash and stretch
    00:10:25,211is happening automatically.
    00:10:27,630Now this next expression is a little bit more complex,
    00:10:30,414but pretty straightforward once you understand it.
    00:10:32,706So I'm gonna add an expression to the Bend property.
    00:10:36,510Give myself a little bit of room.
    00:10:38,557And we're gonna start by defining a variable.
    00:10:40,930Now a variable is just a way for you
    00:10:42,770to write your own shorthand within expressions.
    00:10:45,965So I'm gonna start by typing var for variable, space,
    00:10:49,856and then we have to name the variable.
    00:10:51,782So I'm gonna type S for scale, height,
    00:10:54,731and I'm gonna make that H capital.
    00:10:56,820Now that capital H isn't extremely important.
    00:10:59,320That's just kind of the common way of writing code.
    00:11:01,981Every new word is capitalized
    00:11:03,743and it can just make your code a little bit easier to read.
    00:11:06,527And then I'll put another space, equals, space.
    00:11:10,047And then we need to tell this variable what it contains.
    00:11:13,487So I will grab the pick-whip
    00:11:15,369and come down to the Scale Height and let go,
    00:11:18,521and finish this line of code with a semicolon
    00:11:21,101so that After Effects knows that's the end of the variable.
    00:11:24,254So now anytime that I type sHeight,
    00:11:26,714After Effects will interpret it as this line of code
    00:11:29,497that references the Scale Height.
    00:11:31,830Now I'm gonna drop down two lines
    00:11:34,202and we're going to write a linear expression.
    00:11:37,192Now a linear expression is just a way
    00:11:39,445to interpret one range of values
    00:11:42,024into another range of values.
    00:11:44,031So let's just write the expression
    00:11:45,462and then I'll explain how it works.
    00:11:47,092So we're gonna start by typing linear, open parenthesis,
    00:11:51,839and then sHeight.
    00:11:54,949And again, that will reference this line of code.
    00:11:57,696Then I'll put a comma, zero, comma 200,
    00:12:03,388comma 50, comma negative 50,
    00:12:09,242then a close parenthesis
    00:12:11,330and a semicolon to finish off that line.
    00:12:15,178So what is this saying?
    00:12:18,087The linear expression is first looking for a property.
    00:12:21,733So we told After Effects to look
    00:12:23,078at the Scale Height property right here.
    00:12:26,720Then it needs four values.
    00:12:29,463A minimum and maximum input range,
    00:12:32,247and a minimum and maximum output range.
    00:12:35,113So it's gonna look at that scale height property
    00:12:37,283when it's between a value of zero and 200.
    00:12:40,447And I chose those two numbers because
    00:12:42,207I'm never going to set my Scale Height lower than zero,
    00:12:45,402and I'm never gonna set it higher than 200.
    00:12:48,225So that is the minimum and the maximum input range.
    00:12:53,137Then it needs to know, what do you want to remap
    00:12:55,919that range to be?
    00:12:58,046So when the Scale Height is set to zero,
    00:13:00,542I want the Bend property to be set to 50.
    00:13:04,552And when the Scale Height is set to 200,
    00:13:06,925I want the Bend to be set to negative 50.
    00:13:10,527Now if I click off and adjust the Scale Height,
    00:13:14,455you can see what's happening.
    00:13:16,419The Bend property is automatically changing
    00:13:19,329based on the Scale Height.
    00:13:22,074And because we linked the Vertical Distortion to the Bend,
    00:13:24,735that is also being adjusted.
    00:13:26,701So with these two effects and a few simple expressions,
    00:13:29,614we've created a squash and stretch rig
    00:13:31,823that warps and deforms in interesting and unique ways,
    00:13:34,853and automatically calculates our squash and stretch
    00:13:37,352all based on a single property.
    00:13:39,481So if I just set a keyframe
    00:13:40,831and press U to bring up that keyframe,
    00:13:42,754I could literally animate this entire squash and stretch rig
    00:13:46,524with a single property,
    00:13:48,325something that would have taken me a lot more time
    00:13:50,312if I was having to keyframe
    00:13:51,540each one of those properties individually.
    00:13:57,111I'm gonna get rid of these keyframes.
    00:13:58,993Set it back down to 100.
    00:14:01,162And there's actually another feature of the Transform effect
    00:14:03,825that's gonna come in handy when you're animating things
    00:14:05,997that use squash and stretch.
    00:14:07,717And it's the Skew part of this effect.
    00:14:10,336If I adjust the Skew, you can see that it warps our layer
    00:14:13,121in another interesting way.
    00:14:14,430And in this instance, I would want my Skew Axis
    00:14:17,215to be set to 90 degrees.
    00:14:20,733And as I adjust the Skew now, you can see that it's based
    00:14:23,104on where the anchor point is.
    00:14:25,356So the Skew property allows me to lean my layer
    00:14:27,731in one direction or the other.
    00:14:29,329This in combination with the squash and stretch,
    00:14:32,524can make things like bounces and jumping
    00:14:34,901much easier to control.
    00:14:36,784And another benefit of using the Transform effect,
    00:14:38,913is again that all of the squash and stretch, the skewing,
    00:14:42,109everything is contained within that effect.
    00:14:44,854So I can resize this layer,
    00:14:47,025reposition it, rotate it,
    00:14:48,987and none of that transform the actual layer
    00:14:52,221will mess with the Transform effect.
    00:14:54,716So your squash and stretch, the skew, the warp,
    00:14:58,358is all independent of those transform controls.
    00:15:01,124So that's very handy
    00:15:02,638when moving around and animating your layers.
    00:15:05,014Let me get this Scale back to 100 and the Skew back to zero.
    00:15:09,069So the way that we set this up
    00:15:10,541is really for the character to be based on the ground.
    00:15:13,941So when I do this squash and stretch,
    00:15:16,028you see that it's based on where we put our anchor point
    00:15:18,610down on the imaginary floor.
    00:15:22,130But what if I wanted this character
    00:15:24,222to start at the ground, jump up and hit the ceiling,
    00:15:27,310and then squash and stretch off of that?
    00:15:29,808Well, then we'd need to move the anchor point to the top.
    00:15:32,261We'd need to keyframe it from the base
    00:15:34,349for when it jumps off the ground.
    00:15:36,192So we can have the squash and stretch there.
    00:15:37,993But the way that we've set this up,
    00:15:39,671really doesn't work for things like
    00:15:40,882hitting into the ceiling.
    00:15:42,362We would want the fat part to be at the top,
    00:15:44,672rather than at the bottom.
    00:15:47,004So instead of keyframing and having to mess with the effects
    00:15:49,991that we've already set up,
    00:15:51,709instead we could just duplicate these two effects,
    00:15:55,024adjust them for the top, and have two separate controls.
    00:15:58,719So I'm going to rename this Warp Bottom,
    00:16:03,020and Transform Bottom.
    00:16:06,008And then I'm going to duplicate both of these effects.
    00:16:09,734I'll drag it to the bottom,
    00:16:11,944and then I'll rename these,
    00:16:14,441Warp Top and Transform Top.
    00:16:21,526Alright, so I've got Warp Bottom, Transform Bottom,
    00:16:23,408Warp Top, Transform Top.
    00:16:25,416First thing I need to do
    00:16:26,472is make sure that I have the Top Transform selected,
    00:16:29,326put the anchor point up at the top,
    00:16:31,863and something already is messing up.
    00:16:33,991What's going on?
    00:16:35,300Well, when I duplicated these effects,
    00:16:38,166the expressions stayed exactly the same.
    00:16:40,825So these expressions that you see are red,
    00:16:43,691are still referencing the original effects.
    00:16:47,047So I'm gonna select my layer and double tap E
    00:16:49,506to bring up all of the expressions.
    00:16:52,002Give myself a little bit more room down here.
    00:16:55,316And we need to go to the Transform Top,
    00:16:57,748Position expression, and change the referenced property.
    00:17:01,454Right now it's referencing the Transform Bottom,
    00:17:03,705which you can see right there.
    00:17:05,057All I have to do is go into that expression
    00:17:07,377and change Bottom to Top
    00:17:09,343because that's what we renamed the effect.
    00:17:13,521Now my layer went back to where it's supposed to be.
    00:17:16,716And as you can see, I can move this anchor point around
    00:17:20,359and the position follows it.
    00:17:22,119So that's great.
    00:17:23,511Now we just have to do the same thing
    00:17:24,859for all the other expressions.
    00:17:26,657Wherever it says Bottom, just go in and type in Top.
    00:17:31,283Do that for the Warp effect as well.
    00:17:37,065Once all that is done,
    00:17:39,236now I have this secondary control for squash and stretch
    00:17:43,004that's operating independently
    00:17:44,723of the bottom Transform and Warp.
    00:17:47,998So now that we've got all of our expressions
    00:17:49,423referencing the right properties,
    00:17:51,180we need to adjust some things
    00:17:52,653so that it looks like this is crashing into the ceiling.
    00:17:55,027So let me just put it up at the top of the composition,
    00:17:58,585and I will squish it down.
    00:18:00,387Now like I said before, I want the fat part
    00:18:03,050to be at the top, not at the bottom.
    00:18:05,711Now let me close up the Transform Bottom
    00:18:07,431and the Warp Bottom just so we can focus
    00:18:09,436on the top controls.
    00:18:11,935And we need to go to the Vertical Distortion
    00:18:14,168and inverse that value.
    00:18:16,130Now this is extremely simple.
    00:18:17,358All we have to do is go into that effect
    00:18:19,447and add at the end of it, times negative one.
    00:18:23,131Then click off and you see that now
    00:18:25,465that Vertical Distortion is inversed.
    00:18:27,404The fat part is now at the top and I can adjust this
    00:18:30,554and it's working exactly the way it needs to.
    00:18:33,950Perfect, but what if it needs to go
    00:18:36,200on to the side of the comp and squash into the side instead?
    00:18:39,579Well let's go ahead and build out controls for that as well.
    00:18:42,403I'll collapse these two effects and duplicate them again.
    00:18:46,091Bring them to the bottom and rename them
    00:18:48,058Warp Right and Transform Right.
    00:18:54,811Then I'll again double tap E to bring up the expressions
    00:18:57,429and collapse all of the ones that I don't need to see.
    00:19:00,530And I'll start with the position again,
    00:19:03,354changing Transform Top to Transform Right.
    00:19:08,963Then I'll in to the other expressions
    00:19:11,094and do the same thing, replacing top with right.
    00:19:18,273Okay, now everything is referencing correctly.
    00:19:21,714I'll set the squash and stretch for the top back to 100,
    00:19:25,972and come down to my Transform Right
    00:19:27,731and adjust this Scale and you can see
    00:19:29,654that we need to make some adjustments.
    00:19:32,151So, first of all, let me just put this back to 100.
    00:19:35,470We need to put the anchor point
    00:19:36,738to the right side of the layer.
    00:19:39,400And I'll align this to the right side of the comp.
    00:19:42,061So when I adjust the Scale Height,
    00:19:43,821it's based on the right point on the layer,
    00:19:45,623but the warping is completely off.
    00:19:48,326The first thing we need to do is go to Warp Right
    00:19:50,750and change the Warp Axis from Vertical to Horizontal.
    00:19:55,296So now that bulge is going to be going from
    00:19:58,450the top and bottom rather than the left and right.
    00:20:01,972And then instead of Vertical Distortion,
    00:20:03,814we need to adjust Horizontal Distortion.
    00:20:06,967So let me collapse the Warp and open it again
    00:20:09,505so we can see all of our properties.
    00:20:11,958And I'm just going to cut the expression
    00:20:15,151out of Vertical Distortion,
    00:20:17,893and then make an expression on Horizontal Distortion
    00:20:20,964and paste it in there.
    00:20:22,849And while I'm in here, I'm gonna get rid of
    00:20:24,405this inverse expression times negative one.
    00:20:27,812Then I'll click off.
    00:20:29,246And I'll make sure that I reset the Vertical Distortion
    00:20:31,539back down to zero, and now it's almost working.
    00:20:35,757If I adjust the Scale Height, you see that now
    00:20:37,601it's going left to right instead of up and down,
    00:20:40,222so that's good.
    00:20:41,326But when it's squished into the wall like this
    00:20:43,373it should be getting wider on the right side not the left.
    00:20:46,812So now I need to go into the Bend expression
    00:20:49,430and adjust my linear equation.
    00:20:51,930So instead of having an output on the Bend
    00:20:54,714from 50 to negative 50, I need to reverse that,
    00:20:58,153so negative 50 to 50.
    00:21:01,225And by the way, while we're adjusting this,
    00:21:03,066this range of 50 is just what I think looks nice,
    00:21:06,346but you can feel free to adjust these values
    00:21:08,228to make something unique.
    00:21:10,031Just make sure that these two values are proportional.
    00:21:12,613So if you set this to negative 75, this one should be 75.
    00:21:16,953But anyway for this we'll just put negative 50 to 50,
    00:21:19,819click off, and now that is warping in the right direction.
    00:21:24,893So I'll adjust the Scale Height
    00:21:26,159and we've got our squash and stretch off the right side.
    00:21:29,025I can set this back down to 100
    00:21:32,464and now all that's left is one for the left side.
    00:21:34,963So let me duplicate these two effects one more time.
    00:21:38,689Bring them to the bottom.
    00:21:40,135Change it to Warp Left
    00:21:44,269and Transform Left.
    00:21:48,282Double tap E.
    00:21:49,996Collapse all the effects I don't want.
    00:21:54,176And let's do this process one more time.
    00:21:55,893So I will first change right to left
    00:21:59,658on all of the expressions.
    00:22:08,828Then I'll move the anchor point for the Transform Left
    00:22:12,475to the left side of the layer.
    00:22:14,358And then I'll align this to the left side of the composition
    00:22:16,166just so it looks right.
    00:22:17,599And I'll adjust the Scale Height.
    00:22:20,547So the wide part again is going
    00:22:21,898on the wrong side of the layer,
    00:22:23,533so I need to add that inverse times negative one again
    00:22:27,770to the Horizontal Distortion, so times negative one.
    00:22:32,531Now the wide part is on the left side
    00:22:33,903of the layer where we need it.
    00:22:35,815And it's all working exactly the way it needs to now.
    00:22:39,269So I could easily animate this bouncing off the walls,
    00:22:42,696the ceiling and the ground.
    00:22:44,883Now all I have to do to get ready for animation
    00:22:46,766is a keyframe on the Scale Height property
    00:22:49,509for each one of these Transform effects.
    00:22:54,336And then I can press U on the keyboard
    00:22:56,134to bring up those keyframes.
    00:22:57,416And that's all I have to see
    00:22:58,522to be able to do squash and stretch
    00:23:00,324on any one of the sides of the layer.
    00:23:02,907So let me just put this back in the middle.
    00:23:04,463I'll reset this to 100.
    00:23:06,549And now I've got the bottom squash and stretch,
    00:23:09,456the top squash and stretch,
    00:23:11,749the right and the left.
    00:23:16,784Now that we've done all of that work,
    00:23:19,120we can easily apply this rig to any layer
    00:23:22,162by saving these effects as a preset.
    00:23:25,684So if I click on my layer and press E
    00:23:27,569to bring up all of the Effects,
    00:23:29,490I'll just select them all,
    00:23:32,237come over to my Effects & Presets,
    00:23:35,104click on this little drop-down menu
    00:23:36,619and say Save Animation Preset.
    00:23:39,796And I'll give it a name,
    00:23:41,097Squash&Stretch.
    00:23:44,048Hit Save.
    00:23:45,856After Effects will take a second to save that preset.
    00:23:47,998Refresh my list and now if I were to grab
    00:23:51,275say my little chiclet character.
    00:23:53,854I'll bring him out.
    00:23:55,492I can type in squash.
    00:23:57,451There's my preset.
    00:23:58,721I'll double-click to apply it.
    00:24:01,094Press U to bring up the keyframes.
    00:24:02,974All of those default keyframes I set are already there.
    00:24:05,894Everything is already set up except for the anchor points.
    00:24:09,621Now if we really wanted to dive deep into the expressions,
    00:24:11,666I could have set this up to automatically place
    00:24:13,891the anchor points to the top, bottom, left, and right
    00:24:17,375of the layer, but in this case
    00:24:20,653I have some room around my character,
    00:24:22,538so I don't actually want the anchor point
    00:24:24,343to be all the way down here.
    00:24:25,898I want it to be right here.
    00:24:27,212So for this specific rig,
    00:24:28,317I don't think using an expression
    00:24:29,750to snap those anchor points would be the best option.
    00:24:32,453Having the flexibility of adjusting
    00:24:34,007where your anchor point is, is a good thing
    00:24:36,094when doing this type of animation.
    00:24:37,849So I just need to set my anchor points
    00:24:40,554for each one of these effects.
    00:24:44,115And just like that, my squash and stretch rig
    00:24:47,799is completely set up for all sides of the layer.
    00:24:54,434And the Skew works exactly the same.
    00:24:57,750Again, basing it off of wherever the anchor point is
    00:25:00,372for that instance of the effect.
    00:25:02,788And this can work on any shape,
    00:25:04,262it doesn't have to be a square.
    00:25:05,611If I were to change this to be a circle
    00:25:08,069instead of a square,
    00:25:10,731the squash and stretch still works.
    00:25:13,271You can see that its warping the shape
    00:25:14,740in a more unique way
    00:25:15,846than if we were just using the Scale.
    00:25:17,482And to prove that, let me just turn off the Warp.
    00:25:20,387You can see that when this is squash and stretched
    00:25:22,230with just the scale, it looks fine
    00:25:24,747but it's kind of plain.
    00:25:26,228So adding this extra warp
    00:25:28,600that deforms the shape in a more unique way
    00:25:31,109can really be a nice touch,
    00:25:32,881adding some uniqueness to your deformations.
    00:25:35,909And that's it.
    00:25:37,014Now you can reuse this preset on any future projects,
    00:25:39,961never again having to think about setting up
    00:25:41,600squash and stretch, with some added controls,
    00:25:43,933which make creating this type of animation very streamlined.
    00:25:47,453(electronic background music) So there you have it,
    00:25:48,286a super simple method
    00:25:49,308for streamlining squash and stretch,
    00:25:51,314while adding another level of detail
    00:25:52,992to make the deformations more unique.
    00:25:55,406Putting all this work in up front,
    00:25:57,048allows us to cut out a long and painful
    00:25:59,179keyframing process for lots of future projects.
    00:26:02,322Thanks for watching.
    00:26:03,155I hope that this lesson is valuable to you
    00:26:04,778and that it's able to streamline your workflow
    00:26:06,455and improve the look of your animation.
    00:26:08,503We'd love to hear from you
    00:26:09,444if you use this technique on a project.
    00:26:11,369So tag us on Twitter @SchoolOfMotion
    00:26:13,296and show us your work.
    00:26:14,526And if you learned something valuable from this video,
    00:26:16,372please share it around.
    00:26:17,641It really helps us spread the word
    00:26:18,868about School of Motion, and we truly appreciate it.
    00:26:21,684And don't forget to sign up
    00:26:22,517for a free student account to access project files
    00:26:24,948from the lesson you just watched,
    00:26:26,135plus a whole bunch of other great stuff.
    00:26:28,388Thanks again and I'll see ya next time.
    00:26:33,210(upbeat drum music)

    Similar lessons