project-navigation
Personal tools

Author Topic: [CLOSED] smoke grenades and frame rate [FIXED]  (Read 31615 times)

Offline kurja

  • Captain
  • *****
  • Posts: 504
    • View Profile
[CLOSED] smoke grenades and frame rate [FIXED]
« on: June 08, 2012, 11:35:25 pm »
When  I deploy a smoke grenade, my fps drops from 40-ish to 4-ish, regardless of if the smoke is on-screen or not. At first I didn't think much of it, okay maybe it's a cpu-intensive smoke effect or whatever and it's an old computer, but when playing the train map I noticed that there's a chimney with smoke rising from it and my fps is totally unchanged, hmm...

What could be going on, might there be something in the logs that may cast some light on this issue (which log file)?

EDIT by Admin: Fix can be found here: http://ufoai.org/forum/index.php/topic,6755.msg56217.html#msg56217
« Last Edit: November 10, 2012, 02:24:16 pm by Crystan »

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: smoke grenades and frame rate
« Reply #1 on: June 08, 2012, 11:41:23 pm »
The chimney smoke is a different particle effect than the smoke grenade. I notice an FPS drop with the smoke grenade particle effect too (check out the crashed fighter on +bridge). I think it's just a resource-intensive particle, but I don't know how to make particles and don't know what would be making it more resource intensive than others.

Offline kurja

  • Captain
  • *****
  • Posts: 504
    • View Profile
Re: smoke grenades and frame rate
« Reply #2 on: June 08, 2012, 11:51:09 pm »
Impact on frame rate is really bad though. Can I turn off just the particle effects, or better yet, just for the smoke grenades?

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: smoke grenades and frame rate
« Reply #3 on: June 09, 2012, 12:25:21 am »
Not sure. Check the video options. If you have shaders on, turn them off. That always seems to help the most.

Offline Crystan

  • Project Artist
  • Captain
  • ***
  • Posts: 572
  • UFO:AI Lead Sound Artist
    • View Profile
    • http://crysea.cr.funpic.de/
Re: smoke grenades and frame rate
« Reply #4 on: June 09, 2012, 01:00:06 am »
Post your sys spec please.

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: smoke grenades and frame rate
« Reply #5 on: June 09, 2012, 02:04:20 am »
Processor: Intel(R) Core(TM) i3 CPU -- M 350 @ 2.27 GHz
RAM: 4gb

What other info you need?

Offline Crystan

  • Project Artist
  • Captain
  • ***
  • Posts: 572
  • UFO:AI Lead Sound Artist
    • View Profile
    • http://crysea.cr.funpic.de/
Re: smoke grenades and frame rate
« Reply #6 on: June 09, 2012, 02:32:03 am »
What other info you need?
GPU

Do you experience the same problem with the napalm grenade?

but when playing the train map I noticed that there's a chimney with smoke rising from it and my fps is totally unchanged, hmm...
The smoke grenade smoke is also calculated physically. If it wouldnt the smoke would go through roofs etc. Put the content of the zip (ptl_misc.ufo) in the attachment into your

..\UFOAI\base\ufos\

folder and tell me if it fixes your performance problems.
(..\UFOAI\base\ufos\ptl_misc.ufo)
« Last Edit: June 09, 2012, 02:40:06 am by Crystan »

Offline kurja

  • Captain
  • *****
  • Posts: 504
    • View Profile
Re: smoke grenades and frame rate
« Reply #7 on: June 09, 2012, 09:40:38 am »
I have an intel 3GHz single core (htt), GeForce 9800 GTX+

incendiary grenades do not crash the frame rate like smokes do.

about "calculated physically" - I just noticed that if a smoke grenade lands next to a wall, the effect will be smaller as obviously the wall blocks some of the smoke as it should, but then shouldn't smoke spread further away from the wall.

Offline kurja

  • Captain
  • *****
  • Posts: 504
    • View Profile
Re: smoke grenades and frame rate
« Reply #8 on: June 09, 2012, 09:45:39 am »
Put the content of the zip (ptl_misc.ufo) in the attachment into your

..\UFOAI\base\ufos\

folder and tell me if it fixes your performance problems.
(..\UFOAI\base\ufos\ptl_misc.ufo)

absolutely!!! you're the wizard! =)

maybe it's just the improved frame rate, but it seems to look nicer as well

Offline Crystan

  • Project Artist
  • Captain
  • ***
  • Posts: 572
  • UFO:AI Lead Sound Artist
    • View Profile
    • http://crysea.cr.funpic.de/
Re: smoke grenades and frame rate
« Reply #9 on: June 09, 2012, 12:07:55 pm »
Well i just deactivated the physic calculation, changed nothing on the fx. Fixed it the ugly smoke texture bug i noticed in your screenshots of your other thread? Looks the chimney smoke also ugly?

Also keep reporting about ptl effects that will cause a heavy performance impact. Ill change them and release them as a mod so theyll work also on stone age based pc's. *hides* :P
« Last Edit: June 09, 2012, 12:14:09 pm by Crystan »

Offline kurja

  • Captain
  • *****
  • Posts: 504
    • View Profile
Re: smoke grenades and frame rate
« Reply #10 on: June 09, 2012, 12:40:31 pm »
Well i just deactivated the physic calculation, changed nothing on the fx. Fixed it the ugly smoke texture bug i noticed in your screenshots of your other thread? Looks the chimney smoke also ugly?

Also keep reporting about ptl effects that will cause a heavy performance impact. Ill change them and release them as a mod so theyll work also on stone age based pc's. *hides* :P

I had the ugly smoke issue in 2.4, but not in 2.5 which is what I'm playing right now.

I got some stones right here that my pc would like to hurl towards yours ;) This 'puter is actually relatively new, freshly built of parts that happened to be available at little or no cost and it runs linux, edits photos and cuts video, surfs the web and plays ufoai - all I need =)

I haven't noticed such severe performance issues with anything else than the smoke grenades.

Offline Crystan

  • Project Artist
  • Captain
  • ***
  • Posts: 572
  • UFO:AI Lead Sound Artist
    • View Profile
    • http://crysea.cr.funpic.de/
Re: smoke grenades and frame rate
« Reply #11 on: June 09, 2012, 12:44:33 pm »
Ah good to hear and the stone age pc comment wasnt ment serious in any way. I know and understand that not everyone needs a fast computer. :)

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: smoke grenades and frame rate
« Reply #12 on: June 17, 2012, 12:05:37 am »
Crystan, did you ever merge this fix with master? I just used a smoke grenade on +hills and it killed my framerate...

Offline Crystan

  • Project Artist
  • Captain
  • ***
  • Posts: 572
  • UFO:AI Lead Sound Artist
    • View Profile
    • http://crysea.cr.funpic.de/
Re: smoke grenades and frame rate
« Reply #13 on: June 17, 2012, 01:57:31 am »
No, i cant - but feel free to commit it altough i fear it will cause some clipping bugs. Have anyone noticed some?

Offline kurja

  • Captain
  • *****
  • Posts: 504
    • View Profile
Re: smoke grenades and frame rate
« Reply #14 on: June 17, 2012, 08:47:48 pm »
I think I'm seeing some smoke on the second floor if there's a smoke grenade below, smoke does not seem to go through walls though.