How can i avoid overdraw lag in FX?

Hello there!

So i,m working on a project in which we are creating a first person shooter game with large scale warfare.

So i,m beginning to finish our bullet hits now on various surfaces. They are looking very good.

Problem i,m having, which is actually stopping all my work, is that any effect that i create, even single smoke puffs from muzzle flashes, have this horrible performance hit due to overdraw, specifically when many of them are emitted in the same spot or basically when they overlap (that’s why i,m saying its overdraw, plus they get white areas in Shader Complexity mode).

This is the first time i,m dealing with such issue, in the past engines i worked on i did not had this problem at all.

The solutions to this that i’ve heard are:

-Reduce the alpha area in my Sub Uv FX textures.

-Reduce the material instructions. Yet even within very simple smoke puffs i ALWAYS lag when they are emitted in the same spot and over each other. I mean i wont be able to create anything if i have this problem since my materials are very simple and they still lag.

-Things like reduce emitter count and time to live, yet again i,m making simple fast effects yet they still lag, that’s why i am actually very concerned because if this simple bullet hits are lagging, i,m afraid other effects like explosions from helicopter rockets etc wont be able to be feasible, which kills our game and makes us wonder how other shooters can have them left and right without problems like this.

-Code some sort of effect emitter limit in the game for each client. So when they overlap they start culling down?

I really need assistance with this, me and my whole team behind our project which is picking up quite well but this is a big hindrance we are having.

I’m hoping you would have good techniques or ways around this!

Thank you very much,

This guy has my exact same problem :frowning:

Hope its not an issue with the engine :confused:

Hey Bruno_G -

I would suspect that your materials for the particles are all lit. This is a relatively new feature that was unavailable in UE3 where all particles had to be unlit due to the limitations of Direct X 9. With the default DX11 setup in place, we can offer the lit particle translucency but it is render intensive. So in UE3 where we would have to “fake” the lighting on a cloud effect, we can actually have it lit the issue of course is the intensive nature of that rendering.

Or course there is a fine line and small ways around this most of which you succinctly list above. One further suggestion that I would add and we do this at Epic, don’t use Lit Particles but in fact use a way of faking the lighting information by passing information into the emissive channel. (This can be done really well by passing a vector parameter into your material via a blueprint which calls the forward vector of the lighting information.)

You will need to balance all these things (what I have mentioned and the other things that you listed above) in order to get the most performant version of your particle system.

Finally a really good test is to look at your particle system in wireframe and look at it s actual life time (not what is alphaed out) as long as the Plane is being rendered then the CPU and GPU are spending time calculating that system. There may be some time which can be shaved off that way as well.

Thank You

Eric Ketchum

I managed to improve lots with gpu partciles for small flying bits.

So in the case of CPU SubUv animations, is always better to use as much alpha space as possible in each frame of the texture right? In order not to get overdraw problems?

With this i,m wondering if the center (or anchor point in After Effects terms) of each frame of the SubUv texture has to always be right in the middle of the frame and not, at the middle bottom of the frame for example. This will help in the case of animations like rising flame mushrooms or dust that kicks up so i could use more of the frame’s alpha space. Would it be possible to change the center of where the animation runs in each frame?

Thank you!

Hey Bruno_G -

I want to try to answer this question, but could you post it in Rendering as a separate question, I want people to be able to see the answer to this question separate from the next question.

Thank You

Eric Ketchum

Ok no problem