Detonator Progress Point 3

This version features better particle growth thanks to a tip on particle Size Grow parameter animation courtesy of Rune at Unity. I was having a real problem getting the behavior I was looking for out of the Size Grow parameter, and it turns out that if you alter that parameter over time, you can get the exponential growth with damping that’s needed for an explosion.

I also converted the textures to grayscale so that they can be color shifted by the system. It takes a little bit of the richness out, but I think we can get it back later. The payoff in color customizability will definitely be worth it.

Detonator Progress Point 2

Well I got some good feedback from the last progress snapshot. We have a mailing list for the various folks to talk and a few of the guys, Rune, Jonas, and Joachim all chimed in with their thoughts on the first go…

So for this update I worked on making the explosions expand better, tweaked some of the color to make things more varied, and added a cool feature where the explosion will automatically ignite any object that it hits through the physics system (thanks Rune for the idea). I also adjusted the background so the smoke is more visible. Also note that the explosion is currently about 10m in diameter… thus the floatiness of the physics. In the end it will be scalable to different sizes, but I figured if we’re gonna start with anything, we’ll start big. :)

Unity Detonator: Progress

Well I’ve spent a few nights now working on Detonator. So far I’ve been getting the feel of the Unity particle system and seeing where its strengths are. Before I go to bed tonight, here’s a little demo scene to kick things off. Nothing parametric yet, but we’ve got to have a nice base effect to work with, right?

Besides the basic particle emitters, there’s a light and a rigidbody explosive force that get spawned. The look is really a first pass, just trying to get all the pieces in. I still need to add chunks flying out with trails, some beams, and get all the particles sorting right. There’s also a bit of flicker between the smoke and other particles that should be worked out. Still, I was happy to see the performance is good even on my old Macbook.

I’ve been thinking about animated textures too. Not sure if they’ll be necessary, but I’d like to try them out. If anyone knows of a tool to convert a movie to a Unity animated texture, let me know. Iterating on that seems like a pain without a good tool.


Unity Summer of Code – Detonator

I wrote a proposal for a parametric explosion system for the Unity Summer of Code… and it was one of four accepted out of over a hundred! I’m excited to be working with Unity engineer Jonas Echterhoff as my mentor – and I’ll definitely need his help. Here’s the announcement:

And here’s the proposal:


Great explosions can make a game. Bad explosions can ruin a game. As important as they are, they are difficult to do well because they are composed of art and complex behavior that’s not easily consolidated into a single object. Explosions also have a high degree of randomness, yet within a domain that is not easily described and is often violated.

That said, Unity developers of all types could make great use of a system that allows for efficient creation and iteration of explosion effects.

For artists, the system will provide a means to harness and iterate on complex behavior that is normally hidden behind coding barriers. Artists can think in terms of “size” and “intensity” of the explosion as a whole, while also drilling down to tweak details. Detonator is more than just a collection of particle emitters.

For programmers, creating an explosion with great visual quality will no longer hinge on finding pre-existing particle libraries or an artist friend. Detonator will provide solid results from the start. It will also allow easier binding of game logic to explosion parameters by providing meta-parameters that combine several emitters, models, lights, into a single “Intensity” or “Duration” value.


  1. Allow non FX-specialists to easily experiment with different looks for their explosions.
  2. Tie explosion parameters to game events and parameters. ie – have one explosion for damage, one for destruction, all calling the same script but based on remaining hitpoints of the gameobject
  3. Tie explosion physics to global parameters such as gravity and wind so they can be tweaked and altered at run time in one place.
  4. Allow the creation of named explosion presets (prefabs) – this will enable code to spawn type of explosion based on incoming weapon
  5. Create a method where the explosion render complexity scales according to frame rate, total particle count, priority, etc. and provide global and per prefab complexity values for easily tying to code.
  6. Let the developer decompose the explosion into its component pieces if he wants to use the system as simply a baseline for further art.

As part of the process of building Detonator, we’ll define what an explosion is and create taxonomy for all of its components. The system will consist of 4 layers.

  1. Layer 0 – The raw gameobjects and scripts
  2. Layer 1 – Per component parameters
  3. Layer 2 – Per explosion parameters
  4. Layer 3 – Detonator System wide parameters

Example Layer 0:

  1. Particle Emitters
  2. Scripts
  3. Lights
  4. Models
  5. Animations

Example Layer 1:

  1. Flash – A screen space flash
    1. Color
    2. Duration
    3. Size
  2. Screen Shake
    1. Intensity
    2. Period
    3. Seed
  3. Sparks – Ignited, small debris that shoots straight out
    1. Number
    2. Color
    3. Size
    4. Length
  4. Debris – Larger chunks that can trail a particle effect
    1. Number
    2. Model(s)
    3. Size
    4. Color
    5. Trailing Particle
  5. Shockwave – A scaling model (sphere, cylinder)
    1. Size
    2. Duration
    3. Color
  6. Light – A point light that animates with the duration of the explosion
    1. Intensity
    2. Radius
    3. Color
  7. Fire – The main body of the explosion
    1. Texture
    2. Color
    3. Size
    4. Duration
    5. Pieces
  8. Smoke
    1. Texture
    2. Color
    3. Size

Example Layer 2:

  1. Size
  2. Intensity
  3. Smokiness
  4. Gravity
  5. Chunkiness
  6. Complexity

Example Layer 3:

  1. Gravity
  2. Wind
  3. Complexity

So, follow along. With any luck Detonator will turn into something the community will make good use of.

Female Commando