Game Development Community

dev|Pro Game Development Curriculum

AFX and Bottle Rocket Science

by Jeff Faust · 07/04/2007 (12:07 pm) · 31 comments

arcane-fx.com/visuals/july4_fireworks/fireworks_01.jpg
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.)

arcane-fx.com/visuals/july4_fireworks/fireworks_02.jpg
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!

arcane-fx.com/visuals/july4_fireworks/fireworks_03.jpg

About the author

Jeff Faust creates special effects indie middleware and games for Faust Logic. --- Blog: Effectronica.com --- Twitter: @FaustLogic

Page«First 1 2 Next»
#21
07/05/2007 (1:32 am)
Great! Stunning as ever Jeff!
#22
07/05/2007 (2:18 am)
that looks sweet!!!
#23
07/05/2007 (6:33 am)
All of your .plans are awesome.
Especially the ones involving explosions and fire!
#24
07/05/2007 (8:00 am)
WEll done guy!!
#25
07/05/2007 (10:13 am)
@ Big Papa -- In current form these effects are really overboard, but once we get the tech under control, it should be feasible to set up a live server, distribute a client, and have a bunch of people join us for a live fireworks show. Consider that a working goal, at least.

@ Clint Herron -- I uploaded the video to YouTube and the results were so awful that I immediately deleted it. It wasn't just bad, it looked like this video was a worst-case for YouTube's compression technology. It really could not handle it.

@ Dave Young -- Nice link, but I'm pretty sure that was already Matt's primary source. I think he's mined it for everything valuable and he's looking for something that goes even deeper.

@ Michael Perry -- I hope Ed's not really pissed...

@ Kenneth Holst -- I don't think Matt's finished yet. I think he wants to flush out the fireworks repertoire with a few more types.

@ Edward -- Some of the tech here is brand new and still somewhat wild. The datablock resources used just to represent this short display were enormous. We actually had to devise some scripting techniques to procedurally define datablocks and assemble them into AFX effectrons. I'm pretty sure the individual effect count runs into the several thousands. To get it all under control, we will probably have to extend the datablock system to allow the creation of non-networked datablocks copied or derived from other datablocks. Hopefully the ForceSet feature will make it into the next version of AFX. If Matt continues to develop more species of fireworks, we may consider offering some kind of fireworks pack.
#26
07/05/2007 (10:47 am)
Very cool Jeff! We have been really excited about the capabilities of AFX internally at GG, and seeing this display just makes it that much more clear how powerful your system is!
#27
07/05/2007 (2:15 pm)
Hehe not pissed, Michael's comments were referring to my plans to do a similar 'Fireworks pack' using AFX effects but it never happened, I dropped the ball on that one. Glad to see great minds do indeed think alike, and may I say those effects look mighty fine! Good job!
#28
07/05/2007 (4:01 pm)
Very nice. Will this be a plugin for the AFX pack? I'd love to see if AFX or Torque can do some of the fireballs created for film for space explosions such as in Star Wars. Essentially these are controlled fireworks filmed from underneath with a high speed camera. If someone could do that it would be a great incentive to buy the AFX pack or a stand alone pack.
#30
07/05/2007 (11:18 pm)
Very F'N Cool!
#31
07/06/2007 (4:45 am)
Very, very cool! At least Kork looks like he enjoyed himself! :D
Page«First 1 2 Next»