WEBVTT

00:00.720 --> 00:06.680
So, listen, we're going to shatter this object and then use the solar system to drop it onto the floor.

00:07.230 --> 00:13.110
So just for fun, I'm going to make a floor here and I'm going to save this out actually before I get

00:13.110 --> 00:13.530
started.

00:14.130 --> 00:17.610
And let's grab this little cylinder and raise it up.

00:17.610 --> 00:23.910
So we're going to shatter it onto the floor and rotate it at some angle of some kind.

00:24.900 --> 00:29.160
And so we want to delete the history on this thing.

00:29.160 --> 00:32.420
The bullet solver needs no history on an object.

00:32.430 --> 00:36.600
So even though this is a pretty new object, I just extrude a couple of things.

00:36.600 --> 00:38.310
You have to have no history on something.

00:38.640 --> 00:41.680
I'm sorry, not for the bullet solver, but for the shattered.

00:41.700 --> 00:45.620
Rather, it will not let you shatter an object if there's any history.

00:45.630 --> 00:47.280
So you have to go delete by type history.

00:47.380 --> 00:53.400
OK, and when you get to the shatter from the effects tab here, let's go to effects and we go to shatter.

00:53.790 --> 00:54.930
And there's three different types.

00:54.930 --> 00:58.170
And we want to do a solid shatter because we want solid pieces.

00:58.170 --> 00:58.920
And

01:01.560 --> 01:04.330
so yeah, let's just use it and you can see how that works.

01:04.330 --> 01:05.100
So I'll head apply.

01:06.360 --> 01:11.010
And it shatters the object, so in the outliner, we get it, keeps it.

01:11.040 --> 01:12.330
We have an original object here.

01:12.630 --> 01:13.500
We can hide that.

01:13.500 --> 01:19.070
And now we have a group of each of the shards of the object.

01:19.260 --> 01:24.750
And you can notice that, you know, if we were to drop this thing on the ground, each one of these

01:24.750 --> 01:34.260
shards is kind of evenly it's the same size and we can drop it on the ground and use the solver.

01:35.880 --> 01:37.280
So let's just do that first.

01:37.300 --> 01:39.960
Then I'll show you how to shatter this in a better way later.

01:40.440 --> 01:46.020
So we could also let me let me just delete this and also show you the other settings here.

01:46.420 --> 01:47.910
We can hide this.

01:47.920 --> 01:50.220
You have to have it unhidden to actually use this tool.

01:50.710 --> 01:54.050
We can increase the edge jaggedness and apply.

01:55.020 --> 02:03.270
And so each of the shards, if I get an object mode now, the edge and the interior also has a lot more

02:03.480 --> 02:04.260
texture to it.

02:04.260 --> 02:13.820
It's it's jagged, obviously, as the edge jaggedness thing attribute signifies here behind the original.

02:14.340 --> 02:18.660
And so now we have our edge jagged cylinder.

02:19.080 --> 02:20.900
We need to create another rigid set.

02:21.660 --> 02:27.900
So I'll go back to the system as we've done before and we'll say rigid set and we'll go into the attributes

02:27.900 --> 02:29.070
of the bullet solver.

02:29.860 --> 02:40.920
And so if we hit play right now, this should explode because the kind of default settings for the BOLSOVER

02:40.920 --> 02:48.420
is to have a collision shaped margin of zero point zero four, meaning zero point zero four is the margin

02:48.420 --> 02:50.190
to start calculating in collision.

02:50.610 --> 02:57.990
And because we shattered this, these seams of each shard are right on top of each other.

02:58.410 --> 03:05.420
So we need to tell that margin to be at zero because these pieces have no gap between them.

03:05.940 --> 03:10.350
So it'll still probably explode a little bit and that's OK.

03:10.380 --> 03:12.270
But that's one of the first things we need to do.

03:12.300 --> 03:18.800
The other thing we need to do is instead of using a black box collision type, we use a hole.

03:18.840 --> 03:21.520
And I want to show you this in the visualization.

03:21.540 --> 03:22.620
And you can visualize this.

03:22.620 --> 03:23.340
You can try.

03:23.640 --> 03:25.740
Maya crashes on me every time I try to do this.

03:25.740 --> 03:28.590
But if you click this, you will see colors and shape.

03:28.590 --> 03:32.520
And basically what it's doing is is around each shard.

03:32.950 --> 03:34.190
I'm just inside one.

03:34.590 --> 03:38.370
So imagine this shard with a box around it like a bounding box.

03:38.400 --> 03:44.430
So it finds the, you know, maximum distance around the object and create a box.

03:44.910 --> 03:48.010
And that box is where it's using to calculate a collision.

03:48.330 --> 03:54.480
So even though let's say like, you know, there's no object over here because this point of this side

03:54.480 --> 03:55.970
over here, we have four.

03:56.010 --> 04:00.240
We can see it because this point you can draw a straight line across and down here.

04:00.250 --> 04:05.280
So anything that enters in this area, even though it's not a piece of geometry, because we're using

04:05.500 --> 04:12.510
the box, a hole outside the box collision shape, it will think it's colliding with something even

04:12.510 --> 04:13.020
though it isn't.

04:13.200 --> 04:20.130
And so we change the collision shape of this and the bullet solver for the initial state and we can

04:20.130 --> 04:21.690
go to collision shape type.

04:21.750 --> 04:26.730
We need to choose hole and will basically wrap around each of the shards.

04:26.730 --> 04:34.200
So it will be much better representation of collisions for each shape.

04:34.500 --> 04:35.910
So now we hit play.

04:35.910 --> 04:37.200
It's probably going to the same thing.

04:37.500 --> 04:38.910
Oh, I unhide that.

04:38.910 --> 04:40.050
That's why that piece is still there.

04:41.230 --> 04:49.170
So it's not exploding as much as you can tell, but there's more we can do to solve for this and we

04:49.170 --> 04:50.760
need to turn on the ground first off.

04:51.120 --> 04:57.960
So let's go back to the main bullet solver shape here and turn on use ground plain and see it is hitting

04:57.960 --> 04:59.400
the ground kind of accurately.

04:59.850 --> 05:07.410
And if we're using the box shape, you know, it wouldn't wouldn't be as accurate as this even at this

05:07.410 --> 05:07.650
point.

05:07.650 --> 05:15.510
You can see how it's actually touching exactly the point at which it's you know, the shape is is that

05:15.510 --> 05:20.370
but if this is the box, you know, it would be much less accurate, right?

05:20.720 --> 05:21.720
Oh, that's making sense.

05:21.720 --> 05:23.250
And I wish I could visualize it in my head.

05:23.250 --> 05:24.300
Wouldn't crash and I would do it.

05:24.300 --> 05:28.520
But just imagine like a box around this and that's a big no, no, we don't want that.

05:28.530 --> 05:32.310
So that's why we chose the whole collision shape type.

05:33.060 --> 05:38.520
So let's glue shapes and crank this up and that should hold this thing together now.

05:38.850 --> 05:39.720
So let's hit play.

05:39.720 --> 05:46.680
And now because we glued the shapes together at a pretty big threshold and we're seeing max constraints

05:46.680 --> 05:47.190
per body.

05:47.190 --> 05:52.440
So that's saying how many other objects am I going to constrain myself to?

05:52.830 --> 05:55.410
And so six is quite a bit like that.

05:55.410 --> 06:00.180
Wouldn't make sense for like a shard over here to be connected to a shard over here so we can actually

06:00.180 --> 06:05.790
just reduce this down to maybe like two and let's just crank the threshold down and just pull this back.

06:06.360 --> 06:11.490
And we can start increasing or decreasing this threshold.

06:13.490 --> 06:15.470
And see if we can get this thing to break.

06:17.520 --> 06:18.550
How we want it to.

06:19.440 --> 06:20.970
So, yeah, now it's starting to break.

06:22.290 --> 06:27.600
As you'd expect it, and there was a shard of these shards are sticking together because there's this

06:27.600 --> 06:30.770
threshold is not being met for these other shapes.

06:30.780 --> 06:38.910
And so this also gives me a good time to talk about, unfortunately, that bullet is not super accurate

06:38.910 --> 06:39.630
every time.

06:39.660 --> 06:40.030
Right.

06:40.260 --> 06:41.280
You can tell those things.

06:41.280 --> 06:42.210
Just keep playing back.

06:42.220 --> 06:43.590
Haven't changed any settings.

06:44.040 --> 06:46.560
And we're getting a different simulation every time.

06:46.560 --> 06:49.730
Pretty much these have been pretty consistent.

06:49.740 --> 06:53.420
But you can tell at once like this is totally different from what was played.

06:53.580 --> 06:55.200
So we'll get some of these again.

06:55.620 --> 06:58.090
And then for whatever reason, now we get a different one.

06:58.410 --> 07:03.240
So you want to cash these out once you get done.

07:03.240 --> 07:05.430
And I'm going to show you how to do an Olympic cache later.

07:05.820 --> 07:10.770
The only other thing I would say before you'd want to cash this out and the reason why I'm saying you

07:10.770 --> 07:13.710
want to cash it, because like I just said, every SIM is different.

07:13.710 --> 07:15.200
Every time I play this back, it's different.

07:15.660 --> 07:19.950
So if I get one, I'm like, oh, I like this, but I don't cash it, then I'm just kind of screwed.

07:19.950 --> 07:20.250
Right?

07:20.670 --> 07:25.230
So I want to cash it and then I get to decide if I want to keep that cash or not.

07:25.500 --> 07:32.580
But if I play this and I'm like I like, well this you know how this play out and I go to cash it,

07:32.580 --> 07:35.760
I just have to cross my fingers that it does something similar to what I just played back.

07:36.270 --> 07:38.670
So that's kind of a limitation of bullet.

07:39.810 --> 07:45.960
And those dynamics, unfortunately, in my they they can be inconsistent between playbacks.

07:46.410 --> 07:50.400
So that's something you have to anticipate and start to cash things so that you can, like, save it

07:50.730 --> 07:52.440
and then decide whether you like that or not.

07:52.980 --> 07:57.600
The other thing I'm going to say about shattering is that if you can tell there's actually these interior

07:57.600 --> 08:00.240
pieces here and there denoted by yellow.

08:01.470 --> 08:06.530
So what I like to do before I cache something out is let's go to the editor here.

08:06.570 --> 08:07.770
I can click this icon.

08:07.770 --> 08:10.050
I can go to modeling the editor.

08:11.700 --> 08:13.140
You know, it's all the same thing.

08:14.730 --> 08:15.930
What I would do.

08:18.540 --> 08:22.650
And we're not actually getting these pieces here we go.

08:23.790 --> 08:29.520
What I would do, see how we've already it's all on top of each other.

08:29.790 --> 08:36.690
If I got a TV show, I should be able to get these big shards and what I want are these into your pieces.

08:37.530 --> 08:47.270
And it's a little tough because it just kind of automatically makes cuts where it thinks it should cut.

08:47.520 --> 08:48.030
So.

08:49.570 --> 08:56.890
You can go through here and select kind of the shell of his interior pieces, and I just like to before

08:56.890 --> 09:03.940
I get too far with caching all this stuff out is too.

09:06.450 --> 09:13.110
Remove all of the interior pieces over to like one side of your you're zero to one UV space, you can

09:13.110 --> 09:18.590
see one is right here and this up zero is down here and one over here.

09:18.600 --> 09:24.390
So I keep everything zero one and, you know, go through and select.

09:24.540 --> 09:27.690
You know, you make sure you have you, Michelle, because we want to select faces, even though it

09:27.690 --> 09:32.250
kind of it cut it in a way that it almost looks like we're selecting faces because it cut so many different

09:32.250 --> 09:32.700
times.

09:34.290 --> 09:37.590
But I'm actually just selecting the shell of the interior faces.

09:37.590 --> 09:46.620
So this way, when you go to texture the inside to look different than the outside, all of your movies

09:46.620 --> 09:48.150
will already be where they need to be.

09:49.350 --> 09:54.540
So you can do whatever else you want to with them so you can like you know, it's easier to select them

09:54.540 --> 10:00.240
with, you know, whichever way you want to select them and later on figure out how to texture it.

10:00.240 --> 10:01.770
That's that's a way to do that.

10:02.100 --> 10:04.080
So that's how you shatter an object.

10:04.440 --> 10:11.040
In the next lesson, we're going to look closer into using both Silver and our main animations scene.

10:11.340 --> 10:15.180
So we're going to take a step back and talk a little bit more about a little caches and why they're

10:15.180 --> 10:19.800
important to simulations and open up the animation scene we're going to be working with.

10:19.800 --> 10:20.610
So thanks for watching.
