NS2 Particle Effects Optimization
Skie
Skulk Progenitor Join Date: 2003-10-18 Member: 21766Members, NS2 Playtester, Reinforced - Shadow
<div class="IPBDescription">The next step for improved fps?</div>Hello,
This post is mainly aimed for the devs.
Cutting to the chase, the particle effects in NS2 really drastically reduce your fps if you are very close to them. I don't know if this is a thing you can optimize or not, because it happens in other games as well (e.g. in World of Tanks when you shoot and the smoke cloud fills your screen). The GPU somehow needs to process the stretching and alpha changes for the decals across the entire screen, if I understand at all how it's handled. Fade blink, burning effects, explosions - there's a lot of them that cause this and is the biggest thing affecting combat fps right now (I imagine).
Fade blink as an example. When you blink a short distance and walk right into the particle effect (dark cloud puffs and the electric zapping), the fps drop is huge:
<img src="http://i.imgur.com/hA2aC.jpg" border="0" class="linked-image" />
These screenshots were taken at 1920x1200 and high settings, if that helps any. Any idea if by changing graphics card settings this could be improved on the client end? I've got GTX570, for the record.
Just a heads up.
Keep up the great work team.
This post is mainly aimed for the devs.
Cutting to the chase, the particle effects in NS2 really drastically reduce your fps if you are very close to them. I don't know if this is a thing you can optimize or not, because it happens in other games as well (e.g. in World of Tanks when you shoot and the smoke cloud fills your screen). The GPU somehow needs to process the stretching and alpha changes for the decals across the entire screen, if I understand at all how it's handled. Fade blink, burning effects, explosions - there's a lot of them that cause this and is the biggest thing affecting combat fps right now (I imagine).
Fade blink as an example. When you blink a short distance and walk right into the particle effect (dark cloud puffs and the electric zapping), the fps drop is huge:
<img src="http://i.imgur.com/hA2aC.jpg" border="0" class="linked-image" />
These screenshots were taken at 1920x1200 and high settings, if that helps any. Any idea if by changing graphics card settings this could be improved on the client end? I've got GTX570, for the record.
Just a heads up.
Keep up the great work team.
Comments
If the framerate near particles can be improved at all, it will be great.
The solutions to this problem usually are of the character of fading out sprites when they get too close to the player or using fewer, bigger, more opaque sprites.
In NS2 the renderer is deferred, which makes rendering anything but additive or subtractive sprites a pain and there could be pretty large gains from choosing a better/cheaper algorithm.
so what exactly would a better algorithm look like?
Those sprites with fade blink look subtractive. The wonderful thing about additive and subtractive sprites is that you can draw them in any order you want and you don't have to solve the hard problem of figuring out how to light the sprites in a deferred renderer.
If they are subtractive sprites they are already as cheap to render as they can be and the solution will be some compromise(e.g. use fewer more intense sprites(less fillrate, possibly poorer result), fade sprites out when they are too close to the viewer, or some other hack like that).
Alpha blended sprites in NS2(e.g. lerk spores) are not affected by lighting; they just assume that they are lit by average brightness, white light. This is very cheap to render and sidesteps the problem completely, but it is also very incorrect and lerk spores stick out like a sore thumb much of the time. Even in complete darkness or in red emergency lighting the spores still look like they are lit with pale white lighting.
For alpha blended transparency there is a number of algorithms that produce results of varying computational cost, memory cost, correctness, hardware compatibility(e.g. some depend on DX11 features) and other constraints. I'm not aware of any industry standard, go to method. I just know that it's a mess and understand why it's difficult to do, but I'm hardly in a position to recommend a good solution.