Game Development Community

ParticleFX vs Animated spriteFX

by Dale Cannon · in Torque Game Builder · 04/06/2005 (9:25 am) · 11 replies

Couple of questions

1. Is there any performance diffrences in using an animated sprite for an effect as aposed to a particle effect for effects?

2. Is there any requirements or restrictions on size and length(dementions, frames, file size) for an animated sprite sheet.

3. What size would you suggest each frame in the sheet be to keep it at a decent res.? Should I not go over a certain size. Ive seen most frames at 64x64. As an exagerated example what if I wanted the effect to take up most of the screen without looking blown up and pixelated?

#1
04/06/2005 (9:41 am)
Oh one more question.

4. Is there any requirements or restrictions for animated sprites to be used with the particle system?
#2
04/06/2005 (10:39 am)
1. Particles are not affected by physics (IIRC) so if you don't need any interactions with your particles (gravity, collisions and so-on) then particles might be lighter on the system than sprites.

2. Not sure about sheet size, I suspect the individual sprite size will be more important to ensure you don't move into chunked image territory.

3. That will depend entirely on the res you are aiming for, and the camera settings you use.

4. Don't think so, but I've only done basic stuff with animated sprites for particle systems, and in the end I dumped it and just used the sprites.
#3
04/06/2005 (4:58 pm)
Particles arn't affected by gravity at all?
I could easily get by without collisions for now but a lot of nice effects would require they be affected by gravity.
#4
04/07/2005 (12:40 am)
You could fake gravity in the particle editor by messing with the fixedforce_life emitter key/value pairs.

Open the sample player debris effect and take a look at that field and have a fiddle with it to see the different effects.

Maybe that can be made to do what you need.
#5
04/09/2005 (12:12 pm)
@Dale: I finally got to playing with particles and, unless I'm doing something backwards/wrong (a real possibility), there are some performance limitations of particles, probably from overdesign.

@John: I'm pretty sure that particles are supposed to be affected by physics, at least in the final version.

What I'm doing is to create explosions for missiles in a car combat game. I drew up the images and instead of using an image map I'm using a 16-frame animation with 256x256 cells for the emitters. There are three emitters, each using the same animation but with different parameters. A fair number of particles get spewed. With somewhere around four to eight missiles on the screen and detonating in rapid series (possibly as many as four explosions at once) T2D hitched quite noticably.

I've got an NVidia MX4000 Twin and was running full screen across both 1280x1024 displays on a dual 2.0GHz AthlonMP.

Note that I tend to do all of my graphics far in excess of target display size. I figure I can always downsize later, but scaling up doesn't work so well. I could be using 128x128 and probably 64x64 before I would start having upscaling in the engine.
#6
04/09/2005 (12:15 pm)
@Dale: Q #4, you just use a regular imagemap datablock or an animated datablock. For the particle effect I mentioned it is loaded as a cell, 256x256, from a 1024x1024 image. I started with a single image, but I think it looks much better with the animation.
#7
04/09/2005 (4:38 pm)
@ Tim
Yeah I fooled around with it and pritty much doing the same as you with 128x128 cells and about 25 frames and it works very nicely
#8
04/10/2005 (3:34 am)
If you look at the debug-info display, it will show you how many particles you are using at any one time. The particle-engine is very efficient (not overdesigned). The limitation will be your hardware/cpu as you can create massive overdraw/particles quickly and it takes skill to balance the particle-count.

It's certainly easy to create really cool looking effects that are not practical for games. A typical effect should try to limit itself to 50-200 particles maximum but this depends on how many instances you'll be having on the screen at one time. Keeping the texture-size to a minimum is also a big factor in performance.

If you've got 1000-2000 particles then you're really pushing things too far. 500 is a good approximate ceiling.

I found that it's a bit of an artform (and a hard challenge) to get effects down to 10-50 particles but it can be done with the correct art and settings.

Technically, T2D doesn't hitch, your CPU/GPU does. ;)

Good Luck,

- Melv.
#9
04/10/2005 (4:12 am)
@Melv: of course you are right. And as I said, I know I have a tendancy to overdesign. It's always easier to reduce an image size than increase it (at least, from an image quality perspective). I got another really bad hitch tonight showing a friend, but this was with numerous explosions in rapid sequence (each lasts about 0.1 seconds and there was still a lot of overlap).

The short of it is that I need to determine just how small I can make the graphic and do so. Many thanks as well for the pointer for particle count goals. I'm still tweaking, but opinions are positive on the graphics so far. (I would post screen shots in the relevant forum, but I've had a devil of time getting screen shots -- different story though.)
#10
04/10/2005 (9:11 am)
The T2D informal technical overview claims particles can be part of the physics system.

Quote:And that's not all... like all of the standard objects in T2D, particle effects are derivatives of
fxSceneObject2D. That means effects can be manipulated like any other object.. they can be
moved, mounted, scaled, assigned to groups and layers, and even have physics interaction!

I was unable to get it working, but that was in the first couple of days of T2D. Is it possible? What I was never able to do is find a way to assign physical properties to the emitted particles since the lowest level object reference is the emitter.
#11
09/01/2006 (10:57 am)
As a side question to this. Using physics and particles is it possible to create a blowing type effect?

If you had a flame with smoke, and you moved a sprite past it, the tail end of the particle effect would follow the sprite.

Like moving you hand across the top of a candle etc.

any replies would be great :o)