iPhone particles performance

I’m cooperating in a project as effect creator but I have no experience with iPhone.
More, I have no iPhone!
So I’m asking to you experienced iPhone freaks WHAT is the limits when using particles on iPhone.
In example, one explosion with 300 triangles is it ok or will the iPhone stick to rendering and drop framerate to 2 fps?

In particular, my concern is about replacing an explosion particles effect with a simple expanding sphere mesh with an animated texture over it.
After all, an explosion of particles is still a single mesh, still will be around 300 triangles but it will look much more volumetric!

So what are you iPhone gurus using about particles on iPhone or do you use them at all?

I’ve used particles a few times (~150 tri’s) without a significant impact, however the rest of the scene was fairly simple.

Prevailing wisdom is to avoid them.

The problem with particles on iOS is that the iGPUs are specifically optimized for opaque shaders, which isn’t what you normally want for particles. If you can deal with the particles actually being squares on-screen that have no blending, then you should be able to have a ton of them. That an option? If not, can you get away with modeling some other very low-poly opaque shape? You can’t use a built-in particle system for that, but you can script them flying around as you like.

Just be aware that if you want this app running in iPad, the problem is ((1024x768)/(480x320)) bigger.

Because of the iPad resolution, fillrate of transparent particles become a bigger problem. The same might happen with the new iPhone.

Thank you everybody for response!

So, the main problem is about transparency… but of course for effects I can’t do without that: try to make some believable thrusters or fire muzzle without transparency! :lol:

Well if you must have blending of some kind, then you’re partially in luck, because for the kinds of things you’re talking about, additive should do fine. Use additive instead of alpha blending and you’ll increase performance somewhat. Your textures will look better, too, because you get to use all the bits for RGB instead of RGB and A.

Yes most of these effects are in additive / soft additive shader, I just have some missiles trail that use blend but they are not particles, just Unity trail functions.

OK but, definitely, what is the range of polys for a particle effect on the iPhone?
In example if I have an explosion that lasts 2 seconds, would it be good a start at 300 triangles that quickly drop down to 0 while particles die?

Poly count is of little importance. What matters is how much overlap you have and how big the polygons are on-screen. Your limiting factor here is fill rate, not vertex processing.

Pixel fill rate. The usual bottleneck for any actual graphics board :frowning:

So, for an intuitive guess, a smoke effect with many overlapping particles and large screen coverage is undoubtfully much more resource eating than a firework, with many small particles that almost never overlap.
So I could easily do like 300 particles explosions with small fragments but very little smoke puffs.
Right?

Jessy
Maybe you can give me a tip about this case:
The problem is more related to fill rate or z sorting?
When you use aditive and multiply blend, you don´t worry anymore with z sorting the objects, isn´t it?
But at the same time, fill rate is aways going to be a problem for high resolution devices?

Thanks for the attention

Z sorting is taking some time but the real bottleneck is always pixel fill rate.
That’s why there is also a parameter to limit the size growth of particles in Unity.

Sounds about right. You don’t actually have to calculate stuff, but do keep the idea of fill rate in mind. So, let’s say your smoke effects layer 4 particles at a time over each other (and once for the background), and they each take up 5 times as many pixels on-screen as an explosion particle that hardly ever overlaps another. Well, that’s now 20x as many pixels that have to be written. (At least on a non-iDevice GPU, anyway. I honestly don’t know if there is an optimization for the iThings that prevents actually having to write these pixels to the framebuffer multiple times.)

With that in mind, also note that you can’t completely forgot about the poly count situation; it’s just not the most important thing to worry about with particles - I think maybe I brushed over that too much, seeing your 300 figure. And it’s really not the polygons, but rather, the vertices that matter. If you have 300 particles, that’s 1200 vertices, which is getting high, especially considering the screen is small and you won’t physically be able to see them all if you keep them to a reasonable size on-screen.

From what I’ve read from Apple, it sounds like z-sorting is supposed to be highly efficient using the iGPUs, and should take a load off of Unity. I don’t have a great understanding of the interactions, however. I mean, it sounds to me like the hardware is supposed to sort depth per pixel, which would be awesome, but that’s not what has happened in my experience. I’d love more details about this myself.

Well, Steve Jobs said that he expects the Retina Display to be the high-end for the next 7 years. It could be true. If so, then we should be seeing GPU improvements, without resolution increase, which theoretically means that fill rate becomes less of a problem with each GPU revision. Judging historically, we’ll see improvements in 2011, 2013, and 2015, and then we’ll hit that 7-year mark. However, if the Nintendo 3DS and 3D Blu Ray takes off, then the iPhone may go the same way. So it’ll be like another iPad situation, just not quite as bad. Instead of needing to fill 5.12x as many pixels, we’ll only need to fill 2x as many pixels (one frame for each eye.)