AFX and Bottle Rocket Science
by Jeff Faust · 07/04/2007 (12:07 pm) · 31 comments

Today is the 4th of July, Independence Day here in the United States, where a big part of the celebration is fireworks. A few weeks ago, with the 4th holiday approaching, Matthew Durante and I decided to see what kind of fireworks effects we could come up with using AFX. Here are the results in movie form and some images:
Fireworks Movie (AVI) <4mb> -- silent
Fireworks Movie (QuickTime) <3.75mb> -- silent
At first we attempted to pull this off in stock AFX 1.0.2. I got some good results attaching particle emitters to multiple debris effects, and Matt made some nice bursts using particles on paths, but we quickly realized that we lacked a good flexible way of moving effects in a ballistic fashion.
Instead of creating a monolithic fireworks effect, we wanted to find a way to harness the kind of physical forces at work in real fireworks and apply them to the movement of any AFX component effect. To do this, Matt had a clever idea for something we call ForceSets. In much the same way that AFX assembles multiple component effects into a bigger compound effect, it also groups individual forces into one or more ForceSets. From there, you can link other AFX effects to specific ForceSets which will then influence their motion in a physical way. You can think of each ForceSet as a separate little universe of forces which can fade in and out over time. Assigning an effect to a ForceSet causes its movement to be steered by the collection of forces in the ForceSet. (We are just using simple linear forces, nothing rotational, and no collision response, but this is enough for decent fireworks.)

With a prototype implementation of ForceSets in place, Matt went off and researched fireworks and designed the fireworks display captured in the movie. What you see here is mostly achieved using stock AFX 1.0.2 with the addition of ForceSets, however, the results are still highly experimental. As a whole the complexity of the fireworks display seriously pushes the software to the limits and beyond.
From here, we'll use what we've learned from this experiment to implement production-ready ForceSets to be included in a future update of AFX. We think the ForceSets will turn out to be very useful in a wide variety of effects beyond fireworks.
Happy 4th of July!

About the author
Jeff Faust creates special effects indie middleware and games for Faust Logic. --- Blog: Effectronica.com --- Twitter: @FaustLogic
#2
07/04/2007 (12:21 pm)
Jeff, very very slick ... I think I'll stay in tonight and just play the demo videos on the big screen ...
#3
07/04/2007 (12:35 pm)
This is so cool! It would be awesome if we could log in to your world and view the fireworks live.
#4
Incidentally if there are any professional pyrotechnicians here who know a definitive (and thorough) refererence for classifications of professional fireworks, I'd appreciate the link...
07/04/2007 (12:51 pm)
Woohoo!Incidentally if there are any professional pyrotechnicians here who know a definitive (and thorough) refererence for classifications of professional fireworks, I'd appreciate the link...
#5
07/04/2007 (1:00 pm)
Very cool. Out of convenience, any chance we could see this on YouTube?
#6
07/04/2007 (1:04 pm)
wow, very impressive effects! now I don't even feel the need to see the real thing later tonight.
#7
07/04/2007 (1:13 pm)
Very Nice! Happy 4th to everyone.
#8
07/04/2007 (1:14 pm)
Haha, that is so awesome!
#10
07/04/2007 (1:49 pm)
Stunning as ever Jeff!
#11
07/04/2007 (1:55 pm)
NICE
#12
07/04/2007 (2:10 pm)
Wow, this is awesome. :)
#14
Here is a very good classification listing for US fireworks:
en.wikipedia.org/wiki/Firework
07/04/2007 (4:13 pm)
Wow!!Here is a very good classification listing for US fireworks:
en.wikipedia.org/wiki/Firework
#15
07/04/2007 (4:21 pm)
Holy poop on a stick that is awesome......Ed Johnson is gonna be sooooooo pissed.... =)
#16
you should find a way to put the spinners in there too.. the ones that shoot off of the big explosion in a wiggly fashion
too cool Jeff.. !
07/04/2007 (4:41 pm)
holy cow that is sweet... you should find a way to put the spinners in there too.. the ones that shoot off of the big explosion in a wiggly fashion
too cool Jeff.. !
#18
Im geared to see the next big pack and the work you guys have been up too.
07/04/2007 (8:32 pm)
when will we get this awesomeness released to the masses :)Im geared to see the next big pack and the work you guys have been up too.
#19
07/04/2007 (8:38 pm)
That was great. I was almost sad I didn't get to see fireworks this year but that made it all better. Great work guys it looks amazing. 
Torque Owner Johnny Hill