UFO:Alien Invasion

Technical support => FAQ => Topic started by: kurja on June 08, 2012, 11:35:25 pm

Title: [CLOSED] smoke grenades and frame rate [FIXED]
Post by: kurja 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
Title: Re: smoke grenades and frame rate
Post by: H-Hour 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.
Title: Re: smoke grenades and frame rate
Post by: kurja 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?
Title: Re: smoke grenades and frame rate
Post by: H-Hour 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.
Title: Re: smoke grenades and frame rate
Post by: Crystan on June 09, 2012, 01:00:06 am
Post your sys spec please.
Title: Re: smoke grenades and frame rate
Post by: H-Hour 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?
Title: Re: smoke grenades and frame rate
Post by: Crystan 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)
Title: Re: smoke grenades and frame rate
Post by: kurja 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.
Title: Re: smoke grenades and frame rate
Post by: kurja 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
Title: Re: smoke grenades and frame rate
Post by: Crystan 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 (http://ufoai.org/forum/index.php/topic,6703.0.html)? 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
Title: Re: smoke grenades and frame rate
Post by: kurja 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 (http://ufoai.org/forum/index.php/topic,6703.0.html)? 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.
Title: Re: smoke grenades and frame rate
Post by: Crystan 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. :)
Title: Re: smoke grenades and frame rate
Post by: H-Hour 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...
Title: Re: smoke grenades and frame rate
Post by: Crystan 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?
Title: Re: smoke grenades and frame rate
Post by: kurja 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.
Title: Re: smoke grenades and frame rate
Post by: Crystan on June 17, 2012, 11:01:58 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.
Thats what i ment. Reduced speed of the smoke probably will fix it, but it will maybe look a bit odd but ill see what i can do.
Title: Re: smoke grenades and frame rate
Post by: Charlie on October 29, 2012, 12:13:30 am
I suffer from the same issue - i7 quad-core CPU, 8GB RAM. The game seems to be capped at 50FPS. If I drop a smoke grenade, most of the time my FPS drops dramatically, sometimes as low as 6FPS. Unplayable.

The workaround: edit ufoai/base/ufos/ptl_misc.ufo, find "particle smokefield_smoke" and scroll about 17 lines down until you find "physics  true", and change the "true" to "false".
Title: Re: smoke grenades and frame rate
Post by: Crystan on October 29, 2012, 11:05:25 am
I suffer from the same issue - i7 quad-core CPU, 8GB RAM. The game seems to be capped at 50FPS. If I drop a smoke grenade, most of the time my FPS drops dramatically, sometimes as low as 6FPS. Unplayable.

The workaround: edit ufoai/base/ufos/ptl_misc.ufo, find "particle smokefield_smoke" and scroll about 17 lines down until you find "physics  true", and change the "true" to "false".
Read the thread more carefully, i already posted a fix: http://ufoai.org/forum/index.php/topic,6755.msg53820.html#msg53820
ATTENTION: Use the new file that is attached to this post. Just unpack it into the UFO:AI directory.
Title: Re: [CLOSED] smoke grenades and frame rate [FIXED]
Post by: H-Hour on December 02, 2012, 11:31:02 am
Crystan, are there changes you've made in your file other than changing the physics to false for the smoke effect? If so, could you specify them? Since the file can change at any time during 2.5-dev, it is easy for some (like myself) to make the one-line change when I play. I can be sure I've got all the latest changes.
Title: Re: [CLOSED] smoke grenades and frame rate [FIXED]
Post by: Crystan on December 02, 2012, 11:47:09 am
Nope, thats all what i did.