Fracture - Dynamic Destruction System

1211081--49244--$Fracture Logo.png

I have finally got around to releasing my dynamic destruction system on the asset store. This system is ready to be used in your existing projects, and, in it’s basic form, only requires you to drop a script on the objects you wish to destroy at run time, and your done.

Here are some webplayer demos showcasing the power of the tool.

Sticky Zones
Field of Cubes
Tower Stack
Big Cubes

A bit about the algorithm

A predetermined number of random points are generated around the impact point (which is the center of the fracture). The number of points used, ultimately determines the amount of shards generated by the algorithm. The algorithm is voronoi based, so all the shards created will be of convex shape, which is perfect for MeshColliders.

The computation can be performed immediately (see demos : ‘Sticky Zones’ or ‘Tower Stack’, or over X amount of frames (see demos : ‘Big Cubes’ or ‘Field of Cubes’).

What comes with the package

Firstly, you will get the above scenes and all the scripts necessary to start creating your own destructible environments, if that’s not enough, I’ve also some documentation to help you further.

Tools:
Triggers, these are used to trigger the destruction on a particular object. They customize how the object can be destroyed. Whether its from collision impact, bullet hit or explosion damage, Triggers can be tailored to your exact needs in order to help you create than environment that crumbles around you the way you want it to.

Sticky Zones, are used to hold broken fragments in place once an object has been destroyed (see : ‘Sticky Zones’). Imaging shattering a pane of glass in a window frame. Some of the glass might stay in the window frame, sticky zones help you achieve this effect fast!

Special Shaders. In order to keep the cost of the destruction computation to a minimum, I have created a set of custom shaders to be used with the destruction system. These shaders offload the work of UV-ing from the CPU to the GPU, helping parallelize the destruction and ultimately give you more of a performance boost.

Cleanup Tools. Having too many destructible actors flying about can be very costly for the CPU (I am working on a GRB implementation but more about that later :wink: ), so I have included a set of tools to help customize how destructible objects are cleaned up. There are currently two cleanup methods : destroying shards based on a timer and destroying shards based on how long they have been off-screen. Both can be used in conjunction with each other if you wish.

All dynamic fragments are created from a pool, (it’s not nesecary to create this pool in the editor, but I’d recommend it!), which helps with the amount of objects instantiated at run time.

Any way, I hope you enjoy this tool, and if you have any questions please ask! :slight_smile:

Showcase

Want to see your demo here? PM me.

Tutorials
Beginner:
Getting Started:

Convex Fracture:

Intermediate:
Performance Tips:

Advanced:
Structural Simulation:

Asset Store
Fracture - Pro (faster algorithm, with source, and support)
Fracture - LITE (without source)




Might want to fix those links, they start with http//

Thank you :slight_smile:

Might have to buy this, looks like an awesome little tool :slight_smile:
Any chance this works on mobiles?

Amazing work, really impressive.

Cool. Fun to play with. I take it this couldn’t really be applied to an entire game environment, too much physics etc?

Awesome. Depending on how this performs, I might be picking it up. My game needs something like this, if not this very thing. Good work. I hope people continue to make things like this. We need destructible stuffs already Unity! :sunglasses:

I too, am worried about performance. For instance, the tower example is fractured, but in big chunks. What happens as you multiply “pieces”. I’m assuming the limiting factor here is cpu power?

I just read your asset store description, and it says it works only with Unity cubes. Can it work with say a triangular roof made in a separate 3d modeling program?

It’s pretty nice so far. However, I was hoping you would release a demo of a completely destroyable building. Is that possible with your system? Also, do you plan on continuing development?

I doubt this would work on mobile, but I don’t have mobile to test on so I really couldn’t say.
In the future, I plan on releasing an in editor tool that will enable you to pre-fracture geometry in the editor and use that (in conjunction with another script) at run time. I think this would have a much higher chance of working on mobile. :smile:

Thank you!

Yes, currently the real limiting factor is the built in physics, but with the clean up tools I have provided, plus some other ones I have planned for the future :wink: you should be able to work around it. In the mean time, I am working on a GRB simulation to use in conjunction with the fracture toolset, but it would only work with DX11.

Thanks alot! I agree with all that you say, and I will continuing to make destructible stuffs for Unity (or at least until they integrate APEX :wink: )

I have disabled multi generation fracture for this exact reason (damn limiting CPU power).

Yes, this release only works with unity cubes, it wont handle the geometry you mentioned, but you could make a roof from cubes in engine :wink:

I know you have been following my threads for some time, and I’m sorry I haven’t got around to doing this yet. But! This is next on my todo list! Expect a demo shortly (and excuse my crude building model).

Thanks every one for your support!

This looks pretty awesome, however it is not very usefull (atleast for me) if we can not apply it to our own meshes. Building everything out of unity cubes is not only frustrating, but also achieves much worse results.

This is box destruction, it’s just for boxes… It has it’s limitations, but it’s not intended for a fully destructible environment.

Very soon though, I will be replacing box destruction with something else I have been working on. Here’s a demo:
Columns Demo

Although this demo is only using unity cylinders, you can plug your own mesh into it quite easily. It’s already as fast at fracturing boxes as it’s box counterpart.

Hopefully this will suit your needs :smile:

Will you try gibbing as well? (Dismembered body parts).

I haven’t made any plans for it, but it sounds fun! Might give it a shot at some point :slight_smile:

Is it something like this you are after?

1501098--84466--$Destroyed Building.jpg

It’s not quite ready yet, but very soon! :smile:

Here is my latest demo, it includes a very first pass on automatic structural integrity. The system uses physics joints to connect a mesh that is uniformly voronoi decomposed as a preprocess, then the dynamic fracture works on top of that.

The only problem is that the wall looks like it’s made of jelly :mrgreen: FAIL!

Next step is to come up with my own, much simpler, joint system that will give the appearance that walls are solid until they get destroyed.

Here is the demo so you can see for yourself what I’m talking about.
Destructable Wall

Yeah, that’s getting closer to what I was visualizing. However, I’m concerned about using joints though because I tried attempting it before. It was pretty good with just a single building in the scene. But when I tried to apply it to a big airship frame it lagged extremely. I assume similar results would happen if I tried to apply joint destruction to every building in a city. By the way, do you plan on adding a level of detail system to yours?

The cylinder demo is promising as well. They are just to brittle. They need to be much stronger so they dont shatter as easily.

You gave me a renewed interest in using joints for destruction. When I get the time I will do some more test!

The more and more I think about it, the more I realize that solely using the joints unity provides, will never work for this kind of thing. Everything must be an active rigidbody, and that just wont cut it for big scenes.

The system I am currently working on, avoids this problem and will provide a much more realistic approach.

This is just tweaking settings on the objects from the editor. Of course, it’s personal preference.

Don’t, it’s rubbish :smile:

In other news, the new version of this script has just been accepted by the asset store people. It took a while longer than I was expecting, but for those of you with the current version, the upgrade is MUCH needed! :smile:

Here’s a new demo showcasing improvements from the previous one.

Structure Demo

This is sooooo Cool :smile:

This one is way better. However there’s a few problems I saw. First the structure can hold for to long when the area underneath it is destroyed. It should collapse once the support underneath it becomes weak enough. 2nd, when a piece of the structure falls off because the area underneath it is destroyed, it should not shatter before it hits the ground. It should fall off as one big piece. And last is the frame rate. Once the whole building was destroyed, the frame rate was down to 3 fps. A suggestion is to perhaps make the pieces that fell to the ground static? Or maybe just have them fall through the ground and get deleted.

Great work! This is the best destruction I’ve seen for Unity so far. Hopefully it turns out.