WEBVTT

00:00.850 --> 00:04.180
Welcome to the introduction to blender physics.

00:04.240 --> 00:05.860
So why use physics.

00:05.860 --> 00:11.620
Well it simulates the real world we live in a physical world where things fall over they bounce off

00:11.620 --> 00:17.570
of one another and we can use the physics engine in blender to simulate this.

00:17.570 --> 00:23.080
Now you can manually place every bit of destroyed or deformed geometry if you wanted to.

00:23.080 --> 00:28.730
And that's what this section is focussed on is the destruction and defamation of geometry.

00:28.760 --> 00:32.610
However you can also use the physics engine to animator with.

00:32.770 --> 00:39.040
So instead of animating a ball rolling down a surface or bouncing off of something you could use the

00:39.040 --> 00:41.830
physics engine to do that for you.

00:41.830 --> 00:48.850
Now it does enable you to create complex scenes easily and quickly so you can go down the route manually

00:48.870 --> 00:51.400
placing things and having that exact control.

00:51.460 --> 00:59.230
But if you were trying to simulate a wall falling over or perhaps some glass shattering you probably

00:59.230 --> 01:05.510
don't want to do that manually because it would be an absolute pain to do so.

01:05.620 --> 01:11.020
But if you fancy a challenge you can go half and through that I'm not going to because this is great

01:11.020 --> 01:11.820
for realism.

01:11.830 --> 01:16.360
As I've mentioned shattering glass falling towers you can even make some dominoes or something along

01:16.360 --> 01:18.400
those lines with it.

01:18.400 --> 01:23.670
Of course those things are quite complex so we're going to start with something simple.

01:23.750 --> 01:29.950
We're going to focus initially on rigid body physics what's rigid body physics will as the name suggests

01:30.220 --> 01:34.700
it simulates the physics of rigid or solid bodies.

01:34.720 --> 01:44.170
So if you imagine just hard surfaces said chairs tables glasses etc. they all come under that solid

01:44.170 --> 01:45.040
body.

01:45.430 --> 01:51.220
Now this works very closely with the animation system as I've been alluding to it.

01:51.340 --> 01:57.040
You can simulate a ball rolling down a hill or two objects bouncing off of one another and it works

01:57.100 --> 02:00.130
in conjunction with the animation system rather seamlessly.

02:00.130 --> 02:05.930
Some of the other physics simulations don't work so well with the animation system.

02:07.090 --> 02:10.370
Now it's all move and rotate objects.

02:10.390 --> 02:15.910
That's important so it was going to translate them and rotate them as they fall through the air or as

02:15.910 --> 02:17.590
they break apart.

02:17.590 --> 02:20.300
Now what it won't do is deform them.

02:20.800 --> 02:23.370
Okay so now we've got that under our belts.

02:23.470 --> 02:27.990
Let's go play with rigid body physics and hop on over in a blender.

02:28.870 --> 02:32.360
Okay so over in blender and I'm going to do a couple of things.

02:32.380 --> 02:35.200
I'm going to just save a default layout.

02:35.200 --> 02:39.390
I'm going to keep it almost like the fault lay out when you first open blender.

02:39.390 --> 02:44.110
However I'm going to set the end frame at 50 for the moment.

02:44.110 --> 02:48.310
I've got a feeling I'm going to set this up several times so I'm literally going to save the starter

02:48.310 --> 02:49.950
file as it is there.

02:50.000 --> 02:50.850
Perfect.

02:50.890 --> 02:54.490
So don't open up the tool shelf here and select my cube.

02:54.490 --> 03:01.150
Now there are a couple of ways of adding a rigid body physics to a any mesh object in blender.

03:01.150 --> 03:07.630
So there is a physics tab it's quite hard to redev when it's all squished up but it's just there and

03:07.630 --> 03:08.560
want something selected.

03:08.560 --> 03:11.990
We have two options to add active and add passive.

03:12.160 --> 03:15.800
Now you can also do that on the properties window itself.

03:15.820 --> 03:21.970
There's a little bouncy ball icon and we've got rigid body and when you click that's there.

03:21.970 --> 03:24.820
By default you'll get an active object.

03:24.820 --> 03:25.690
Now what does that do.

03:25.690 --> 03:29.460
Well let's go ahead and press play now or use a shortcut.

03:29.530 --> 03:29.840
Oh.

03:29.880 --> 03:32.590
In a way we can see that it falls away.

03:32.680 --> 03:38.370
And 50 frames seems to be a good loop point because it's disappeared from the screen.

03:38.370 --> 03:45.700
Now if this was active it means that it is being controlled by the physics engine.

03:45.700 --> 03:50.720
If it's passive It means it's not but will still interact with other Richard bodies.

03:53.500 --> 03:57.500
So if we set this now to passive we can see it just sits there.

03:57.640 --> 04:00.130
However if we put another cube into the scene.

04:00.130 --> 04:00.930
Well let's do that.

04:00.940 --> 04:02.940
Let's and Jube jubilate This cube.

04:02.950 --> 04:05.370
And I'm just going to move up on the.

04:06.490 --> 04:13.590
Z axis there and then move it across just a little on the X and make that want active.

04:13.810 --> 04:15.420
Okay let's see what happens.

04:15.430 --> 04:18.550
There we go it falls off into oblivion.

04:18.730 --> 04:23.200
So that's quite useful and in fact here I'm looking a set that a little longer since now it's falling

04:23.200 --> 04:24.630
for longer.

04:24.640 --> 04:25.470
There we go.

04:25.600 --> 04:31.310
So with 75 frames there we seem to get quite a fall animation we can see it disappearing.

04:31.630 --> 04:33.580
So what are the other options.

04:33.580 --> 04:38.020
Because in general it's great to just hit add active or add passive.

04:38.020 --> 04:41.520
But in general we're going to want to have a bit more detail.

04:41.710 --> 04:46.350
So over in the properties panel itself we've got some options now.

04:46.420 --> 04:53.840
Active and passive are here animated is very useful because it enables us to use the animation system

04:53.870 --> 04:59.190
a key the movements in and then let's blend of physics take over later on.

04:59.290 --> 05:04.060
We won't do that at the moment but we can do that later on the mass.

05:04.060 --> 05:09.390
Now the mass itself is pretty self-explanatory it's the weight of our object.

05:09.400 --> 05:17.160
Now this is in kilograms and that is a was that's a two by two metre cube essentially weighing one kilograms

05:17.160 --> 05:21.610
so it's going to act like a 1 kilogram two meter cube.

05:21.610 --> 05:28.720
However if that weighed 10 kilos it would act slightly differently as you can see it's not sort of bouncing

05:28.720 --> 05:30.650
off as far as it would do before.

05:30.760 --> 05:37.330
And if we set that as a very lights one we can see it behaves differently as well so we can change the

05:37.330 --> 05:39.010
mass of our objects.

05:39.010 --> 05:44.750
Now one thing to bear in mind is if you haven't set the scale correctly.

05:44.770 --> 05:49.100
So let's bring out the properties window here.

05:49.180 --> 05:54.270
So we've got a scale here of 1 1 1 and on here of 1 1 1 which is absolutely fine.

05:54.280 --> 05:58.830
However if we scale something up an unfit flies there.

05:59.140 --> 06:04.210
If we scale something up like that we we see that it's going to act slightly differently.

06:04.210 --> 06:09.940
In fact in this case because we scaled it and moved it whilst the physics engine was running it's not

06:09.940 --> 06:12.550
like that at all so let's just put it slightly above.

06:12.790 --> 06:20.410
So this is going to act differently because it's bigger but it will still act as if it was a smaller

06:20.410 --> 06:21.400
cube.

06:21.400 --> 06:28.630
So what we'd need to do in this case is make sure we apply with control a or go into object and apply

06:28.750 --> 06:38.050
the actual scale and then it should be hafe like an appropriately sized cube that weighs 10 kilos that

06:38.050 --> 06:44.950
can be very odd to get your head round at first but it does mean that the physics will act more realistically.

06:44.950 --> 06:51.010
Of course if the desired result you want is a little bit unrealistic then you can do that so that's

06:51.010 --> 06:52.950
absolutely fine.

06:52.990 --> 06:58.840
Now rigid body collisions the next area down we've got a convex hull and the meshes self.

06:58.840 --> 07:04.960
In general I wouldn't bother picking any of the others for the moment because it does change how things

07:04.960 --> 07:05.750
behave.

07:05.770 --> 07:10.240
So if I selected sphere this will act more like a ball.

07:10.270 --> 07:16.000
And as you can see let's zoom in here so we can see it is actually intersecting and that's because instead

07:16.000 --> 07:23.290
of using the outside faces of our mesh as basically where it's bumping into it's put a sphere inside

07:23.290 --> 07:24.050
our model.

07:24.050 --> 07:29.410
Now there may be reasons why you want that so either no to make a cube roll.

07:29.440 --> 07:35.260
But so if we were doing that we could go down to the next area and go to collision margin put that on

07:35.680 --> 07:36.910
and then increase it.

07:36.910 --> 07:42.000
Now we set that top one and see what happens it will work.

07:42.070 --> 07:44.380
It hasn't seemed to do much in this case.

07:44.380 --> 07:46.200
I'm guessing it's still going inside the model.

07:46.330 --> 07:53.410
Let's send it back to Convex Hull and let the simulation run and we can see there's a one blend the

07:53.410 --> 07:54.670
unique gap.

07:54.940 --> 07:57.690
It's literally hitting it a blender unit away.

07:58.620 --> 08:00.120
So this can be useful.

08:00.120 --> 08:01.780
I would not set it to zero.

08:01.860 --> 08:09.300
But if you're having objects passing through one another the small small at that it was at before the

08:09.300 --> 08:14.460
point 0 4 is usually more than enough to prevent it passing through.

08:14.460 --> 08:20.520
Now friction is as we can gather is that how friction is the surface of that is.

08:20.520 --> 08:25.800
So it was set down to zero it would have no friction and freely scoots across a lot of surfaces.

08:25.890 --> 08:31.980
And if it was one it would really grip onto any surface it comes into contact with bounciness of course

08:32.040 --> 08:35.110
is how bouncy an object is.

08:35.120 --> 08:40.710
And we might not see in this particular simulation perhaps a ball bouncing on the ground would be a

08:40.710 --> 08:46.710
better object bearer example of something as bouncy or indeed something that's got zero friction and

08:46.710 --> 08:47.520
high bouncing us.

08:47.520 --> 08:47.910
There we go.

08:47.910 --> 08:52.460
We can see that was skipping over the surface really quickly and bouncing away.

08:53.120 --> 08:53.540
Brilliant.

08:53.570 --> 08:54.190
Okay.

08:54.260 --> 08:59.520
So there's rigid body dynamics down here at the moment we won't go into that just at the moment.

08:59.660 --> 09:06.380
But you can literally deactivate something until something else comes into contact with it.

09:06.380 --> 09:11.400
If you wanted to and well since we're here let's do it anyway dampening.

09:11.480 --> 09:18.230
Well we can dampen its movement or its rotation so we can say here that it's resistant to rotation.

09:18.230 --> 09:21.920
Then when it hits Oh that is just really odd.

09:21.920 --> 09:23.030
Was that what we intended.

09:23.030 --> 09:25.810
Well maybe not let's turn it down a little.

09:25.850 --> 09:31.520
So something is irritating a little too quickly after it's hit we can dampen that rotation and translation

09:31.520 --> 09:32.990
is exactly the same.

09:33.100 --> 09:40.800
At one you can see that well it's kind of like it's falling through goo rather than falling free.

09:40.890 --> 09:43.160
Is she not getting through.

09:43.160 --> 09:49.460
But if we lower that we can make the whole thing just a little bit more controlled rather than bouncing

09:49.460 --> 09:50.440
all over the place.

09:50.570 --> 09:56.870
So you can play with these to your heart's content of course to get some an effect or a simulation that

09:56.870 --> 09:57.880
you desire.

09:58.710 --> 10:01.840
And of course that is up to a challenge.

10:02.220 --> 10:06.690
I would like you to go ahead and create a short physics simulation.

10:06.690 --> 10:14.700
So create a simple scene using basic meshes gennari a physics simulation with some interactions so things

10:14.700 --> 10:21.110
are hitting one and over and use both passive and active rigid bodies.

10:21.880 --> 10:24.220
Pause video now and give That's a go.

10:26.930 --> 10:28.080
Okay guys welcome back.

10:28.100 --> 10:31.090
Let's go create a short physics simulation.

10:33.550 --> 10:39.780
Okay so I've started off in a default scene here and I'm going to really icky but I don't want a cube.

10:39.790 --> 10:41.220
I want a plane.

10:41.230 --> 10:43.330
I'm going to scale up the plane.

10:43.570 --> 10:48.370
Not pushing it through itself too about that and I'm going to tilt it so slightly down here so I'm going

10:48.370 --> 10:52.050
to rotate on the x direction and then just do that.

10:52.060 --> 10:55.390
So whatever lands on here should then slide down.

10:55.390 --> 11:00.990
So let's go ahead and add something to land on it's going to add in a U.S. sphere and then we use it

11:00.990 --> 11:05.610
as a ball and pop it in here and just see what happens.

11:05.620 --> 11:10.090
Now of course we've not applied any physics yet so what do we need we need on here.

11:10.090 --> 11:13.690
This is going to stay still so we need to add a rigid bullet to both of these.

11:13.840 --> 11:18.110
And of course if we decide to play at the moment they both fall away.

11:18.340 --> 11:22.820
So what I'm ONLY to do is make the ground itself passive.

11:23.170 --> 11:26.500
And then the ball should hit the ground and roll.

11:26.950 --> 11:27.660
Excellent.

11:27.670 --> 11:33.830
Now looks like in this case we're going to need slightly more frame someone to go up to 200 here.

11:33.850 --> 11:35.800
That should give us plenty to see what happens.

11:35.800 --> 11:37.670
It should accelerate down here.

11:38.390 --> 11:39.230
Perfect.

11:39.260 --> 11:39.860
Okay.

11:39.960 --> 11:44.560
So now that we've done that let's play with some of the settings and see what happens.

11:44.570 --> 11:52.370
So both of these have a friction point five which is resistance to moving and about in this syrup.

11:52.370 --> 11:56.290
So what happens if we set the ground with a bounciness of 1.

11:56.420 --> 12:00.510
Extremes are a great way of testing things doesn't do anything.

12:00.530 --> 12:04.720
Okay so what happens if we set both of them to a bounciness of 1.

12:05.590 --> 12:07.540
I'm guessing it's going to bounce x.

12:07.570 --> 12:11.000
So there we go there's a bouncing ball going down the hill.

12:11.770 --> 12:13.260
Let's set this to zero.

12:13.270 --> 12:15.640
And I'm guessing it won't bounce.

12:15.760 --> 12:21.220
Okay so this is a great example of experimentation and working out the bounciness.

12:21.250 --> 12:26.800
If both of one or more of the items have anything with zero in them especially the floor if you've got

12:26.800 --> 12:30.190
more than one item then it's not going to really work.

12:30.190 --> 12:38.140
However what this could both do for us is if we go back to the BE IN of the animation and let's say

12:38.310 --> 12:45.760
let's go from a top few here and let's duplicate this a couple of times before it hit the right key.

12:45.760 --> 12:47.220
So there we go.

12:50.010 --> 12:51.130
So you got plenty there.

12:51.210 --> 12:57.540
Now if they impact one out of it because they of course they won't impact each other down a straight

12:57.540 --> 12:58.440
slope like that.

12:58.450 --> 13:00.780
They'll just race one another into oblivion.

13:00.840 --> 13:07.470
Bought we can do here is well let's subdivide our plane and give it some substance really under we go

13:07.470 --> 13:12.780
for a simple subdivision and I'm going to apply that subdivision Locanda in edit mode.

13:12.780 --> 13:13.420
There we go.

13:13.650 --> 13:15.640
So now we've got something to play with.

13:15.660 --> 13:21.930
I can pull up some geometry for it to for them to bounce off of.

13:22.380 --> 13:26.760
Because they won't bounce off of it till we're actually in object mode.

13:28.570 --> 13:34.420
Okay so we're letting them roll down and we can see that the bullet Oh things are falling through the

13:34.420 --> 13:35.070
floor.

13:36.240 --> 13:37.540
Let's just let it settle.

13:37.740 --> 13:40.320
Let's redo the animation.

13:41.660 --> 13:43.670
Well I wasn't expecting that.

13:43.740 --> 13:46.490
I'm going to add modify and add.

13:47.470 --> 13:51.940
A subdivision is surfacing just to smooth those out ever so slightly.

13:54.100 --> 13:56.070
Let's see if that's made any difference.

13:56.100 --> 14:00.650
Okay so these balls are now passing through the surface of our model.

14:00.750 --> 14:07.890
Now that would suggest that it's not having time to calculate the impact that these balls are having

14:07.900 --> 14:10.270
or literally they're passing through the surface.

14:10.290 --> 14:16.650
I'll make sure that's let's say the mesh itself rather than a convex whole let's see if that makes a

14:16.650 --> 14:17.100
difference.

14:17.100 --> 14:18.580
This resets and plate.

14:18.590 --> 14:20.240
Yes it does make a difference.

14:20.280 --> 14:23.800
Now will these balls collide with one another kind of.

14:23.820 --> 14:25.400
But they're not bouncing off of one of.

14:25.410 --> 14:31.580
So let's give the ground a bit of bounciness and the balls will maybe be a bit more interesting.

14:34.320 --> 14:40.290
And again this is one of these things that you can play with to your heart's content until you get it

14:40.560 --> 14:42.170
how you want it to be.

14:42.180 --> 14:48.150
Now the margin here might help if he probably does now that these aren't falling through.

14:48.150 --> 14:50.180
That's one of the differences here.

14:50.220 --> 14:55.760
The convects hole the coalition margin if it's not there allows them to fall through.

14:56.010 --> 15:01.320
So I see examples of that actually work in action so we can move it's convex whole and we can see they're

15:01.320 --> 15:05.500
hitting one another and they have got a bounciness of one.

15:05.730 --> 15:10.740
Let's give them let's make them frictionless or make this one frictionless and see what happens.

15:10.980 --> 15:14.520
So that's just sliding and pushing the other one down.

15:14.930 --> 15:21.030
So because it's got no friction it's not rotating so we can add in a tiny bit of friction because that

15:21.300 --> 15:23.280
ruins are a physics model.

15:23.280 --> 15:28.620
So we've got to start from the beginning again and that's because some friction it should grip.

15:28.620 --> 15:30.940
There we go and rotates.

15:30.990 --> 15:33.450
I don't think I've got enough things that for it to bump into.

15:33.450 --> 15:39.900
But by now you should have got the gist of your marble run or whatever you guys have created and do

15:39.900 --> 15:43.740
remember to show your work in the discussions over the forum.

15:43.740 --> 15:48.310
Love to see what you guys come up with some simple physics in blender.

15:48.630 --> 15:52.120
And as always I will see you guys in the next lecture.
