September 17 2009Summer of Code: Detonator Framework Released!
This blog post is written by Ben Throop who has been working on a Detonator framework to generate great-looking explosions in Unity games. The project was one of the four selected projects that were selected for the Unity Summer of Code and the first to be wrapped up and released.

Explosions are a really common element in games, but they can be difficult to create. Starting from scratch can be time consuming and requires expertise with particle systems, lighting, texturing, and animation. Tweaking existing effects to fit a game can also be a challenge because its difficult to change the size or color of a set of particle emitters in unison. Making explosions should be fun, fast, and rewarding instead. That’s why Detonator was created.
Detonator for Unity makes incorporating good explosions easier for all types of developers. At its most basic level, Detonator is a component that can be attached to any GameObject. At runtime it then creates an explosion with configurable color, size, duration, detail, and sub-elements like sparks, smoke, and shockwaves. For those that want to dig in a bit, Detonator is an explosion framework. Customize each sub-component or create new ones if you want to write a bit of code. Tweak detail levels with a single parameter and save your favorites to prefabs… or dynamically link color to damage type and size to damage amount!
Test out the explosions generated with Detonator for yourself below. Click to start the webplayer:
If you’re doing explosions in your Unity game, Detonator can probably help you create good looking, scalable effects in less time!
Get the Detonator Parametric Explosion Framework from our Resources section and populate your own game with spectacular explosions. If you’d like to follow the continued development, check out Ben’s site at http://variancetheory.com.

Martin Schultz said on September 17th, 2009 at 2:29 pm:
Congrats, awesome stuff Ben!!!
Chaos said on September 17th, 2009 at 3:19 pm:
The sample scene does not work when built, and crashes unity when i try to run it. I’m on Windows
Raymond L. said on September 17th, 2009 at 3:23 pm:
Drat! There is some sort of error with the package, it won’t download into my project!!!!
Please fix this!!!!
Raymond L. said on September 17th, 2009 at 3:24 pm:
Oops! Fixed the problem.
Ben Throop said on September 17th, 2009 at 3:36 pm:
@Chaos – Detonator was actually developed on Windows so it works on at least 1 machine.
What are your system specs and Unity version?
Mike S. said on September 17th, 2009 at 3:56 pm:
Should this work on the Mac? When I try to play the test scene, I get a series of NullReferenceExceptions for any explosions I try to make? I’m on the latest rev of Unity Indie.
Ben Throop said on September 17th, 2009 at 4:43 pm:
@MikeS – Yep, does work on Mac (I also tested on a Macbook). However, the default explosion in the test scene Detonator-Insanity creates a Heatwave which uses a shader that I believe is Unity Pro only. That might be what’s doing that. The Heatwave is the only thing that is Pro only… everything else should work with Indie.
If you create a Detonator from scratch it won’t use the heatwave, and I’d guess that the NullRef asserts won’t show up.
Phil Thorn said on September 17th, 2009 at 4:44 pm:
Works on Unity Pro Mac here. Nice job Ben!
Ben Throop said on September 17th, 2009 at 5:03 pm:
Yeah if anyone has issues and needs immediate attention, hit me up on Twitter… @benimaru
Vasco C, said on September 17th, 2009 at 8:56 pm:
Fantastic work!
I really appreciate that this works great with Indie too – as long as you remember to get rid of the heatwave in import
Thanks!
mongol said on September 17th, 2009 at 9:39 pm:
Really nice stuff, at least in your video
I am sure it will get fixed, and then it will bring endless and mindless joy to all the explosion fanatics out there.
It crashes on my Unity 2.5 Indie on Windows.
The scene loads and there are few errors, 2 related to the shader you mentioned, and the rest to some deprecated function calls.
Everything then crashes after I click in the scene.
— at lines 47, 48, 57, 65 ———————————————–
Assets/Textures/Standard Assets/Camera Scripts/MouseLook.cs(47,61): warning CS0618: `UnityEngine.Quaternion.AxisAngle(UnityEngine.Vector3, float)’ is obsolete: `Use Quaternion.AngleAxis instead. This function was deprecated because it uses radians instad of degrees’
— at line 33 ———————————————–
Assets/Textures/Standard Assets/Camera Scripts/MouseOrbit.js(33,35): BCW0012: WARNING: ‘UnityEngine.Quaternion.EulerAngles(float, float, float)’ is obsolete. Use Quaternion.Euler instead. This function was deprecated because it uses radians instad of degrees
— at line 47 ———————————————–
Assets/Textures/Standard Assets/Camera Scripts/SmoothFollow.js(47,38): BCW0012: WARNING: ‘UnityEngine.Quaternion.EulerAngles(float, float, float)’ is obsolete. Use Quaternion.Euler instead. This function was deprecated because it uses radians instad of degrees
Raymond L. said on September 17th, 2009 at 9:41 pm:
My first test worked, but with all the other projects I added the package to, it wouldn’t work! Even in the test scene! I click, and there isn’t an explosion. And when I create my own, the same thing happens!!!
Raymond L. said on September 17th, 2009 at 9:44 pm:
DetonatorSound.Update () (at Assets/Detonator/System/DetonatorSound.cs:27)
That is what’s stopping my console.
Ben Throop said on September 18th, 2009 at 4:02 am:
OK thanks to all for the bug reports and apologies for difficulties with Unity Indie… I’ll get it worked out and we’ll repost a package with fixes.
Chuck B said on September 18th, 2009 at 7:58 am:
Looks cool. Will it work in Unity IPhone?
Daniel Hughes said on September 18th, 2009 at 12:04 pm:
I would live to play with this if only it worked on linux…..
Raymond L. said on September 18th, 2009 at 1:03 pm:
Please tell us when you’ll repost that package! I’m anxious to us your explosions in my game!
Benoit FOULETIER said on September 18th, 2009 at 6:25 pm:
+1: does it work on iPhone? (no generics)
If yes, how fast is it? If not, do you think it’s realistic to port it? (in terms of performance)
Kudos btw, looks awesome!
Doug Smith said on September 19th, 2009 at 7:29 pm:
Phenomenal work!
I especially enjoy the MushroomCloud.
Thanks for all your hard work.
We won’t even need to change out our character placeholders, with explosions like that, who cares.
Kev said on September 20th, 2009 at 9:16 pm:
Doesnt work….
Ben Throop said on September 21st, 2009 at 3:27 pm:
It was not designed for iPhone and I haven’t tried it myself. Way too many draw calls to be usable most of the time, but it’s possible that the Detonator-Simple prefab might work alright since it’s only one texture for all pieces.
To make it iPhone friendly in the future, I want to add a feature to Detonator where it will render its explosion to an animated texture in some kind of wizard or editor. If anyone wants to help with that, drop me a line.
Detonator and the Unity Summer of Code | Groundswell Games said on September 22nd, 2009 at 4:12 am:
[...] For even more info and a sample scene to play around in, read the announcement post on the Unity Technologies blog. [...]
Multiplayer and Explosions « RECT in Motion said on September 22nd, 2009 at 4:26 pm:
[...] was to create packages for Unity developers. Two really spectacular packages came from it. One is Detonator and it creates parametric explosions in Unity. Quite impressive! The other is a Gem shader which [...]
Ben Throop said on September 24th, 2009 at 3:38 pm:
http://unity3d.com/support/resources/unity-extensions/explosion-framework
Now has v1.02 with all Indie issues resolved. Feel free to post here if you find any others.
Ashkan said on September 27th, 2009 at 8:12 pm:
hi ben
you did a really nice job
Raymond L. said on October 3rd, 2009 at 4:58 pm:
Whoa. It works! Now if i can just get a good explosion…
Brendang said on October 15th, 2009 at 8:20 pm:
What happened to the projects selected for Summer of Code? Actually I thought I asked this 2 weeks ago here. Somehow my post seemed to vanish… Curious.
Raymond L. said on October 17th, 2009 at 1:47 pm:
I think they are doing it but they are going to but all the others in the new Unity, instead of a package. So that may take some time. They are also probably slacking off a little now because the deadline is out there and they just have to stick it in the new Unity, which won’t becoming for a couple of months. *-)