Welcome to the cell fracture add on.
So this is going to be all about fracturing objects.
In fact the next couple of lectures are also going to be about fracturing objects.
Using this tool.
So we're going to go ahead and turn on the cell fracture add on.
It's not enabled by default.
We'll just turn it on so we can use it.
We're going to have an overview of that Aadhar add on as well.
We're going to look at the various ways of fracturing our model and how to prevent random explosions
when you start applying physics.
We're going to break apart the model only use in the object itself.
There are a couple of other options and we'll deal with the manual fracturing using these other options
in following lectures.
So let's go start fracturing things and hop on over in a blender.
Okay so I've opened up blender fresh with our default cube in the scene that we can play with.
I'm actually going to lift that up on the z axis by one.
And yeah I'm going to say fats because I'd prefer if I'm going to start with a cue that it starts on
some of the same my start up.
Now you may also notice that the rest of my settings changed ever so slightly I had a bit of a computer
hiccup but I needed to restore everything.
So there may be some add ons that I need to re-enable etc..
But back to basically the standard default layouts here.
Now speaking of add ons we need to go to our user preferences and enable the cell fracture.
So once you're in the user preferences go to the add ons tab along the top in the search field on the
top left there of which typing cell.
We will have the option here object cell fracture puts a tick in the little check box then I recommend
you press Save user settings so that this particular add on comes on every time you start blender.
Okay.
Now how do you access it.
Well there are a couple of ways it should now be added to the tool shelf.
If we scroll down there's a button that says cell fracture with an object selected or objects you can
just hit cell fracture and it will come up.
Now I'm not going to do it that way.
I am going to skate to get rid of it.
I'm going to use the space menu for searching in the 3D editor and type in cell and there it is.
And that will enable me because blender remembers what you searched for last to come out changed the
settings and literally press space and enter and bring this back up every time.
Now it does pop up kind of in the way does it pop up whether 3D cursor is by any chance.
Might do might come up on the edge.
I'm not sure.
But either way there we go.
That's up.
And oh my word there are a lot of options here.
What did they all mean.
We'll go through them individually kind of as we're going through would be a bit jumpy up and down this
list and we'll reveal things as they become more important.
First of all let's have a play or let's have a look at what options we've got along the top here.
We've got a point source of this tells blender where my fracturing from.
What am I using.
So we've got the option of own verses which are the verses that are of that object we've got child vertices.
Okay so if this object has any children will be using the vertices of that chip or of those children.
There are more than one next.
We have own particles and charged particles.
As you can probably tell they are to do with the particle system that it has or any of its children
have.
Now we're not going to use those in this particular ammit discussion on the cell fracture as we've already
played with the particle system.
Feel free to play with that yourselves.
We also have the grease pencil as well so we can actually draw and help guide this tool where we wanted
to fracture.
So let's actually start fracturing something.
What happens if we go to Owen Virts because that's the only real option we've got at the moment and
we're going to leave recursive alone.
And in general if you're running a physics simulation recursive can cause you a lot of problems especially
when it comes to things spontaneously exploding.
We don't want that meshed data we may need to tweak this Slider here.
This value which if we hover over it says the gaps for fracture.
So occasioning you need to make the gaps bigger.
And as it says there to give more stable physics that's how you really avoid things exploding if you
start cutting them up into smaller amounts.
Now physics and volu Well that's absolutely fine.
It's going to give all the bits that it breaks into a mass of one.
Now that can be problematic if you got small pieces that weigh the same amount as larger pieces it's
going to look pretty odd especially if you've broken up one object because all of a sudden you've got
a small piece that weighs as much as potentially the whole object to begin with.
That's going to look very odd.
Now when you break things up into individual mesh objects they're all going to have origins and this
make sure this setting that's already tic's recentre make sure that the actual origins are all at the
centre point of all of those objects and will look at making the weights more logical as well in a few
moments.
The scene now this is important.
This next layer thing is through me the first time I started using cell fracture it means that when
we actually run the operation which will do momentarily it puts the way that it's broken it up it puts
all of those objects onto another layer.
In fact it puts them on the next layer.
So in this case we're on layer 1.
They would appear on late too and finally show progress.
I like having the show progress on because it basically means you can see where the blender has crashed
or not.
And this is one of these operations that can either crash or you get a value wrong and it blows everything
to pieces which we don't want and I don't mean blow it to pieces as in the physics engine it shatters
all over the place.
I literally mean I made a mistake earlier whilst recording one of these videos.
And ah.
It would have taken about six hours to actually do the calculations it hadn't locked up blender but
it was going to take quite a while to do and event dealt with something like 2 million polygons in my
scene which is just obscene for a basic cube.
Okay so let's go ahead and just click okay and see what happens.
Okay so let's go to the second layer and let's have a look at the outline as well.
So we've got the cube cell all the way down to seven but it starts at zero here.
So that means we've got eight chunks and we had eight vertices to begin with.
Okay that kind of makes sense.
And now let's just add physics to this without gravity so that's going to save my scene in a second
no gravity and going to apply physics.
Going to make sure selects everything to give us something to add and active to the mall and a save
that in my Am I in my prototypes.
Yes I am.
And I'm going to call this what I call and I call it cell fracture basic cube just so I know what's
going on.
Okay.
So let's run this.
This animation and it doesn't fly apart.
That is something that you should check early on.
If you've made something too detailed or perhaps use recursion.
You may end up with your model flying parts.
Okay so that's a good start.
It's not self destructing on us.
And indeed if we were to lift it up slightly and add a ground plane.
And scale that up and give that passive what we should find is a return gravity back on and just run
that we didn't move it on frame one.
There we go.
It's broken into its various pieces.
Brilliant.
But that's not a very convincing break and yes it was.
I was going to say a Rubik's Cube a Rubik's Cube has more parts than that.
So let's start playing with how many pieces it breaks into.
So I'm just going to reset I'm not going to play anything.
One of the things I do recommend is you pause and rewind right back to the beginning if you start altering
anything.
In fact in this case I'm literally just going to hit the UNDO key several times until we get rid of
all of this lot so back to our basic cube function to redo there.
So I'm back to this position.
Okay space and end so bring up my mesh tools here my fracture tools.
So we've got this source limit here that controls how many pieces it's going to break into.
So if I set that down to six or even let's say five let's go for five pieces.
I when I click okay here I'd expect to see here we go zero to four.
Perfect.
And of course when we have a closer look at the object we can see it's been broken into different shaped
pieces.
Actually I quite like that.
So you can play with that and get some decent breakages.
Now there are some other options that you can do around here so let's just undo that back to before.
There we go.
I'm going to hit space and enter again.
Let's have a look at the other options.
We can do so we can actually include recursion and I'll show you what that does.
Now one of my favourite bits with this is you can set it around the cursor for instance and I'm going
to turn up recursion to maybe four or five.
Don't go nuts with this.
If you do it will take ages to calculate.
And here we have the like likelihood of recursion so we can up that a little as well if you want.
Now there is a clamp here.
So it does stop at a certain point because here we go.
It prevents it reaching an s silly amount so won't recur go back down its chain basically more than
a 250 times in this case.
So let's just click okay and we can see that it breaks apart and it goes into each beer and breaks those
apart individually.
Now blender can take a while to do this and I would recommend just being careful when you do do it.
So let's go to Layer 2 and see what's happened.
Okay so it's broken a lot around the base and less around the top.
Brilliant.
So what that means now is that it will smash up into smaller pieces around it.
Let's have a look at the settings I have because I had it set cursor here closer to the cursor means
that because the cursor was on the very bottom where it actually doesn't matter where the cursor was.
Just close once of a cursor get broken up into smaller pieces.
I could have gone for random small big or far away from the cursor and the press Escape.
Never Press.
Okay if you've already got a lot of objects easy and I'm gonna add active to all of these pieces while
I've got them Selecta them asking to turn off gravity and see if it's going to blow itself apart.
Hey it looks like it's not going to that's great.
I'm now going to reset the animation pull it up and actually add in that ground plane that we had before
scaled that up hit passive on that so it's got something to impact under the term gravity back on.
And now we'll see when it hits the ground it breaks into lots of small pieces.
How cool is that.
I absolutely love playing with this tool.
And of course it was the animations playing let's say we turn gravity off and rewind.
We can grab a piece and start knocking it apart so you can get in sort of a feeling of how this is going
to work.
And if you let it ah missed it.
I'm not sure I can impact from here.
That's one of the dangers.
By the way of annamay moving it whilst it's animating I've accidentally moved this particular sub part
of it to another location so I'm just going to have to undo until it's back into the right place and
hopefully there we go.
Unfortunately you can't wave something about when it's there when it's not being animated so we just
press play here.
It looks like in this case recursion has not caused it to blow itself apart.
Occasionally it does.
Do be careful when you're using it.
Okay.
Now that's got us all set up now ready for a challenge and your challenge is exploding bricks.
So in your wall animation have some of your brick work break into much smaller pieces and ideally they
should break up when the projectile hits the wall.
Pause a video now and give that a go.
Okay guys welcome back.
Let's go explodes and bricks into some much smaller pieces.
Over in blender.
Okay so I've gone ahead here and opened up my wall and let's just make sure it's still behaving as would
expect it to boom straight through.
Okay.
Some scan of these select everything here.
Go back to the very beginning frame and whizzed round to the front and do some selecting.
Now you do need to be careful in selecting because we can actually see this object for projectile through
the wall.
What we don't want to accidentally do is end up grabbing that as well and do whatever we want to do
to fracturing this wall so that by accident.
So I'm going to hide my projectile for the moment completely from the scene.
I'm going to hold down control as I do that to hide the forcefield that's attached to it as well.
Now one of the things that I noticed when I was round is one of these bricks is a bit awkwardly placed.
I must have moved it when running a physics simulation.
Someone is going to pop it roughly back in the right place and on and from here start selecting my objects.
So as the projectile comes in is going to knock several of these.
I am absolutely flying.
I'll have to keep it particularly simple I don't want to get to air exaggerated at this point.
I want to see proof of concept if you will a one to make sure it works before going crazy with it.
So the first thing I need to do is fracture those and I'm going to do a simple fracture I'm not going
to do any recursive or anything along those lines.
So I want to make sure the whole process works.
So I'm going to go ahead of select the ones I want to break into multiple bits.
And I'm going to click okay and that should give us absolutely loads of little bits.
Just wait for it to go through and once it's finished doing that's what I'll do is I'll apply all of
those which should now be on lyoto.
Perfect and select them all these select to reselect that make sure that anything else that's selected.
In fact we have still got something selected on another layer.
So let's just make sure there's nothing selected there and just these are selected.
I'm going to click to put air the 3D cursor near here and found an ego shift in S and cursed selected
to put it smack bang in the middle.
And I'm going to add an empty.
Doesn't matter what type of intimate's come to use a plain sison and a name that's broken bricks.
So I have some control broken bridges.
Okay.
That's how I feel some titans.
Okay broken bricks.
And finally I'm going to select everything broken bricks should now be the active.
Yes is control and pay.
We're going to parents all of these broken bricks and that also means I can select them quickly as well.
Now we're going to be applying physics Savvis we might as well borrow the physics we've already got
set up so I'm going to select one of the other bricks and go to the physics selection and just go to.
Let's see what we've got here.
Copy from active that's why once and now they got physics applied to them.
Let's just run this animation and see what happens.
Okay.
They blow each other apart.
The main reason for that is we've still got bricks inside bricks.
So all of these extra bricks that we have are inside the original bricks causing this problem.
So we need to go through and literally delete the ones we don't want anymore.
So looking at what we've got here I'm just going to skip between the two with the one and two keys.
And I think I'm just going to have to manually select.
Hoover as well.
So there we go those are those ones gone I hope I haven't deleted anything else which should mean now
we can rebuild the wall.
Excellent.
And going to unhide that projectile and just see how it's working.
This is being lean about it this is making sure that the actual scene itself is working at each individual
stage.
Okay so that is working it's not all the forcefield apply to it at the moment but that's fine.
We can add it in by moving them to the other layer and we can do that straight away.
But it is falling apart so that one problem at a time it's not being affected by the forcefield.
We can do later on but it falling apart straight away.
To be expected of course is not that great so we want it to fall apart on our command.
So we need to keep that in some select one of these objects and just make sure it works with one of
them to begin with.
So we want to in the rigid body toggle animation on and off much work like we did with the projectile.
So I'm going to toggle the animated here.
We want it on initially at frayne's 0 saying turn it on and press won over the animated a lot of go
surfing it was frame 20 so were impax am going to go to 22 and actually key in the factor that's turned
off.
And what we should get there is this bit staying still and then being knocked out at 20 to perfect.
That's exactly what I want.
Now we need a copy that's everything else something to select everything else with the a key.
And now we need to make links to the animation data so controlled an L animation data and what we should
find is that now stay still and then it gets knocked through and crumbles.
Perfect is not the best looking at the moment.
So the final thing here I say final There's always another thing to be done afterwards.
The penultimate perhaps I don't know.
So we're going to move all of those to layer 1.
Now that they're on layer 1 they should also be affected by that forcefield.
So let's rewind press play.
Oh but something weird is happening there.
I'm just gonna save my work and reload my screen reverts.
I don't know.
There we go.
Boom.
Excellent.
That's it.
There were I couldn't have asked for anything better there perhaps a smaller explosion since there.
If we imagine where the camera's going to be most of those bricks.
Well at disappearing off.
So again a little bit of refinement at this stage just to get more or less what you want.
A couple of bricks that seem to be staying still and they stay completely still.
There are a couple of bricks here that seem to have completely given up with being part of our world.
Let's just watch this.
Boom it's coming in.
So we just need to go into that forcefield and the animation for the forcefield and perhaps not have
it here it goes from zero to 5000 back down to zero.
Sorry 50000.
So let's lower that down to 20000.
Remember to keep it in other ways it won't work and just test it.
And again do little things at a time.
And that is much better.
You gather up as it goes apart yes these broken bricks aren't the best looking in the world.
I'm going to increase the frame count here to 100 to watch everything collapse and I'm going to sort
out these other bricks in my own time.
You get the gist of it.
How are you.
How are you guys getting on with your explosive walls and bits breaking into various pieces.
We'll be having fun with this I'm having lots of fun.
Please do.
Share your work over on the forum I love seeing what you guys come up with.
And I will see you in the next lecture.