WEBVTT

00:04.730 --> 00:05.810
Hello everybody.

00:05.810 --> 00:10.070
By the end of this lecture I'm hoping that we're going to be able to create something like this where

00:10.070 --> 00:15.770
a bowling ball is going to be smashing into a ton of pins and doing a lot of the hard work for us using

00:15.770 --> 00:17.410
Blender's physics engine.

00:17.840 --> 00:21.490
Hey everybody I'm super excited to start playing with some physics.

00:21.560 --> 00:26.390
Now this is an insert lecture so I'm concerned you in from the future have come back and I thought you

00:26.390 --> 00:26.990
know what.

00:27.020 --> 00:29.510
We've got some bowling pins and a bowling ball.

00:29.510 --> 00:34.430
Why don't we just smash them together and try out the blender physics engine and see what we can do

00:34.430 --> 00:35.030
with that.

00:35.030 --> 00:39.780
Far more exciting than just looking at them and positioning them in a sort of a static manner.

00:39.980 --> 00:44.900
So first of all we need to go ahead and learn a little bit about the physics in order to do this I'm

00:44.900 --> 00:50.180
going to go and grab the pin that I've made earlier and will use that as a good starting point so let's

00:50.180 --> 00:52.820
go and open up your bowling pin.

00:52.820 --> 00:56.340
And here we go I've got my bowling pin here I'm going to switch to perspective mode.

00:56.360 --> 01:00.890
Now I'm going to send to my thrilly cursor I'm going to pop it in the middle of the scene by this couple

01:00.890 --> 01:07.250
of ways of course we can do this with a new shift an S and do the cursor to centre or we can go shift

01:07.250 --> 01:08.770
and see which is a really quick way.

01:08.780 --> 01:13.350
But it does move the cam your viewport around ever so slightly.

01:13.370 --> 01:19.310
Now we're missing a little bit of a screen that we're going to need some going to go down to the dividing

01:19.310 --> 01:23.390
Widget the splitter widget and make a new area underneath.

01:23.450 --> 01:27.450
And I'm going to change that to a type that is the time line.

01:27.530 --> 01:33.350
Now you may already have this on here as default is going to make my viewing area just a little bit

01:33.350 --> 01:35.930
bigger as well as make sure grab the right area.

01:35.930 --> 01:36.590
There we go.

01:36.770 --> 01:44.780
So this is a time line it's a 250 frames and our frame rate if we go over to the properties area and

01:44.780 --> 01:49.940
have a look at the little camera our frame rate is set at 24 frames per second so that's a little over

01:49.940 --> 01:51.180
10 seconds.

01:51.230 --> 01:55.080
Now at the moment we don't have much in our scene to interact with.

01:55.100 --> 01:58.520
So let's go ahead with the cursor the 3D cursor in the centre.

01:58.550 --> 02:02.650
I'm going to go ahead and add a plain scroll up here.

02:02.690 --> 02:05.740
And that plane is going to act like the ground.

02:06.190 --> 02:11.660
I'm going to scale that up and I'm going to call it the ground straightaway because I know sometimes

02:11.660 --> 02:14.760
I'm a bit naughty and I don't name things as quickly as I should do.

02:14.780 --> 02:18.920
So we've got the ground there that's something that the pin can knock against.

02:18.950 --> 02:24.590
Now what we can do there's a lot of in-depth stuff we can do with physics but for for this lecture let's

02:24.590 --> 02:26.810
just keep it nice and simple.

02:26.810 --> 02:32.810
And I'm going to use the tool shelf over on the left hand side and I'm going to go down to where it

02:32.810 --> 02:38.360
says physics on physics tab and I'm going to select everything in my scene.

02:38.360 --> 02:42.720
I'm going to hit the aiki twice and then select add active.

02:42.920 --> 02:49.040
Now there will be an error of error because it cannot add a rigid body to a non mesh object which is

02:49.040 --> 02:49.640
fine.

02:49.660 --> 02:52.900
It can't add that to the lamp to the camera etc..

02:52.910 --> 02:57.740
So let's ignore the fact that we've got that error there and just see what happens when we go ahead

02:57.740 --> 03:00.090
and hit the play button that's on the timeline.

03:01.040 --> 03:03.570
Hey everything's falling away into the distance.

03:03.650 --> 03:08.030
Now the problem there of course is if I mean it plate the camera around can probably still see it falling

03:08.030 --> 03:08.390
away.

03:08.390 --> 03:08.980
Yep.

03:09.350 --> 03:14.970
The problem of course with that is that the floor is falling away as well.

03:15.050 --> 03:17.900
And that's because we've added it as an active.

03:18.020 --> 03:24.800
So if I just pause that and set it back to the very beginning and I'm going to have to focus on my view

03:24.800 --> 03:29.230
again this move this around come back in there again.

03:29.390 --> 03:34.460
So what we need to do is set the floor because we don't want it to move but we still want it to interact

03:34.490 --> 03:35.580
with other objects.

03:35.660 --> 03:38.790
We want to say add passive.

03:38.910 --> 03:45.810
So now the floor is passive and the pin itself is active when we go ahead and press play.

03:46.140 --> 03:49.840
Okay the pin is just wobbling not doing anything else.

03:49.970 --> 03:51.320
So there are a couple of issues here.

03:51.320 --> 03:58.610
The first one is that the centre of mass that this pin is operating around is its origin.

03:58.880 --> 04:03.710
And obviously that would mean that it's very very bottom heavy at the moment we can see it just gently

04:03.710 --> 04:05.150
wobbling backwards and forwards.

04:05.270 --> 04:13.700
Now let's reset the scene back to frame one select tar pin lift it up slightly and rotate it and then

04:13.700 --> 04:14.930
press play.

04:14.930 --> 04:16.080
And let's see what happens.

04:16.100 --> 04:20.820
Okay so this does look like it's bottom heavy and that would be a really rubbish pin.

04:20.990 --> 04:26.270
So this is one of those cases where we've set the origin to the bottom of the object in order to work

04:26.270 --> 04:30.020
on it properly and have a bottom to the objects.

04:30.050 --> 04:35.540
But the downside to this is now it's centre of gravity is also at the bottom and we need to set the

04:35.600 --> 04:37.850
origin to the centre of gravity.

04:37.850 --> 04:41.760
Now there are a couple of ways of doing that but the easiest one is with the object selected.

04:41.840 --> 04:47.570
We go back over to the tools go to tools at the very top and go to set origin and that's enabling us

04:47.570 --> 04:52.920
to move this origin and we can set it to even the geometry that might work.

04:53.030 --> 04:57.340
The centre of mass by the surface area or the centre of mass by the volume.

04:57.340 --> 05:01.220
Now in this case I'm going to pick the volume and we can see it's moved our object.

05:01.250 --> 05:03.320
We're going to have to lift it back up.

05:03.320 --> 05:09.830
Now when we go ahead and drop it whilst it's Lent at a certain angle Oh make sure you start it from

05:09.830 --> 05:10.930
the very beginning.

05:11.070 --> 05:14.500
We can see there that it behaves much more naturally.

05:14.600 --> 05:20.430
If I put it a more extreme angle then we should see it fall over and rock appropriately.

05:20.570 --> 05:21.320
Excellent.

05:21.320 --> 05:22.720
So that's a great start.

05:22.730 --> 05:24.220
An introduction to the physics.

05:24.230 --> 05:28.910
Couple of other things that you might want to do and you do this over in the physics properties.

05:28.910 --> 05:30.570
Plenty to play with here.

05:30.830 --> 05:34.370
So we go over to the propertys area and all the way at the very end.

05:34.370 --> 05:38.440
There's something that looks like a little bouncing ball with a blue tail coming out of it.

05:38.450 --> 05:40.160
Those are your physics.

05:40.250 --> 05:46.610
And here we have a lot of options now in this particular case the ones that I would definitely play

05:46.610 --> 05:47.940
with are its mass.

05:48.080 --> 05:50.630
This is approximate mass in kilos.

05:50.700 --> 05:56.150
And if we scroll down further we've got its surface response how bouncy is what happens if we turn the

05:56.150 --> 05:57.710
bounciness up to one.

05:57.710 --> 06:03.110
I don't know I presume it's going to bounce more boin There we go it's bouncing and skipping across

06:03.110 --> 06:04.400
the surface a little more.

06:04.400 --> 06:11.330
So these are all things that you can play with and basically make it act like you want it to and it

06:11.330 --> 06:13.120
can be a bit fiddly sometimes.

06:13.180 --> 06:18.470
Of course if you set the friction down to zero guess what happens then is just going to kind of scoot

06:18.470 --> 06:19.090
across as well.

06:19.090 --> 06:21.540
It's given a completely different reaction this time.

06:21.740 --> 06:26.010
So there's lots to play with and each change you make will have a slightly different effect.

06:26.010 --> 06:29.900
Obviously if you put more objects in your scene that's going to make a difference.

06:29.930 --> 06:36.680
Now one of the things that is incredibly important is applying your transforms because if we've scaled

06:36.680 --> 06:41.870
this pin at any point in time but to reveal whether they did or not I can't remember then it will be

06:41.870 --> 06:48.680
behaving wrong because it will be behaving like the small or larger version of itself prior to being

06:48.680 --> 06:55.970
scaled so let's hit the end key and making sure that selected scroll up to the scale the scale is at

06:55.970 --> 06:56.480
once.

06:56.480 --> 06:59.680
That's absolutely fine if the scale was anything else.

06:59.720 --> 07:06.410
We did have some weird stuff happening with the physics and all you need to do to sort that out is control

07:06.410 --> 07:15.530
an A to apply and then scale and you can also get that from the object menu ply and then scale and it

07:15.530 --> 07:18.380
should set to 1 and that's incredibly important.

07:18.380 --> 07:21.250
And let's see if we can invoke that now by scaling it.

07:21.350 --> 07:25.100
So now it's this big is going to act as if it was the much smaller object.

07:25.100 --> 07:30.020
Now I don't know if that's going to cause us any issues let's lift it up out of the ground slightly

07:30.030 --> 07:33.230
turn it around and see how it acts now.

07:33.400 --> 07:37.280
Or you can see that didn't really act like the scale it's supposed to be.

07:37.280 --> 07:41.960
So if I go and apply that scale and then come back to very beginning.

07:41.960 --> 07:43.680
Now let's see what happens.

07:43.850 --> 07:48.800
Now it behaves more like a 1 kg object of this size.

07:48.800 --> 07:52.570
If we change the weight of it or hundred Let's see what happens then.

07:54.210 --> 07:59.040
Much more dead and reaction and a much larger object of course so play with that.

07:59.040 --> 07:59.870
We said it's a point.

07:59.880 --> 08:06.240
Ones are very light objects probably find it falls and bounces much more than it would have done before.

08:06.300 --> 08:09.670
Lots of things you can play with lots of exciting things to do.

08:09.870 --> 08:14.040
And of course along with that it's time for a little challenge.

08:15.180 --> 08:19.090
And your challenge is to go ahead and have some fun with physics.

08:19.140 --> 08:20.020
So don't worry.

08:20.040 --> 08:23.540
Later on in the course we will have a much more detailed look at the physics.

08:23.550 --> 08:28.920
I know after seeing this you're going to be really hungry for more of that physics engine.

08:28.920 --> 08:34.290
But later on when we look at destruction and blowing things up we'll take a closer look at the physics

08:34.290 --> 08:36.390
engine in much more detail.

08:36.510 --> 08:42.270
I'd like you to go ahead and make a bowling ball smash into a load of pins now in order to do that.

08:42.270 --> 08:48.030
I would suggest you make use of a ramp to have the bowling ball gather up as much speed as possible

08:48.330 --> 08:53.420
and you might have to make the bowling ball itself a little heavier than it is currently.

08:53.580 --> 08:57.380
So it has a bit more mass to push through those pins.

08:57.470 --> 08:59.740
Pause a video now and give that a go.

09:01.570 --> 09:02.800
Hello everybody welcome back.

09:02.800 --> 09:04.240
Did you have fun with physics.

09:04.240 --> 09:05.230
I certainly did.

09:05.230 --> 09:07.050
Let's go see what I got up to.

09:07.240 --> 09:13.450
Okay so now that our original bowling alley has got a few things flying here there are a couple of options

09:13.450 --> 09:14.310
of how we can approach.

09:14.320 --> 09:19.810
The first thing I'm going to do of course is name my bowling alley with an alley make sure that the

09:19.810 --> 09:21.540
ground is named appropriately.

09:21.580 --> 09:23.670
The pins are fine and we've got a bowling ball.

09:23.770 --> 09:30.130
Okay so I need to select everything in my scene and I'm going to go straightaway and add an active physics

09:30.130 --> 09:34.930
to it select my ground and add a passive rigid body to it.

09:34.930 --> 09:37.060
Let's just press play now and see what happens.

09:37.060 --> 09:44.060
Everything falls down and those those pins are not behaving as they should be.

09:44.080 --> 09:49.960
Some will select everything and I think I'm safe to do that yeah everything sir a regular shape and

09:50.060 --> 09:54.790
set the origin to the centre of mass by volume and then I'm going to press play again to see what's

09:54.790 --> 09:55.960
going to happen.

09:56.440 --> 09:59.340
Okay now for maximum carnage.

09:59.350 --> 10:06.040
I could pick up this ball and just starts knocking these things flying like so that's one option.

10:06.160 --> 10:11.400
But what happens if I stick a ball in the middle of a ton of pins.

10:11.410 --> 10:16.360
Now we've got a couple of pins falling over already now because these already have physics apply to

10:16.360 --> 10:19.990
them what I could do here is in orthographic meridan looking from the top.

10:19.990 --> 10:26.620
I used add a ton of of these pins and just see what happens.

10:26.620 --> 10:32.770
I'm hoping it would just knock a ton flying and hopefully all some of these are put inside themselves

10:32.770 --> 10:39.640
so I'm expecting them to freak out a little and send things absolutely crazy bullets to see what happens

10:39.640 --> 10:40.860
when I press play.

10:41.820 --> 10:42.730
Well they just kind of.

10:43.020 --> 10:49.350
Not one another over you know I'd be a bit more exciting if I was to rotate the ground ever so slightly

10:49.350 --> 10:49.920
like this.

10:49.920 --> 10:51.900
Everything falls over regardless.

10:54.950 --> 10:55.490
Are we not.

10:55.520 --> 10:57.260
You know what we could do here.

10:57.260 --> 10:58.980
If it works like that.

10:59.130 --> 11:02.070
A wonder of any of use you experimented like this.

11:02.210 --> 11:05.280
So if you rotate the ground everything will fall down that's great.

11:05.390 --> 11:12.770
But that's that's not that exciting but what we can do is we can duplicate the ground rotate it and

11:12.770 --> 11:16.310
actually have the bowling ball coming down that ground.

11:17.260 --> 11:19.720
And hitting and striking our pins this way.

11:19.720 --> 11:24.160
So let's make sure we're right at the beginning of our scene and I'm going to move my bowling ball.

11:24.160 --> 11:26.590
So it's going to fall onto that ground and roll down.

11:26.590 --> 11:28.360
How cool is that going to be.

11:28.390 --> 11:30.810
Now this is what I mean by experimentation.

11:31.060 --> 11:33.870
So the bowling balls coming down it's picking up speed.

11:33.880 --> 11:38.520
Obviously some of these are already knocked over and it didn't get very far.

11:38.530 --> 11:39.700
So what can we do here.

11:39.700 --> 11:47.290
Well it's probably still really really light so if I go into physics properties and change that's all.

11:47.610 --> 11:50.400
Let's set it as a as a whole ton.

11:50.440 --> 11:56.530
Hopefully that means it will just hit the floor pick up speed as it hits there and then it should start

11:56.530 --> 11:58.220
busting through everything.

11:58.330 --> 11:59.640
Perfect.

11:59.920 --> 12:00.230
Okay.

12:00.250 --> 12:06.410
The next thing I want to do is just stop these other ones from falling over straight away.

12:06.490 --> 12:10.290
So my gut reaction was to have them in there initially for a bit of fun.

12:10.690 --> 12:12.530
Let's just press play.

12:12.580 --> 12:15.450
K There are a couple of things that are falling over there.

12:16.720 --> 12:18.270
Let's go back to the beginning.

12:18.370 --> 12:21.480
It's that one there's pushing through so we can delete that.

12:21.730 --> 12:22.980
Let's just press play again.

12:22.990 --> 12:23.450
Yeah.

12:23.560 --> 12:27.510
There's a whole group of eight in the middle here that are pushing through one another.

12:27.700 --> 12:33.520
And that is because I put them next to one another when I started so if I move those ever so slightly

12:33.520 --> 12:36.440
to their impress play they're dropping down.

12:36.440 --> 12:37.290
We're all good.

12:37.290 --> 12:42.540
Well good Where's that ball and smash with a mega strike.

12:42.730 --> 12:48.190
Okay how did you guys get on did you experiment a little further and start adding in slopes and stuff

12:48.190 --> 12:50.580
like this to get the ball going really quickly.

12:50.620 --> 12:53.030
Do show me what experiments you came up with.

12:53.060 --> 12:54.390
I look forward to seeing them.

12:54.460 --> 12:57.140
And of course I will see you all in the next lecture.
