(trip hop music)
- [Evan] Hello, everyone.
This is Evan Abrams.
In this After Effects tutorial,
we're gonna play with physics now.
That's not just an awkward intro.
It's also very descriptive.
In this video, I'll be talking about
a new physics simulation
plugin for Adobe After Effects
called, oddly enough, Physics
Now!, exclamation point.
Typically on this channel,
you'll hear me say
we want to simplify and not simulate.
But sometimes we just have
to simulate something,
or it's significantly
more efficient to simulate
rather than fake
interactions and movements.
In this intro example you're looking at,
we've a little game of crokinole going on.
We very much could've keyframed
every bounce and bump.
We could manually make that happen.
But that would've taken way more time.
It was way more efficient
to actually run a simulation
of what's happening.
Now there are a few options
for bringing physics into After Effects.
And the creator of Physics Now!
has generously sent me
a license to play around
and show off what this thing can do.
If you like what you're
seeing, please use the link
in the description to go
purchase your own copy.
And a word of warning,
this video will feature
the use of this plugin a lot.
I'll also talk about the look
of the piece towards the end.
But if this isn't your
thing, I totally get it.
So with all that out of the
way, let's stop playing around
and get into some physics now.
(acid jazz music)
So here in After Effects, I
wanna show you really quickly
something that's way easier to simulate
than if you were to do it yourself.
Here we've really just set some keyframes
on the rotation of this square,
put a bunch of objects in it,
and then told the Physics Now! simulator
some things that are
true about the universe.
We tell it about the gravity.
We tell it about these shapes, how bouncy
or how much friction
these things should have.
And then it takes care of the rest.
If we were to try to do this
manually, way too much work.
But this simulations takes
mere minutes to make happen.
So that's just one example of
something that's easier to do
with simulating than
it would be faking it.
For our example project, I went ahead
and made a little crokinole board
and then fired these
crokinole pucks at each other.
All the various interactions
of these things,
of the pucks bouncing off of pegs,
bouncing off of each other,
would've taken way too many hours.
So that's why I chose to simulate it
rather than do it manually.
So let's get into it and
start simulating things.
I've already launched Physics Now!
which you can grab from
the extensions area
once you have it installed.
And it gives you this
lovely pallette of things.
These are the tools we're
gonna use to tell the simulator
what's going on.
We need to tell it things that
are true about this universe.
I've got all of these post layers.
These are all just circles
that have been arrayed
around in a circle.
I'm gonna make these static.
So when we talk about physics simulations,
a static object or a
static layer will not move,
but things can bounce into
it and bounce off of it.
So static, these are gonna be static.
Physics Now! has given them all an effect.
Says Static Settings, we
can deal with their dynamics
and their geometry.
Geometry is basically what
shape the physics simulation
is gonna use to stand in for this.
It could use a perfect circle.
If we put our resolution up high enough,
it would get pretty close.
But even a physics simulator
needs to start to simplify
a lot of things that are going into it.
That's why we have this resolution
that we can dial up and down.
The higher the resolution,
the longer and more accurate
the simulation will be.
And we can take our collision shape,
and right now we're using Auto,
meaning it's trying to
detect on this layer
what should be collided with,
in this case the circle shape,
or just the bounding box of the layer.
So you can do that as well.
For dynamics, we can say
how bouncy something is
when something bounces off of it.
If it's says zero, then
it's not bouncy at all.
If this is higher than one,
it'll actually give more energy
to the thing that bumps into it,
kind of like a pinball machine bumper.
Speaking of pinball, if
at the end of this video
you haven't had enough
learning about Physics Now!,
then check out Mikey Borup's video,
also about Physics Now!,
released last month.
Very good stuff.
You'll love it.
Now the other thing that
Physics Now! created
was this physics world control layer.
In here we get to tell the simulation
things that are true about the world.
That's things like gravity.
What direction is gravity going?
How accurate do we want
our simulation to be?
If you find things are
slipping through each other,
increase the accuracy.
If you find the simulation
is really chugging along
and taking a long time,
reduce the accuracy.
We can also add some world bounds.
Basically have things bounce off the edge
of our composition if we want.
For me the only thing I need to change
about this simulation is the gravity.
In this case we're
gonna be flinging pucks,
and we're looking at a top-down view.
So I don't actually need
a consistent gravity
to be applied to this stuff.
It doesn't need to be
dragging everything down or up
or in any direction.
We're gonna have to simulate friction
a little bit differently.
Because with gravity at
zero, things are gonna float
and rotate endlessly
without ever slowing down.
So let's put some pucks on here
and make the second
kind of physics object,
the dynamic object.
I've just double clicked
on the Ellipse tool,
and I'm gonna dial in
some 60 by 60 circles.
I'm gonna put this down
here to start with.
I'm gonna go ahead and make this dynamic.
I'm just gonna click here.
We have the geometry options.
Those are pretty much the same.
But the one thing I need to change here
is the linear and angular dampening.
If I flick this thing and
there's no linear dampening,
it'll just keep going forever.
Linear dampening will slow that down.
Let's go to a one.
Same thing for angular dampening.
If I give this a flick, and
it bumps into something,
it's start rotating, it'll
just rotate infinitely
at that speed forever.
So I need to dampen it.
With those dialed in I'm ready
to give this an initial push.
If we go here to the initial force,
I'm gonna use keyframes to power my shot.
So I'm gonna go in here,
hit P for position,
set a keyframe, move ahead say 20 frames,
drag this up to be pretty much on target.
I think that's a pretty good shot.
Now something to know about Physics Now!
is that the simulation will
start when the keyframes end.
The simulation will only
take over from this point.
I would actually like it to
take over from this point.
So I'm gonna set a keyframe
here and remove the later one.
I just wanna give this a push.
Then I want all of the
dampening, all of the bounciness,
everything, to kick in after
I've already given it that push.
I should be able to hit simulate.
This button here will start
the simulating calculation.
Boop.
And wouldn't you know it, there it goes.
So what's happening?
It's taken that positional
data and turned it
into internal data for this layer to use.
So when I hit Space Bar,
just play this ahead,
the push happens, then it slides, bounces.
Now I guess player two needs
to flick their puck in here
and see if they can do better.
One of the fun rules of crokinole
is that the second player
must make contact with an
existing opponent's disc
if they wanna keep their
pieces on the board.
So let's make one of those.
We're gonna go with a blue,
a nice blue color here.
Dial this down to 60.
I'm gonna move this layer ahead
so it only starts at four seconds.
Push it off to the side.
Call it p for position.
Set a keyframe, move ahead a little bit.
And we want it to knock
into this one here.
It's gonna try to split
the uprights, go through,
and give this a bump right there.
And I need the physics
simulation to take over
from this point.
So that will be the last keyframe.
Set one, delete one.
So it's gonna go there and continue on.
So we make dynamic.
Go to those dynamics, linear
and angular dampening.
And then simulate again.
This thing bounces off the peg,
then the second one.
Shoom, clunk.
Not a lot of juice on that.
We can actually go in here
and use this internal data
and pinch these together to
accelerate what's gonna happen.
Re-simulate.
It's gonna be firing
in quite a bit faster.
This one comes to rest.
(mimics blasting puck)
So now it's got a bit more juice on it.
We can keep cranking that up if we'd like.
Let's go real big on that.
Simulate this nice leisurely shot,
and then (mimics blasting puck).
Lots of bouncing and (chuckles)
almost on the button.
How about that?
But you can see now that
we've got this going
at an incredible speed, we
probably need to increase
the accuracy so that this
overlapping doesn't happen.
Then we'd wanna go into
our physics world setting,
increase the accuracy to some number,
and then try simulating again.
Because we don't really want
this overlapping stuff happening.
Now you can see after we've
increased that accuracy,
no more overlapping.
Pow!
They are bouncing right off of each other.
And it did take a little bit longer
for the calculation to happen.
But those are the forces
you're gonna have to play around with
as you start adding even more
elements to the simulation,
increasing the speed of things,
you'll need to dial in more
accuracy, maybe more resolution.
Who knows what your
simulation will require?
Now, there are a few more
buttons on our toolkit here.
If wanna remove something
from the simulation,
we can just select it,
then hit this button here,
which will remove its
attributes, its static settings,
its dynamic settings.
It'll no longer be part
of the calculation.
So we can hit that.
If we're not happy with the simulation,
we can press this button here,
and it'll remove the simulation
that we just made happen.
Another thing to know
about is that if I hit U,
which should bring up
all of the keyframes,
you'll notice, ah, there aren't many.
Pretty much all of the movement happening
being powered by keyframe data,
this being stored in the
position and rotation,
but it's being stored as
expressions rather than keyframes.
If you'd like access to the keyframes,
you'll wanna run your simulation
and have it spit out keyframes,
which is perfectly fine.
You can go back and edit
them all later if you'd like.
But those are the basics
of how we make use of
the Physics Now! plugin.
From those humble
beginnings, you could start
knocking things into other things
and really getting complex.
But at a certain point,
you're gonna need to apply
some style to beautify what you've done.
I highly recommend taking
care of your simulation
using basic shapes, basic
objects, basics hulls,
and then coming in and beautifying it.
If you look at our crokinole example,
you'll see we have a
bunch of layers going on,
lots of things, lots of stuff.
If you had to deal with
all of these layers
while you're working at the simulation,
it's not really a great way to go.
So for that reason, you
wanna simulate things
and then make them look beautiful.
How did we accomplish
some of the beautification
in this scene?
Well, if we go back to this basic example,
the first thing, we made these posts here
look a little three-dimensional.
We really made some
real fake 3D posts here,
which I did by simply
duplicating the existing posts,
putting them above everything,
removing their simulation tags.
So we can make that go away.
To make it look a little 3D,
I just went Layer, New, Null,
parent all these new post to that null,
and then, scaled up the null a little bit.
Just a little boop, just like that.
So just by scaling it up a little bit,
we get this little bit of
three-dimensionalness going on.
If you wanna tip our
view around a little bit,
you can start moving this around.
But really this fakes it
enough for my enjoyment.
You could go through here
and make all the layers 3D,
go into Cinema 4D, rendering
and extrude things.
If you wanna learn about that,
there are videos about
that on this channel.
You can definitely do that.
Because all of the positional
data is only happening
in a two-dimensional plane.
You could just extrude all of these things
using the Cinema 4D renderer if you wish.
The second thing to kind of
beautify these pieces was
I created a nice little wood texture.
This little grainy wood grain texture,
which I did by simply
making a composition,
throwing some solids in here,
and then getting a real
effect-sandwich going on.
I started with this white
solid, not much to it.
Then we threw a black
solid on top of that.
And really just keep them black and white
so it's clear to me which one is which.
Because on that black solid,
I drop this fractal noise.
The fractal noise is
just kind of scaled up.
Reduce the complexity.
You know, fractal noise
comes in looking like this,
but comes out looking like that.
After you've tweak the settings,
then add a little bit of noise.
HLS to this.
25% on the lightness just to
get this graininess going on.
Then we throw on some venetian blinds.
Because we're trying
to make a wood texture,
I need lines.
Because I'm gonna get some
lines and distort them.
Then we go into the Turbulent Displace,
and turbulent displace
gives us the waviness.
You'll need to dial in
your turbulent displace,
get it just how you like,
but 70, one, two, nine,
got me pretty close.
Then on top of all that, we
drop an adjustment layer,
which is bringing in a Gaussian blur
just to blur things out a wee bit.
Then a little curves adjustment
to make a little bit lighter
and a little more contrasted.
And finally some noise on top of that.
That's how I arrived at
this wood grain texture.
Now you wanna start applying
that texture to things.
So in our example here,
there are a few ways
you might make that happen.
You could simply bring your wood grain in,
and have it hang out below an object,
and use an alpha-matte of that object,
and now you've just kind
of cut out that texture,
and there it is.
It can hang out as you like right there,
which is okay.
That's a good move.
You can go ahead and apply
it to these puck layers
just by dragging the
wood grain texture in,
parenting it to one of those puck layers.
I'm holding down Shift when I parent
so that it moves the layer right to it.
Now you can see as that
layer is getting bounced
and rotated around, this
thing is spinning and rotating
and moving right in line with it.
Probably scale this down,
move it on over a little bit.
Now I only want the wood grain to show up
where that layer is.
So you could just apply a mask to it.
You could go ahead and again
use the alpha-matte situation.
The trouble is now I've
lost all of that coloring.
So what I would probably do is
turn back on that top layer,
and say, hey, I'm gonna
set you to Multiply.
Then we end up with
this nice kind of look.
We've got this red and
the wood grain going on.
That's happening.
But there are more advanced
ways you can make this happen.
Just stacks and stacks of things.
You could be drawing a whole other picture
or using a photo and
attaching it to this thing
once it's simulated.
Physics Now! can work
with any kind of layer,
but I highly recommend
doing your simulations
with simple objects just
so it makes sense visually
as you're working it up
and figuring things out.
Then you can worry about
textures and gradients
and making it beautiful after
it's moving the way you want.
But that brings us to the end
of this overview of Physics Now!
(trip hop music)
I'm Evan Abrams.
Thank you so much for watching.
If you enjoy this kind of thing,
please subscribe to this channel.
And check out the other
videos we have on here.
There's plenty to learn on here
about After Effects, motion
design, visual effects.
That's what we talk about.
And if you like learning about it,
subscribe and turn on notifications
so you know when videos happen.
If you have any questions
about physics simulations
in After Effects, please
let me know in the comments.
You have any questions about
motion design or After Effects
in general, let me know in the comments.
Or hit me up on Twitter.
I'm @ECAbrams on there.
If wanna get your hands on
a license of Physics Now!,
then please use the
link in the description,
and your old buddy, Evan,
gets a mild kickback for that.
And definitely check
out Mikey Borup's video
where he talks more about this plugin
and the interesting things it can do
and uses it in the more
traditional upright way.
Thanks again for watching,
and I'll see you around the internet.
