
Wanna blow something away? Here is your chance to do it in style!
See how it looks here and here
You can discuss this tutorial on our forum!
Introduction to Blastcode
Blastcode is very powerful plugin used for shattering effects. This tutorial will quickly cover some of the basic concepts in blastcode.
First load plugin from plugin manager. Blastcode menu shall appear in the menu bar.
So, first thing you need to know is that blastcode works primary with nurbs surfaces. If you want to use polygons, you need to fracture mesh manually and then use them as glue objects. So first thing would be building objects from curves. I used simple cv curve, just extruded it. Also I created roof also using nurbs curves and loft.



Now, fun part. Go to blast code/blast window. Wow. I know I know… Looks like Nasa spaceship. No need to panic. Select surface you want to shatter and click new control button. This will create layer for that objects. Every object in blastcode has its own layer. Think of them as something like collision layers.

Apply lambert1 to object since this operation discontents the shader group. Also click on rigid solver and attach rigid solver. In blastcode there are two solvers for calculating debris collision. One is particle solver which is faster, but not so accurate. Second is rigid, which is slower, but very accurate. So, we will use rigid solver in this example.

On explosive tab click locator explosive. This will create exsplosive1. It’s kind of field which deforms surfaces you checked below.

In explosive options lower magnitude and velocity. Also change start if you want explosion to activate later. Notice that explosion comes from one point. If you want it to come from far away, like nuclear shockwave destroying buildings, you can move locator far away, or check use origin flag. Set the point from which you want explosion to come.

Blast wave graph controls how blast moves. Notice that blast goes to maximum, and then lowers a bit. This means that blast wave goes forward, and after it reaches maximum it goes back slightly. You can adjust this to your own needs.

Also notice bend option. It bends surface along axis. You can use that to make building collapses but foundations remain. Also you can notice that surface overlaps with itself. That surface only represents deformation. It just tells how much deformation is there, so the breakable surface, that we will create next will now how to break.

Go to blast window and in damage tab choose create slab. This will create object that looks like brick wall. Assign material to it. Set mesh thickness to define thickness of the wall.

In control tab turn all off to hide deformation surface.

So…

Baam


Well, nothing special yet. All pieces look the same. Set hard quads for mesh type. In fracture option choose fracture map. Size U and V define resolution of the mesh. Be careful not to put this numbers to high. Click to swatch next to fracture map color. Choose fractal. Tweak parameters until you start to see cracks in viewport.

Now it looks better, but it might be too rigid.

In mesh type choose soft quads. Now surface bends before it breaks.



To control how much it needs to bend in order to break adjust debris tensile parameter.

That huge debris was primary debris. If you want to add small debris, check secondary flag in secondary debris attributes. Set snap amt and crack amt, to get debris emitted. Secondary debris use particle solver by default. That’s ok, because they are small and we can consider them as particles. Also in the bottom you can randomize movement of debris a bit.

There are parameters for randomizing movement in primary debris tab also.

So, now hit play and enjoy

Cool eh? In RigidBody tab of blastcode window, hit select solver. This will select current rigid body solver.

Activate gravity and ground plane. You could make field and collision plane, but this way is a bit more accurate, since solver won’t let any object pass ground plane, at any circumstance.

Notice that only primary debris are being affected by gravity and ground plane. That’s because they are handled by rigid body solver. Secondary debris are handled by particle solver. Create poly plane and hit new collision. This will add collision attributes to poly plane. Hit attach collision to connect particles to collision object.

Create gravity field, and hit attach field to connect field to particles.

So, now it shall behave correctly.

Notice how slow playback is. When you are satisfied with simulation you can cache it. To do so, go to blast window, and set blast data handler path.

Set mode to record.

Also set playback looping to once, since It happens that recording starts from beginning when timeline loops.

When recorder set mode to play. Now, only thing left is to create some smoke or explosions. To do so, create fluid container, and select debris and make them emit fluid. Since debris object is created when surface breaks first time, fluid will be emitted only when breaking occurs.




discuss this topic to forum
