Free 3d tutorials: from 3d tips & tricks to advanced 3D software tutorials in 4 seconds.

Creating fire in a Particles Editor

“Creating fire in a Particles Editor ” by Evgeni Bulatov
Part 3. Export and integration into a game.
After the fire has been created it has to be integrated into a game. The simplest way in this case is to render the fire to a frame-by-frame animation and looping it after that. Then you’ll be able to play this animation as sprites in any place of the game.
Unfortunately the nature of such editors doesn’t allow to make an infinite loop process. We’ll have to cheat :). But first we have to get the sequence of frames. There is nothing difficult about it. Have a look at the export window of Magic Particles:

Choose the frame size, usually multiple of power of 2 (for example 128, 256, 512), file type (any graphic format except lossy compression, alpha-channel not needed) and hit Export .
You’ll get too many frames, you’ll need to select a small section, 1-3 seconds long. It’ll be quite enough.
To create a smooth transition I used Adobe After Effects. Not going into detail I’ll just show you a couple of snapshots:

I imported the frame sequence into After Effects and copied the animation as a second layer. After that I “cut” the tracks in the middle and moved them so that one track ended in the place of the cut and the other began. I shortened the composition time to make the tracks overlap. And then I adjusted the opacity of the upper layer so that it changed from 0% to 100% from A to B.
After this operation the transition becomes almost unnoticeable. We only have to render the composition into a frame sequence and see how it works in the game.
Another way to export fire into a game is to use a developer version of the program Magic Particles (Dev). This version has an API to export the special effects into the game engine at a level of processing particles. The example of API use you can download here:
http://www.astralax.com/downloader.php?file=programm/demo_api.zip
http://www.astralax.com/downloader.php?file=programm/matrix.zip
Conclusion
Experimenting with your results you can make the fire more fierce as a forest fire or calm as a gas stove fire. You can make it brighter, dimmer, quicker or slower. The real fire is sometimes very different and having toyed with the parameters you can make it the way you wish.
In conclusion I would like to thank Yasha a.k.a Snork, Alexei a.k.a. Odin_KG and Masha Zaitseva for the help in the lesson creation.
With best wishes Evgeni Vendigo Bulatov.
The translation from Russian by Grigori Bulatov.
(c) Evgeni Bulatov, http://xdevs.ru/
     

Pages: 1 2 3 4

One comment

  1. edgar rivera /

    wow cool

Leave a Reply