WEBVTT

00:00.150 --> 00:04.710
In this lesson, we're going to smash a ball through the brick wall that we've modeled and we're going

00:04.710 --> 00:09.060
to use that with a bullet system, and I should take a step back and say, you know, the first lesson

00:09.060 --> 00:11.370
we talked about soon, scale and how important that was.

00:11.700 --> 00:20.220
And for the bullet solver, it's a little different bullet solvers based on game dynamics and the scene

00:20.220 --> 00:27.150
scale is more specific to the solver in my effort, in cloth, in dynamics, in hair, all that kind

00:27.150 --> 00:27.520
of stuff.

00:27.900 --> 00:32.340
So we're actually going to not care as much about the scale at the moment.

00:33.150 --> 00:38.490
If we didn't like the speed of things in the bullet solver, we would mess around with the mass of the

00:38.490 --> 00:41.310
objects for our purposes right now.

00:41.340 --> 00:43.250
This should work pretty well, I think.

00:43.260 --> 00:44.780
So let's just move forward with that.

00:44.790 --> 00:52.080
So I'm going to create a ball and I'm also, in a later lesson, going to show you another way to use

00:52.080 --> 00:55.040
the bullet solver for our kind of main scene.

00:55.470 --> 01:04.830
So let's just position this ball sphere and where you know a little ways in front of the wall and let's

01:04.830 --> 01:08.400
select all of the wall, every piece.

01:08.760 --> 01:11.480
And first, we need to load the bullet solver.

01:11.490 --> 01:16.320
So let's go to the Settings and Preferences plugin manager, and we need to make sure it's loaded.

01:16.320 --> 01:18.210
So it's loaded here, auto load.

01:18.750 --> 01:23.610
And when we go over to effects, we should have an option here that says bullet.

01:24.330 --> 01:31.530
And because we want this whole system to act together and basically be a set because it's a wall, we

01:31.530 --> 01:33.200
want to choose rigid set.

01:33.780 --> 01:37.140
So now we have in our outliner a couple of new things.

01:37.140 --> 01:40.550
We have the bullet rigid, set solid.

01:40.560 --> 01:42.270
We have the bullet salver itself.

01:42.690 --> 01:48.930
And if we open up the attribute editor here and we go to the bullet tabs here, we get some interesting

01:48.930 --> 01:54.220
new options that will help us set the type of simulation that we want.

01:54.570 --> 01:57.560
So if, again, we want to make sure we.

01:57.570 --> 01:57.750
Right.

01:57.750 --> 02:05.490
Click on the timeline and go to playback speed and that it's set to play every frame and that'll make

02:05.490 --> 02:08.070
sure that it calculates the simulation correctly.

02:08.760 --> 02:12.330
I'm going to extend this out just so we have a little more time here in our timeline.

02:12.780 --> 02:17.280
And if I had play right now, it's just going to drop to the ground because we haven't chosen to turn

02:17.280 --> 02:17.910
on the ground plane.

02:17.920 --> 02:21.300
So if we turn it on, I'm going to guess things are going to explode a little bit.

02:22.160 --> 02:26.970
Okay, this is one thing that I forgot, because this brick is out by itself.

02:26.970 --> 02:27.870
It's going to fall off.

02:28.590 --> 02:32.400
We could, you know, delete the bullet solver and delete that little piece.

02:32.410 --> 02:37.090
Actually, I think we can exclude it if we found it in here.

02:37.090 --> 02:43.710
You actually exclude it by going to bullet rigid sets, remove selected where we could say select bullet

02:43.710 --> 02:50.910
solver and then delete it, delete entire bullet system and delete this tiny little brick in the corner

02:50.910 --> 02:56.160
so it doesn't fall off and then recreate that, make another rigid set again.

02:56.610 --> 02:59.850
But anyway, that's if you just want to fix that, that's how you could do it.

03:00.390 --> 03:05.760
So let's grab this and let's make a active body.

03:05.760 --> 03:08.610
We're going to get in there, which is just kind of a buggy thing.

03:08.610 --> 03:11.370
I will admit bullet solver is kind of buggy.

03:12.180 --> 03:16.830
It's not perfect for everything, but there's some cases where it works pretty well and these rigid

03:16.830 --> 03:17.790
body examples.

03:17.790 --> 03:20.700
So now we have this sphere selected.

03:20.700 --> 03:26.040
It has its own rigid body attributes.

03:26.800 --> 03:32.430
Now, if we wanted to animate the ball ourselves flying through the wall, we could do that again.

03:32.430 --> 03:38.610
We could seddiqui just like reset keys and other parts of the series of this course.

03:39.660 --> 03:43.260
But we want to make sure that we have the body type set to kinematic.

03:43.710 --> 03:51.630
And so kinematic means that it will respect any animation you have on an object and it will not include

03:51.630 --> 03:55.950
it in the simulation in the sense that the wall will not affect the ball.

03:56.160 --> 04:00.690
OK, but the ball will affect the wall if we animated into the wall.

04:01.050 --> 04:06.870
Well, I'm going to do is leave it as a dynamic, rigid body and then I'm going to give it an initial

04:06.870 --> 04:07.500
velocity.

04:07.500 --> 04:10.220
So that will fly forward and forward.

04:10.230 --> 04:17.490
And this case is going to be negative X so we can say, you know, we know X, Y and Z, we can see

04:17.490 --> 04:18.600
this is initial velocity.

04:18.600 --> 04:23.520
So we can kind of you know, these are our common sense here and think, OK, this is maybe what we

04:23.520 --> 04:29.040
want because initial velocity when initially, you know, give it a speed and we want it to be negative

04:29.040 --> 04:35.280
X, which is the first one here, because most everything Amyas, X, Y, Z, so X, Y, Z, same thing

04:35.280 --> 04:36.090
down here, X.

04:36.570 --> 04:37.710
Well, this is Matrix.

04:37.710 --> 04:42.300
So it's a different thing, but same thing with velocity, angular velocity.

04:42.300 --> 04:45.270
This would spin it around if we wanted to spin it around.

04:45.810 --> 04:53.310
So let's give it a negative, maybe fifty, something like that, and let's hit play.

04:53.340 --> 04:55.110
Things are going to probably explode a little bit.

04:55.320 --> 04:56.460
Not too bad actually.

04:57.660 --> 04:59.790
Let's give it more mass instead of increasing the.

05:00.820 --> 05:05.170
We can just give it more mass, you can see right now, it kind of has a hard time going through, but

05:05.170 --> 05:11.620
if we just increase the mass a little bit, I suspect this will have no problem going through coal.

05:11.680 --> 05:18.680
So we've created our first simulation and Miah using the bullet solver in the blood system here.

05:19.060 --> 05:26.380
Now, the other thing is we could create a glue system here.

05:26.380 --> 05:32.800
If we like this and we go to the initial state here, we can say glue shapes and just crank this up.

05:32.980 --> 05:36.610
And that's supposed to help keep the bricks together.

05:37.870 --> 05:41.200
But, you know, you can't really tell that big of a difference between what we just did.

05:41.210 --> 05:44.470
You have to crank these values up pretty high for our case.

05:44.470 --> 05:48.820
The way out of this, it works pretty well and.

05:49.950 --> 05:55.200
Because we're using the dynamic simulation for the ball, it's actually being affected by the wall,

05:55.200 --> 06:00.000
trying to keep it from moving forward so it slows down as it hits the wall, which is kind of nice.

06:00.000 --> 06:01.810
If you try to animate that, it might be kind of difficult.

06:02.190 --> 06:09.920
So one kind of tricky thing that might be fun is if you want to use this to start with, what's let's

06:09.930 --> 06:16.290
maybe actually let's leave that where it is and decrease the mass a little bit, we can actually make

06:16.290 --> 06:23.580
the simulation of this ball so we could go edit keys, big simulation, and just the defaults are going

06:23.580 --> 06:25.110
to break every frame here.

06:25.650 --> 06:32.010
And then so we have this ball is key framed its position on everything.

06:32.610 --> 06:37.900
But, you know, none of that will matter unless we say kinematic rigid body.

06:37.920 --> 06:44.400
So now we know it'll always use that same animation that we just send and use in the simulation.

06:44.400 --> 06:50.190
So it'll actually make the simulation run a little faster because it's not having to dynamically calculate

06:50.670 --> 06:52.990
the ball being affected anymore by the wall.

06:53.400 --> 06:57.930
So that's one little kind of, you know, workflow thing that might speed things up.

06:57.930 --> 06:59.630
But in our case, there's a pretty simple scene.

06:59.940 --> 07:03.770
So, yeah, that's how you break a wall with the system.

07:04.090 --> 07:07.080
And the next lesson we are going to look at shattering objects.

07:07.440 --> 07:11.610
And I've got a special script that is actually going to help quite a bit with that.

07:11.910 --> 07:18.810
And we're going to learn how to work around some finicky issues with Maya regarding shattering objects

07:18.810 --> 07:20.730
and using the bullet system with them.

07:21.090 --> 07:21.630
Thanks for watching.
