Random Explosions And Animated Particles

4 posts Page 1 of 1
Posts: 182
Joined: Tue Feb 03, 2015 10:30 pm
by Steve_Yorkshire » Thu Apr 14, 2016 12:24 am
After having spent an inordinate amount of March as some sort of filthy casual nodev type, it was time to fill out the tax return and get back to cracking on with yesdev.


The stock way Torque3DMIT deals with projectile impact is to spawn an explosion, which is made up of a 3D animated object and/or particle effects with the option for sub-explosions. All well and good, but this does not really generate much variation. I decided to expand this into multiple explosion datablocks that would be choosen between randomly. I was slightly confused about how to pack/unpack using an array list of numbered keys, and whilst I didn't receive any build errors I could not get it to work in practice so chose a thoroughly less elegant solution. I simply listed 3 extra explosions for the projectile, had the engine check whether the datablocks were kosher, and then randomise which one to use, falling back on to the default explosion if problems occured.

And here it is in initial testing. Wooo! Pretty colours!

I had also been practicing using animation with my particles via videoing fire and smoke and then creating a sprite sheet from the stills. This looks so much better than having static particles, allowing for flickering flames and billowing smoke. Animating particles not only looks good with all stuff moving but they save on performance by allowing you to use a single particle for the effect rather than multiples ones to create the illusion of movement or volume.

Since previously playing around with the idea of animating particles using sprite sheets, I had had my attention brought to a particle generator called TimeLineFX. For a poxy 30 of Her Majesty's British Quids (that's like 45 Seditiously Ungrateful Former Colonial Bucks or something like 5 trillion Emus) it was well worth the cash. It features a huge array of demo libraries and vast options for creating and exporting sprites sheets of animated particles.

To keep overhead low, I decided to use quick spawning, single particles which had a sprite sheet for weapon impact/explosions. By combing multiple emitters into an explosion constisting of starting impact flash, blast shockwave, ending sparks, all of which are basically a single particle playing through their animation and then deleting. Couple this with a small number of additional multiple particles for a puff of smoke and a few random sparks to add depth, and then make four of them as a variation on a theme and it gives a very nice selection of explosions.

I also took the concept of using a low overhead, singular animated particle to replace the build up to my 3D model of an energy blast from the offensive powerup named "Super Orbital Laser". Instead of having a fast growing glow with multiple balls of light getting sucked into it, I could use a single sprite sheet. End explosion still needs work but the 2 second buildup was what I was after.

And here's a test with 4 different types of glow and blends, though the two main versions are close enough for it to be almost impossible to tell.

So, next up, more of the same, more fancy animated explosions, more fixing errors with various special attacks which don't fire when triggered. More of the day in day out problems and conundrums of indiedev.
Posts: 38
Joined: Sat Oct 03, 2015 7:26 am
by MilkywayM16 » Thu Apr 14, 2016 3:05 am
That's awesome and the effects look really nice! To be honest, I had no idea that T3D supported animated particles. That being said, I've also never really played around with the particle editor in depth so that might be my fault. Is there any special/different process needed to use animated particles instead of the default sprites?
Steering Committee
Steering Committee
Posts: 646
Joined: Tue Feb 03, 2015 9:49 pm
by JeffR » Fri Apr 15, 2016 2:05 am
Lookin' right proper sexy there!

Keep up the excellent work :)
Dwarf King
Posts: 145
Joined: Thu Feb 05, 2015 7:20 pm
by Dwarf King » Sat Apr 16, 2016 6:29 am
User avatar

you just made me spend like 30 squids of her majesty's currency as you like to say. I instantly downloaded all the nice libs as well. This tool is UTTERLY awesome! :mrgreen:
4 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest