So, listen, we're going to shatter this object and then use the solar system to drop it onto the floor.
So just for fun, I'm going to make a floor here and I'm going to save this out actually before I get
started.
And let's grab this little cylinder and raise it up.
So we're going to shatter it onto the floor and rotate it at some angle of some kind.
And so we want to delete the history on this thing.
The bullet solver needs no history on an object.
So even though this is a pretty new object, I just extrude a couple of things.
You have to have no history on something.
I'm sorry, not for the bullet solver, but for the shattered.
Rather, it will not let you shatter an object if there's any history.
So you have to go delete by type history.
OK, and when you get to the shatter from the effects tab here, let's go to effects and we go to shatter.
And there's three different types.
And we want to do a solid shatter because we want solid pieces.
And
so yeah, let's just use it and you can see how that works.
So I'll head apply.
And it shatters the object, so in the outliner, we get it, keeps it.
We have an original object here.
We can hide that.
And now we have a group of each of the shards of the object.
And you can notice that, you know, if we were to drop this thing on the ground, each one of these
shards is kind of evenly it's the same size and we can drop it on the ground and use the solver.
So let's just do that first.
Then I'll show you how to shatter this in a better way later.
So we could also let me let me just delete this and also show you the other settings here.
We can hide this.
You have to have it unhidden to actually use this tool.
We can increase the edge jaggedness and apply.
And so each of the shards, if I get an object mode now, the edge and the interior also has a lot more
texture to it.
It's it's jagged, obviously, as the edge jaggedness thing attribute signifies here behind the original.
And so now we have our edge jagged cylinder.
We need to create another rigid set.
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
of the bullet solver.
And so if we hit play right now, this should explode because the kind of default settings for the BOLSOVER
is to have a collision shaped margin of zero point zero four, meaning zero point zero four is the margin
to start calculating in collision.
And because we shattered this, these seams of each shard are right on top of each other.
So we need to tell that margin to be at zero because these pieces have no gap between them.
So it'll still probably explode a little bit and that's OK.
But that's one of the first things we need to do.
The other thing we need to do is instead of using a black box collision type, we use a hole.
And I want to show you this in the visualization.
And you can visualize this.
You can try.
Maya crashes on me every time I try to do this.
But if you click this, you will see colors and shape.
And basically what it's doing is is around each shard.
I'm just inside one.
So imagine this shard with a box around it like a bounding box.
So it finds the, you know, maximum distance around the object and create a box.
And that box is where it's using to calculate a collision.
So even though let's say like, you know, there's no object over here because this point of this side
over here, we have four.
We can see it because this point you can draw a straight line across and down here.
So anything that enters in this area, even though it's not a piece of geometry, because we're using
the box, a hole outside the box collision shape, it will think it's colliding with something even
though it isn't.
And so we change the collision shape of this and the bullet solver for the initial state and we can
go to collision shape type.
We need to choose hole and will basically wrap around each of the shards.
So it will be much better representation of collisions for each shape.
So now we hit play.
It's probably going to the same thing.
Oh, I unhide that.
That's why that piece is still there.
So it's not exploding as much as you can tell, but there's more we can do to solve for this and we
need to turn on the ground first off.
So let's go back to the main bullet solver shape here and turn on use ground plain and see it is hitting
the ground kind of accurately.
And if we're using the box shape, you know, it wouldn't wouldn't be as accurate as this even at this
point.
You can see how it's actually touching exactly the point at which it's you know, the shape is is that
but if this is the box, you know, it would be much less accurate, right?
Oh, that's making sense.
And I wish I could visualize it in my head.
Wouldn't crash and I would do it.
But just imagine like a box around this and that's a big no, no, we don't want that.
So that's why we chose the whole collision shape type.
So let's glue shapes and crank this up and that should hold this thing together now.
So let's hit play.
And now because we glued the shapes together at a pretty big threshold and we're seeing max constraints
per body.
So that's saying how many other objects am I going to constrain myself to?
And so six is quite a bit like that.
Wouldn't make sense for like a shard over here to be connected to a shard over here so we can actually
just reduce this down to maybe like two and let's just crank the threshold down and just pull this back.
And we can start increasing or decreasing this threshold.
And see if we can get this thing to break.
How we want it to.
So, yeah, now it's starting to break.
As you'd expect it, and there was a shard of these shards are sticking together because there's this
threshold is not being met for these other shapes.
And so this also gives me a good time to talk about, unfortunately, that bullet is not super accurate
every time.
Right.
You can tell those things.
Just keep playing back.
Haven't changed any settings.
And we're getting a different simulation every time.
Pretty much these have been pretty consistent.
But you can tell at once like this is totally different from what was played.
So we'll get some of these again.
And then for whatever reason, now we get a different one.
So you want to cash these out once you get done.
And I'm going to show you how to do an Olympic cache later.
The only other thing I would say before you'd want to cash this out and the reason why I'm saying you
want to cash it, because like I just said, every SIM is different.
Every time I play this back, it's different.
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.
Right?
So I want to cash it and then I get to decide if I want to keep that cash or not.
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,
I just have to cross my fingers that it does something similar to what I just played back.
So that's kind of a limitation of bullet.
And those dynamics, unfortunately, in my they they can be inconsistent between playbacks.
So that's something you have to anticipate and start to cash things so that you can, like, save it
and then decide whether you like that or not.
The other thing I'm going to say about shattering is that if you can tell there's actually these interior
pieces here and there denoted by yellow.
So what I like to do before I cache something out is let's go to the editor here.
I can click this icon.
I can go to modeling the editor.
You know, it's all the same thing.
What I would do.
And we're not actually getting these pieces here we go.
What I would do, see how we've already it's all on top of each other.
If I got a TV show, I should be able to get these big shards and what I want are these into your pieces.
And it's a little tough because it just kind of automatically makes cuts where it thinks it should cut.
So.
You can go through here and select kind of the shell of his interior pieces, and I just like to before
I get too far with caching all this stuff out is too.
Remove all of the interior pieces over to like one side of your you're zero to one UV space, you can
see one is right here and this up zero is down here and one over here.
So I keep everything zero one and, you know, go through and select.
You know, you make sure you have you, Michelle, because we want to select faces, even though it
kind of it cut it in a way that it almost looks like we're selecting faces because it cut so many different
times.
But I'm actually just selecting the shell of the interior faces.
So this way, when you go to texture the inside to look different than the outside, all of your movies
will already be where they need to be.
So you can do whatever else you want to with them so you can like you know, it's easier to select them
with, you know, whichever way you want to select them and later on figure out how to texture it.
That's that's a way to do that.
So that's how you shatter an object.
In the next lesson, we're going to look closer into using both Silver and our main animations scene.
So we're going to take a step back and talk a little bit more about a little caches and why they're
important to simulations and open up the animation scene we're going to be working with.
So thanks for watching.