In this lesson, we're going to smash a ball through the brick wall that we've modeled and we're going
to use that with a bullet system, and I should take a step back and say, you know, the first lesson
we talked about soon, scale and how important that was.
And for the bullet solver, it's a little different bullet solvers based on game dynamics and the scene
scale is more specific to the solver in my effort, in cloth, in dynamics, in hair, all that kind
of stuff.
So we're actually going to not care as much about the scale at the moment.
If we didn't like the speed of things in the bullet solver, we would mess around with the mass of the
objects for our purposes right now.
This should work pretty well, I think.
So let's just move forward with that.
So I'm going to create a ball and I'm also, in a later lesson, going to show you another way to use
the bullet solver for our kind of main scene.
So let's just position this ball sphere and where you know a little ways in front of the wall and let's
select all of the wall, every piece.
And first, we need to load the bullet solver.
So let's go to the Settings and Preferences plugin manager, and we need to make sure it's loaded.
So it's loaded here, auto load.
And when we go over to effects, we should have an option here that says bullet.
And because we want this whole system to act together and basically be a set because it's a wall, we
want to choose rigid set.
So now we have in our outliner a couple of new things.
We have the bullet rigid, set solid.
We have the bullet salver itself.
And if we open up the attribute editor here and we go to the bullet tabs here, we get some interesting
new options that will help us set the type of simulation that we want.
So if, again, we want to make sure we.
Right.
Click on the timeline and go to playback speed and that it's set to play every frame and that'll make
sure that it calculates the simulation correctly.
I'm going to extend this out just so we have a little more time here in our timeline.
And if I had play right now, it's just going to drop to the ground because we haven't chosen to turn
on the ground plane.
So if we turn it on, I'm going to guess things are going to explode a little bit.
Okay, this is one thing that I forgot, because this brick is out by itself.
It's going to fall off.
We could, you know, delete the bullet solver and delete that little piece.
Actually, I think we can exclude it if we found it in here.
You actually exclude it by going to bullet rigid sets, remove selected where we could say select bullet
solver and then delete it, delete entire bullet system and delete this tiny little brick in the corner
so it doesn't fall off and then recreate that, make another rigid set again.
But anyway, that's if you just want to fix that, that's how you could do it.
So let's grab this and let's make a active body.
We're going to get in there, which is just kind of a buggy thing.
I will admit bullet solver is kind of buggy.
It's not perfect for everything, but there's some cases where it works pretty well and these rigid
body examples.
So now we have this sphere selected.
It has its own rigid body attributes.
Now, if we wanted to animate the ball ourselves flying through the wall, we could do that again.
We could seddiqui just like reset keys and other parts of the series of this course.
But we want to make sure that we have the body type set to kinematic.
And so kinematic means that it will respect any animation you have on an object and it will not include
it in the simulation in the sense that the wall will not affect the ball.
OK, but the ball will affect the wall if we animated into the wall.
Well, I'm going to do is leave it as a dynamic, rigid body and then I'm going to give it an initial
velocity.
So that will fly forward and forward.
And this case is going to be negative X so we can say, you know, we know X, Y and Z, we can see
this is initial velocity.
So we can kind of you know, these are our common sense here and think, OK, this is maybe what we
want because initial velocity when initially, you know, give it a speed and we want it to be negative
X, which is the first one here, because most everything Amyas, X, Y, Z, so X, Y, Z, same thing
down here, X.
Well, this is Matrix.
So it's a different thing, but same thing with velocity, angular velocity.
This would spin it around if we wanted to spin it around.
So let's give it a negative, maybe fifty, something like that, and let's hit play.
Things are going to probably explode a little bit.
Not too bad actually.
Let's give it more mass instead of increasing the.
We can just give it more mass, you can see right now, it kind of has a hard time going through, but
if we just increase the mass a little bit, I suspect this will have no problem going through coal.
So we've created our first simulation and Miah using the bullet solver in the blood system here.
Now, the other thing is we could create a glue system here.
If we like this and we go to the initial state here, we can say glue shapes and just crank this up.
And that's supposed to help keep the bricks together.
But, you know, you can't really tell that big of a difference between what we just did.
You have to crank these values up pretty high for our case.
The way out of this, it works pretty well and.
Because we're using the dynamic simulation for the ball, it's actually being affected by the wall,
trying to keep it from moving forward so it slows down as it hits the wall, which is kind of nice.
If you try to animate that, it might be kind of difficult.
So one kind of tricky thing that might be fun is if you want to use this to start with, what's let's
maybe actually let's leave that where it is and decrease the mass a little bit, we can actually make
the simulation of this ball so we could go edit keys, big simulation, and just the defaults are going
to break every frame here.
And then so we have this ball is key framed its position on everything.
But, you know, none of that will matter unless we say kinematic rigid body.
So now we know it'll always use that same animation that we just send and use in the simulation.
So it'll actually make the simulation run a little faster because it's not having to dynamically calculate
the ball being affected anymore by the wall.
So that's one little kind of, you know, workflow thing that might speed things up.
But in our case, there's a pretty simple scene.
So, yeah, that's how you break a wall with the system.
And the next lesson we are going to look at shattering objects.
And I've got a special script that is actually going to help quite a bit with that.
And we're going to learn how to work around some finicky issues with Maya regarding shattering objects
and using the bullet system with them.
Thanks for watching.