WEBVTT

00:01.010 --> 00:03.640
Welcome to the centre of mass.

00:03.650 --> 00:07.130
So where is the centre of mass and what is it.

00:07.130 --> 00:09.680
Well it is where ever the origin is.

00:09.680 --> 00:14.220
Blender uses the origin as the centre of mass.

00:14.270 --> 00:19.330
Now that means you have control over all over this which isn't always a good thing.

00:19.490 --> 00:25.250
If you've inadvertently constructed something away from the genome bit from the origin itself that geometry

00:25.250 --> 00:27.230
is going to act very weird.

00:27.500 --> 00:32.540
When you start applying physics to it so it can lead to some strange results.

00:32.540 --> 00:37.920
Now they might be desirable depending on the type of thing that you're doing.

00:38.090 --> 00:44.390
Now blender can calculate for us the centre of the mass and you've probably seen this before when we

00:44.390 --> 00:46.670
move the origin to the centre of mass.

00:46.670 --> 00:52.310
Now in most object that's going to pretty much put it in the middle unless you've got a lopsided object

00:52.340 --> 01:00.190
in which case you'd want to adjust the centre of mass so it behaved realistically when it comes to physics.

01:00.200 --> 01:05.640
Now let's go ahead and hop on over into blender and play with the Centre of Mass.

01:06.410 --> 01:08.240
Hey so welcome over into blender.

01:08.260 --> 01:14.570
Now at this point we're going to focus on something very similar to the wall you saw that the tank was

01:14.570 --> 01:15.940
breaking through earlier.

01:16.100 --> 01:19.290
But we're going to build it up from scratch.

01:19.340 --> 01:22.090
So in order to do that we're going to use a raise.

01:22.130 --> 01:28.040
So my first mini challenge for you is to pause a video and go ahead and make a wall.

01:28.070 --> 01:32.290
This isn't going to be one of those major challenges but this is a mini mini challenge.

01:32.360 --> 01:38.270
Challenge yourself to build a wall made of standard size bricks if you will or a pretty standard ratio

01:38.270 --> 01:41.910
of bricks you don't have to worry too much about the size at the moment.

01:41.930 --> 01:45.170
So go ahead pause video now and give that a quick go.

01:48.010 --> 01:50.290
Okay now did you give that challenge a go.

01:50.280 --> 01:52.710
It's very important to practice your skills.

01:52.840 --> 01:56.910
Now I'm going to go ahead and I'm going to build up my wall super quick here.

01:56.920 --> 02:04.390
I'm literally going to scale in the y direction my break by half and scale it's in the z direction by

02:04.390 --> 02:05.140
half.

02:05.140 --> 02:10.930
I'm going to go to the control not the control panel sorry the Properties window for the 3D editor and

02:10.930 --> 02:13.070
shift it up by point five.

02:13.150 --> 02:14.470
So I've got my brick here.

02:14.470 --> 02:18.180
Finally I'm going to apply scale now because we're working with physics.

02:18.220 --> 02:21.850
It's good if things are the right size from the beginning.

02:21.850 --> 02:27.580
Now I'm going to shift this across a little over here and I'm going to add a ground plane in and whilst

02:27.580 --> 02:28.550
I'm at it.

02:28.720 --> 02:33.100
And you might not have done this because I didn't ask you to create a black a ground plane that's absolutely

02:33.100 --> 02:35.770
fine you can pop one in now is your following along.

02:35.830 --> 02:41.440
I've added a ground plane I'm going to make sure I start saving my work and can as save as wall because

02:41.440 --> 02:45.210
we're going to start applying physics and physics can crash blender occasionally.

02:45.230 --> 02:51.570
Now whilst I've actually got selected I'm going to go ahead and apply the scale that I've just bumped

02:51.640 --> 02:58.060
that floor up to four and whilst I'm here I'm also going to apply a rigid body and make it passive because

02:58.060 --> 02:59.990
the wall needs somewhere to stand.

03:00.060 --> 03:06.020
Now with the array itself I'm going to use 10 bricks and then build it up from there.

03:06.020 --> 03:12.600
So let's go ahead and add an array and if I'm happy with how it looks let's go to 10 of them.

03:12.910 --> 03:15.560
Okay let's shift over here a little so it's more in the middle.

03:15.610 --> 03:16.900
Excellent I'm happy with that.

03:16.930 --> 03:22.240
Apart from the gap in between I'm going to go for one point one nine bit big so I'm going to go for

03:22.240 --> 03:23.710
one point not five.

03:23.890 --> 03:25.010
That looks much better.

03:25.130 --> 03:32.050
Okay so that's my first array am now going to a race a race so relative offset I'm going to say that's

03:32.050 --> 03:37.090
a zero for the moment and says Z to one and I'm going to just going to zoom in here so I can see the

03:37.090 --> 03:42.290
relative gaps now because my brick is half as high as it is wide.

03:42.400 --> 03:48.500
I should imagine that the relative offset here if we said it's a point 0 5 like the other one we are

03:48.510 --> 03:54.010
going to end up with a gap that's half the size which has happened so by go one point one.

03:54.400 --> 03:59.730
We've then got a nice gap between here let's say for the mortar or anything along those lines.

03:59.860 --> 04:01.880
And it's a good idea to keep an idea.

04:02.080 --> 04:08.230
Or it's certainly an eye on these numbers that we've used because we're going to use them in a bit for

04:08.230 --> 04:10.120
the margins for physics.

04:10.210 --> 04:16.900
Okay so now I have done that I just need the offset in the x direction by wellpoint one would be one

04:16.910 --> 04:22.530
brick because there are 10 bricks so I won half a point once again open in 0 5.

04:22.690 --> 04:29.020
Okay so that's the first stage and the second stage of the wall down and now it should be a matter of

04:29.320 --> 04:32.740
just offsetting in the z direction going up.

04:32.740 --> 04:34.360
Now that is too big.

04:34.360 --> 04:38.420
So that again that's point nor a one point not 5.

04:39.690 --> 04:40.230
Excellent.

04:40.230 --> 04:47.420
In fact if we go to prospective mode we can see it from the side and that looks even which is nice.

04:47.430 --> 04:53.700
So orthographic MO go from perspective mode and we can use a couple and make it super high.

04:53.700 --> 04:56.370
We wanted so that's fine with me.

04:56.370 --> 05:00.480
In fact we could link this together and build a building but I'm going to leave it as a wall for the

05:00.480 --> 05:01.110
moment.

05:01.110 --> 05:06.930
Now looking at that the ground is far too small some deerskin to scale it up a little bit more and apply

05:06.930 --> 05:07.840
that scale.

05:08.010 --> 05:13.590
Okay so now we've got this wall on this ground.

05:13.590 --> 05:15.780
We've got a basis to work from there.

05:15.780 --> 05:21.630
If I go ahead and apply physics to this whole wall you probably guessed the ball was going to move as

05:21.630 --> 05:24.870
one object with its centre of mass.

05:24.870 --> 05:30.810
Interestingly enough all the way over here so that's not where the centre of mass of this would be at

05:30.810 --> 05:33.430
all it would be somewhere in the middle of the wall.

05:33.540 --> 05:38.160
And if we go ahead and run the physics engine it just wobbles because already sat on the ground.

05:38.340 --> 05:45.690
If we were to just let's say for argument's sake lift the wall up so it was up here and then dropped

05:45.690 --> 05:53.570
it onto the ground rules see that again you saw there it twinged or twinged around that centre there

05:53.580 --> 05:54.510
so that's wrong.

05:54.540 --> 05:55.740
That's just wrong.

05:55.740 --> 05:57.620
It's not going to work like that in real life.

05:57.660 --> 06:00.570
So we need to separate out all these bricks.

06:00.630 --> 06:07.850
Now it is important at this point to remove the physics from the break itself.

06:07.980 --> 06:14.460
Otherwise when you try and move the origin and stop that from bouncing around if you try when we go

06:14.460 --> 06:20.880
to if we scroll down here and set the origin to the centre of mass Well it's not going to work is all

06:20.880 --> 06:21.870
based around here.

06:21.870 --> 06:26.190
And of course at the moment we still got all the array modifiers UN applied.

06:26.340 --> 06:29.950
Now remember to turn this off some going to do that now.

06:29.960 --> 06:33.220
And I'm also going to save my work that is always important.

06:33.230 --> 06:40.070
If I use the right shortcut keys ever get up save my work and I'm ready to do a challenge.

06:40.110 --> 06:45.330
But before we get on to that challenge I just want to run through with you really quickly a small change

06:45.330 --> 06:47.880
that's happened since this video's been recorded.

06:47.910 --> 06:49.920
Has it jumped forward now to two point seven.

06:49.950 --> 06:52.530
This is the end state of what you'll be going for.

06:52.560 --> 06:57.570
And of course when we go ahead and set the origin we have a few different options.

06:57.690 --> 07:04.650
We've got set the origin to the centre of mass by the surface or by the volume.

07:04.660 --> 07:10.250
Now in general unless you've got a reason to do so I would recommend using the volume itself.

07:10.410 --> 07:11.100
So there we go.

07:11.100 --> 07:17.830
And in this case because they are cuboid us it's going to be the same no matter which one you pick anyway.

07:17.880 --> 07:20.410
But just to say there's two separate options there.

07:20.460 --> 07:24.550
In general I would pick volume unless you've got a reason to pick surface.

07:24.610 --> 07:27.070
Now here comes your challenge.

07:27.120 --> 07:32.070
I would like you to go ahead and create a physically stable wall so.

07:32.100 --> 07:36.640
So basically one doesn't fall over or explode on us one not yet anyway.

07:36.690 --> 07:42.140
So all bricks should be individual so they can be acted upon individually.

07:42.630 --> 07:49.410
Now move the centre of mass for each brick to the right location at the moment is all focussed around

07:49.410 --> 07:53.850
that original brick and that's going to end well that's going to cause some interesting results and

07:53.850 --> 07:57.830
we'll certainly throw the bricks around something crazy.

07:57.900 --> 08:03.050
If he had chaske leave it where it is you might want to just try where it is currently.

08:03.050 --> 08:04.660
Just to see the effects.

08:04.770 --> 08:12.090
If you want to take it so they should rest on some invisible mortar or gap that matches the existing

08:12.090 --> 08:12.720
gap.

08:12.780 --> 08:20.400
So when you add the rigid body to the actual bricks themselves remember to include a margin so that

08:20.400 --> 08:23.620
the bricks essentially float on top of one another.

08:23.700 --> 08:30.330
But that is to imitate more to being in between them so they're slightly separated.

08:30.450 --> 08:34.110
Now make all the bricks have the same physical properties.

08:34.230 --> 08:39.270
And remember you can do that in one fell swoop rather than doing it individually.

08:39.270 --> 08:44.760
If you start playing about with bricks and given them slightly different properties that's fine.

08:44.760 --> 08:50.230
That could add to the realism of a scene but it be good to have a starting point where they're all identical.

08:50.250 --> 08:54.370
There may be some instances where you'd want to change that but not in this case.

08:54.390 --> 08:57.470
So go ahead post a video now and give that a go.

08:59.830 --> 09:00.910
Okay guys welcome back.

09:00.910 --> 09:04.470
Let's go ahead and create a physically stable wall.

09:05.400 --> 09:09.300
Okay so we left off over here with our wall as individual items.

09:09.300 --> 09:11.670
Now I'm going to go ahead straightaway and hop into edit mode.

09:11.670 --> 09:13.700
And of course we've got all of these bricks.

09:13.830 --> 09:15.780
Well no actually we can't do that.

09:15.870 --> 09:17.150
I'm getting ahead of myself.

09:17.160 --> 09:19.440
You see because they aren't individual bricks.

09:19.440 --> 09:24.090
They're in a ray at the moment all silly me.

09:24.090 --> 09:28.230
I'm applying my array in the wrong order so apply from the bottom up.

09:29.240 --> 09:30.740
We go and the final array.

09:30.740 --> 09:37.430
Okay so now when we go into edit mode there we go we've got all individual bricks now let's go ahead

09:37.490 --> 09:44.520
and separate them by loose parts because they're not connected anywhere at all.

09:44.540 --> 09:47.670
We can just literally separate them apart.

09:47.720 --> 09:53.210
Now that we've done that we can well literally apply physics to them.

09:53.210 --> 09:57.590
So in order to do that there are a couple of things that I'm going to do to make my life easier so I

09:57.590 --> 10:03.080
can select them all every time is I'm going to turn off selection for the camera and I'm going to turn

10:03.080 --> 10:07.960
off selection for these these items here just in case I managed to select them.

10:07.960 --> 10:12.840
The lamp as well and the playing I don't want to be selecting the floor and changing its properties.

10:12.860 --> 10:20.270
Now whenever I select all I should be selecting in object mode I'll be selecting only these mesh objects

10:20.270 --> 10:21.640
themselves and nothing else.

10:21.650 --> 10:25.530
Literally nothing else in the sinkers and nothing else selectable ho case.

10:25.530 --> 10:30.180
Now we've done that we've got all of these bricks selected and an active selected brick.

10:30.290 --> 10:36.530
So the one that's active is the one that's going to take on the rigid body and it was actually the furthest

10:36.530 --> 10:42.260
one away from here so if we go ahead and well basically play that.

10:43.160 --> 10:49.490
We will see once the it starts it falls down and does something weird when it hits the floor.

10:49.580 --> 10:54.560
It does something weird it gets dragged along because its centre of gravity is actually passing beneath

10:54.560 --> 10:57.890
the plane itself so it's actually being pulled in line with it.

10:58.010 --> 11:00.260
I think we're going to need some more frames.

11:00.260 --> 11:03.200
Anyway I'm going to go up to one hundred fifty so you can see here.

11:03.200 --> 11:08.300
He gets pulled in so it's directly above that and then scoots around the surface so it's worthwhile

11:08.300 --> 11:13.060
knowing that that centre of gravity will be funny when we apply it to the rest of this.

11:13.060 --> 11:14.040
And let's do that.

11:14.090 --> 11:16.630
It's all going to be sucked into this one place here.

11:16.850 --> 11:20.830
So good to go to the physics tab and copy from active.

11:21.060 --> 11:25.380
And will we do that the whole thing boils down and all gets sucked into one place.

11:25.520 --> 11:26.320
Yay.

11:26.450 --> 11:27.610
That might be here a.

11:27.650 --> 11:32.630
Awesome effective a portal opened up and you wanted it to be pulled into one place.

11:32.630 --> 11:36.160
Well that isn't what I want to happen here.

11:36.170 --> 11:38.160
I want them to be individual.

11:38.300 --> 11:43.550
So in order to do that I'm actually well kind of stuck here because I've just applied physics to everything

11:43.550 --> 11:48.050
and I can't unsupplied physics to everything without undoing so I am just going to undo.

11:48.050 --> 11:53.600
In this case another case in point for saving is that you don't want to end up doing a ton of work and

11:53.600 --> 11:58.290
then having it ruined or stop the playback for the moment and reset it to zero.

11:58.310 --> 12:05.780
And now I'm going to remove the rigid body from that can select everything again and then whilst we're

12:05.780 --> 12:10.070
in object mode and it gives the tool shelf and I'm going to set the origins of the centre of mass now

12:10.070 --> 12:13.840
because there are now separate objects and it's got no physics applied.

12:13.850 --> 12:14.520
There you go.

12:14.580 --> 12:17.760
Everything's now got its own centre of mass.

12:17.980 --> 12:24.290
Let's add a rigid body to the active one and then go into the physics tab copy from the active one to

12:24.290 --> 12:25.230
everything else.

12:25.330 --> 12:29.390
And of course hit play says go ahead and hit the right keys.

12:29.390 --> 12:32.680
Now well that's actually dropping from quite a height.

12:32.690 --> 12:34.590
We did play with that earlier.

12:34.850 --> 12:37.000
So let's set that back down to zero.

12:37.010 --> 12:38.300
Does that make a difference.

12:38.300 --> 12:39.020
No.

12:39.020 --> 12:40.280
No of course it doesn't.

12:40.280 --> 12:42.950
So let's move everything back down here.

12:42.950 --> 12:44.830
Case looking at this.

12:44.960 --> 12:47.320
What have we move moved with just moved this one down.

12:47.330 --> 12:48.720
So that's Paul.

12:48.740 --> 12:52.120
I don't know where it was before some was going to have to undo to that's in the right place.

12:52.130 --> 12:58.730
Okay so everything there is at the beginning of the scene and now removing the whole block as a whole.

12:58.910 --> 13:01.310
That looks like it's now on the surface again.

13:01.340 --> 13:04.340
That's what whilst were in orthographic maybe can confirm that.

13:04.350 --> 13:07.020
Perfect and let's run the physics simulation.

13:07.270 --> 13:13.080
Now the moment the bricks drop on top of one another which is fine but we need to leave a gap for mortar.

13:13.100 --> 13:18.440
Now we remember earlier we had a margin something to enable collision collision margin and I'm going

13:18.440 --> 13:22.410
to set it to nought point five.

13:22.430 --> 13:31.160
I think that was what we had before and well Convex Hull is not working so I'm going to try mesh K mesh

13:31.220 --> 13:38.120
isn't working quite as I expected to either stop the physics simulation here and rewind and just see

13:38.120 --> 13:39.950
if that makes difference.

13:39.960 --> 13:42.680
K It is not making a difference which is surprising.

13:42.680 --> 13:48.010
I thought it would have done up the margin now to 1 hour you know whats happening.

13:48.080 --> 13:51.990
Tony forgot to apply from the active side to copy from active.

13:52.070 --> 13:53.080
So going down that point.

13:53.090 --> 13:54.340
Well let's actually be funny.

13:54.350 --> 13:59.020
Let's set it a point five and I'm going to hit copy from active.

13:59.080 --> 14:00.140
Boom.

14:00.150 --> 14:05.060
The bricks are literally so confined together that they literally explode.

14:05.060 --> 14:09.170
Now that's not the faked we're going for although it is quite interesting so let's try.

14:09.170 --> 14:10.220
Nope.

14:10.430 --> 14:12.040
The point oh five again.

14:12.990 --> 14:17.970
And then copy from active that's important and how it's not being crazy anymore.

14:17.970 --> 14:20.590
Let's go around to the front again and zoom in.

14:20.610 --> 14:22.110
That is that gap right.

14:22.340 --> 14:22.930
It is.

14:22.920 --> 14:28.170
And you could see they're kind of jostling and floating on top of one another almost as if there was

14:28.170 --> 14:29.410
a magnetic field around them.

14:29.420 --> 14:31.560
That's a bump that up to 150 again.

14:31.950 --> 14:34.500
And this brick is toppling away.

14:34.590 --> 14:35.100
Oh.

14:35.950 --> 14:38.570
Well hey the whole thing falls over eventually.

14:38.570 --> 14:40.700
So it's not inherently stable at that point.

14:40.700 --> 14:44.440
But we can tweak the physics settings in the bit to improve that.

14:44.840 --> 14:51.470
Okay so after a few minutes of confusion the wall just kept falling down and I thought well hang on

14:51.470 --> 14:55.380
a minute all my trial runs that I've done this has not happened so.

14:55.480 --> 14:58.810
But the other thing I did do is make the wall explode violently.

14:58.820 --> 15:01.430
So perhaps something ahead crashed.

15:01.520 --> 15:06.280
I remembered some of the physics of a splosion and was toppling for some reason.

15:06.290 --> 15:08.630
Now I don't understand why it would do that.

15:08.750 --> 15:15.130
But it turned out that going down to the shape itself and switching it from mesh to Convex Hull I thought

15:15.130 --> 15:15.590
at first.

15:15.600 --> 15:16.090
Okay.

15:16.100 --> 15:17.890
I just picked the wrong colation shape.

15:17.990 --> 15:22.950
But when switching it directly back to mesh again well what happened.

15:22.970 --> 15:29.240
Well it was still working okay so this is a case in point that sometimes the physics can get a little

15:29.240 --> 15:30.540
bit confused.

15:30.590 --> 15:37.060
So switching the collisions shape can almost reset the physics engine itself and do some recalculations.

15:37.070 --> 15:41.700
And literally after switching between those two it started working again.

15:42.080 --> 15:46.370
One of the things you can do when this thing is moving is if I grab a brick and move it.

15:46.490 --> 15:50.470
Well it really starts throwing things about course it resets.

15:50.480 --> 15:52.250
So after sorting that out.

15:52.250 --> 15:54.110
That seems to have fixed everything.

15:54.110 --> 15:59.180
The other thing of course that we need to sort of figure out at this point and we can have a look at

15:59.180 --> 16:03.200
this brick that's tumbling is does it look like a break when it hits the ground.

16:03.200 --> 16:05.170
Is it too bouncy.

16:05.480 --> 16:08.530
Not particularly bouncy but it does slide a little.

16:08.540 --> 16:12.940
So let's go ahead and sort that out so I'm going to go ahead and select everything again.

16:13.220 --> 16:16.640
And we need an active Brecken let's use the one that's falling.

16:16.670 --> 16:19.330
So select everything after selecting the active one.

16:19.460 --> 16:22.210
And let's go ahead and have a look at physics properties.

16:22.280 --> 16:23.570
So it's got strong friction.

16:23.600 --> 16:29.490
And if we set the bouncing to one as we've discovered before it's a combination of both.

16:29.570 --> 16:32.080
The floor itself the floors properties.

16:32.330 --> 16:35.990
And this here we discover that in the last lecture.

16:36.050 --> 16:38.940
So we don't want any bounciness because bricks don't bounce.

16:39.020 --> 16:41.380
I'm going to up this number again.

16:41.390 --> 16:47.540
The resistance to translation and a little bit of resistance to rotation see if that makes the break

16:47.540 --> 16:49.090
just a little more.

16:49.340 --> 16:50.700
Yeah that looks a bit better.

16:50.780 --> 16:53.200
And of course up here the mass of the brick.

16:53.480 --> 16:55.850
Now these bricks are quite large.

16:55.850 --> 16:57.270
They're not to scale.

16:57.290 --> 17:00.410
That's certainly the fact there are whole metre long.

17:00.410 --> 17:01.100
She's huge.

17:01.100 --> 17:03.800
That brick is not going to weigh one kilogram.

17:03.890 --> 17:08.840
It's going to weigh significantly more so let's say it weighs 10 kilos.

17:08.930 --> 17:12.920
And let's see how it tumbles from the wall at this point of course is going to do more damage as it

17:12.920 --> 17:13.650
does.

17:13.760 --> 17:18.460
But that feels like that brick now has more substance to it.

17:18.620 --> 17:23.480
So of course that's actually apply that to all the rest of the bricks as well.

17:23.660 --> 17:28.660
And they should now be inherently more stable anyway because they're a bit heavy for their size.

17:28.790 --> 17:35.080
If we set Well let's do it let's set the mast to point one so we've got a 10 Gramp now 100 gram break

17:35.390 --> 17:38.690
and then copy from Active's of the whole wall is like this.

17:38.740 --> 17:42.130
It it's not going to come to a complete stop when it lands.

17:42.140 --> 17:46.350
In fact if we make it even smaller you see it doesn't even affect bricks at this point.

17:46.370 --> 17:47.850
So that set back up to 10.

17:47.930 --> 17:51.820
Now here's a good example because those bricks don't weigh anything anymore.

17:51.830 --> 17:55.730
They were 100 grams and this weighs ten thousand grams.

17:56.030 --> 18:00.080
You can see the effect it's having on the wall it's actually shifting the entire lot sideways as it

18:00.080 --> 18:03.950
falls because it's so much heavier than the rest of the water.

18:03.980 --> 18:08.960
Now of course at this point I'm going to copy from active again to the whole wall and now you have to

18:08.960 --> 18:13.130
wait for the physics engine to reset of course go back to the beginning and there we go.

18:13.130 --> 18:18.110
There's the one brick tumbling to oblivion because it's got no support.

18:18.110 --> 18:18.820
Excellent.

18:18.950 --> 18:22.670
So how did you guys get on did you manage create a wall that was stable.

18:22.670 --> 18:26.440
Do you have any problems like I came across and have to troubleshoot.

18:26.540 --> 18:32.590
Please share your falling walls in the discussions and I will see you guys in the next lecture.
