project-navigation
Personal tools

Author Topic: Smoke grenades rape framerate  (Read 5927 times)

Offline Charlie

  • Rookie
  • ***
  • Posts: 45
    • View Profile
Smoke grenades rape framerate
« on: December 13, 2012, 08:09:44 pm »
Smoke from smoke grenades drops my framerate to an unplayable level, from 50fps to 6fps.


Tested on head (8a9c7289efef39c966ba79b3183ba4806689f6d0 at time of writing).



GPU: GeForce GTX 285M
CPU: Intel Core i7 820QM
RAM: 2 x 4GB SODIMM 667MHz
nvidia-drivers 310.19


This is an old issue, this thread states that it was fixed, but clearly its not.

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: Smoke grenades rape framerate
« Reply #1 on: December 13, 2012, 08:27:59 pm »
There is a fix attached to this post.

Offline Charlie

  • Rookie
  • ***
  • Posts: 45
    • View Profile
Re: Smoke grenades rape framerate
« Reply #2 on: December 13, 2012, 09:26:39 pm »
The change has not been committed so I don't know why that thread is marked "fixed", and its a bad idea to tell users to overwrite a file with an attached one in a locked forum as this file will get out of synch with the repository and potentially break other things. All that is needed to work around the issue is to change one word, as I outlined in this post.

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: Smoke grenades rape framerate
« Reply #3 on: December 13, 2012, 11:41:41 pm »
It's a known issue but only effects slower machines (mine included). There are other issues with that particle, not just the physics one, so it will have to be looked at and tweaked before 2.5 goes out. The one-word change is good for performance, but there are advantages to having the smoke particle use physics. For that reason, another solution might be found. The file is just a temporary measure you can use until a fix is made.

Offline ShipIt

  • Project Artist
  • Captain
  • ***
  • Posts: 906
    • View Profile
Re: Smoke grenades rape framerate
« Reply #4 on: December 14, 2012, 02:12:58 pm »
... but only effects slower machines ...

This makes an Intel i5-3450 a slow machine per definition.  :D

Offline Charlie

  • Rookie
  • ***
  • Posts: 45
    • View Profile
Re: Smoke grenades rape framerate
« Reply #5 on: December 14, 2012, 02:58:24 pm »
Good to know you'll look at it, but I wouldn't belittle it to something that affects only "slower machines"... look at my specs, that's not a slow machine ;]
If I can play Far Cry 3 comfortably, I hope to one day be able to see proper smoke in UFO:AI ;]

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: Smoke grenades rape framerate
« Reply #6 on: December 14, 2012, 04:05:44 pm »
Hehe, ok. Well I'm on a "slow machine", and some people don't seem to have the problems, so I just assumed. I've extended the TODO item for 2.5 to be clear that there are multiple issues that need to be addressed.

Offline Crystan

  • Project Artist
  • Captain
  • ***
  • Posts: 572
  • UFO:AI Lead Sound Artist
    • View Profile
    • http://crysea.cr.funpic.de/
Re: Smoke grenades rape framerate
« Reply #7 on: December 17, 2012, 11:40:05 am »
Hehe, ok. Well I'm on a "slow machine", and some people don't seem to have the problems, so I just assumed. I've extended the TODO item for 2.5 to be clear that there are multiple issues that need to be addressed.
Finally someone believes me. :P TBH our particle system is not the best...

Offline Charlie

  • Rookie
  • ***
  • Posts: 45
    • View Profile
Re: Smoke grenades rape framerate
« Reply #8 on: December 25, 2012, 07:38:39 pm »
FYI:
I confirm that the "PC_SPAWN: Could not spawn child particle for 'smokefield' (smokefield_smoke)" spam of messages in the console does not cause the performance drop but is a symptom of whatever causes it, because the spam also appears when I set physics=false and yet the FPS rate is fine then.

Offline Charlie

  • Rookie
  • ***
  • Posts: 45
    • View Profile
Re: Smoke grenades rape framerate
« Reply #9 on: December 25, 2012, 08:37:44 pm »


ufoai/base/ufos/ptl_misc.ufo


physics=false=50fps
tps=24=7fps       
tps=20=8fps       
tps=16=10fps       
tps=12=13fps                 
tps=8=19fps       
tps=4=34fps
tps=3=47-50fps
tps=2=50fps

http://imgur.com/a/2u39S

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: Smoke grenades rape framerate
« Reply #10 on: January 07, 2013, 07:38:10 pm »
I've just pushed a change to the smoke particle that removes its physics calculations and sets the tps to 6. I found it vastly improved my framerate without any significant change in the visuals or functioning of the smoke grenades. Most importantly, I found I could have 5 smoke grenades going at once without maxing out the allowed particles, which caused other particles (existing smoke or other weapon effects, for instance) to disappear.

The numbers may get changed further, since this is Crystan's field, but this should work until we can find a more permanent solution.