[posila][16.1] Decoratives FPS drop

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
ScaryBuh
Inserter
Inserter
Posts: 26
Joined: Mon Jun 27, 2016 11:45 pm
Contact:

[posila][16.1] Decoratives FPS drop

Post by ScaryBuh »

Starting a new map and zooming out makes the game lag a lot, fps drops from 60 to 15.

Turning off Show Decoratives fixes the lag, but the map is not pretty.
Loading an old save from version 15.40 the problem doesn't exist. fps are ok at 60 with Decoratives On or Off.

Factorio is using about 4gb ram, I'm at 4k resolution with an nvidia 970 video card.
I also tried running the game at lower resolutions (example 1920x1080) and the problem is somewhat less visible but still there, fps drops from 60 to 45fps.

I would assume this new factorio version (16.1) takes up more video memory from decorations, and old factorio (15.x) decorations don't?

Any way we could turn on just "some" decorations? The ones from version 15 don't lag and the game wouldn't be so ugly without them.

version 16.1 new game Zoom in Decoratives on
version 16.1 new game Zoom in Decoratives on
version 16.1 new game Zoom in Decoratives on
1 version 16.1 new game Zoom in Decoratives on.jpg (3.38 MiB) Viewed 5477 times
version 16.1 new game Zoom Out Decoratives on
version 16.1 new game Zoom Out Decoratives on
version 16.1 new game Zoom Out Decoratives on
2 version 16.1 new game Zoom Out Decoratives on.jpg (3.14 MiB) Viewed 5477 times
version 16.1 new game Zoom Out Decoratives Off
version 16.1 new game Zoom Out Decoratives Off
version 16.1 new game Zoom Out Decoratives Off
3 version 16.1 new game Zoom Out Decoratives Off.jpg (2.04 MiB) Viewed 5477 times
old save game Zoom out Decoratives On
old save game Zoom out Decoratives On
old save game Zoom out Decoratives On
4 old save game Decoratives On.jpg (3.3 MiB) Viewed 5477 times
old save game Zoom out Decoratives off
old save game Zoom out Decoratives off
old save game Zoom out Decoratives off
5 old save game Decoratives off.jpg (2.98 MiB) Viewed 5477 times

User avatar
ScaryBuh
Inserter
Inserter
Posts: 26
Joined: Mon Jun 27, 2016 11:45 pm
Contact:

Re: [16.1] Decoratives FPS drop

Post by ScaryBuh »

Managed to solve the problem by changing
Atlas texture size largest to 8192

in fact there are 3 alternatives solutions,
lowering atlas texture size,
or lowering video memory usage,
or turning off decoratives.
while keeping the rest at maximum values.

So right now I'm playing fine with 60 fps, decoratives On, with video memory usage All and Atlas texture size at 8192.
I wonder if I should put video memory usage high instead? Because I pretend to have decoratives On.

User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

Re: [16.1] Decoratives FPS drop

Post by impetus maximus »

i change 'Video memory usage' from medium which gave 20 FPS zoomed out, to high which netted 60FPS fully zoomed out with Decoratives on in a desert.
this is with normal sprite resolution, integrated Intel HD 3000 1GB video memory, @ 1440x1080 even 1920x1080 :shock:
i left the Atlas Texture size where it was when i started. (4096)

User avatar
ScaryBuh
Inserter
Inserter
Posts: 26
Joined: Mon Jun 27, 2016 11:45 pm
Contact:

Re: [posila][16.1] Decoratives FPS drop

Post by ScaryBuh »

Looks like version 16.3 fixed a "bit" this problem,
- Fixed very low performance of drawing decoratives on medium or lower video memory usage setting. (54681)
Although it wasn't a problem of medium or lower video memory (on my part), it fixed "sometimes" my low performance.

I can now have Decoratives On, video memory usage ALL, atlas texture size Largest Possible. (yes I did the restart)
resolved.jpg
resolved.jpg (2.84 MiB) Viewed 5309 times
but sometimes, it starts to lag again... 17.6 fps on new map generated, zoomed out
17.6 fps
17.6 fps
17.6fps.jpg (3.56 MiB) Viewed 5291 times

At first I was happy and thought my problem was fixed, but no... still there, I'll keep testing and report what I can find

User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

Re: [posila][16.1] Decoratives FPS drop

Post by impetus maximus »

try disabling tree sprite bit maps. i need to do more testing, but my system doesn't seem to like that one.

checksumfail
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Dec 15, 2017 10:08 pm
Contact:

Re: [posila][16.1] Decoratives FPS drop

Post by checksumfail »

I am also getting this same issue, my system is pretty powerful and could handle megabases with much higher frame rate on 15.X

System:
OS: Arch Linux
Cinnamon Version: 3.6.6
Linux Kernel: 4.13.12-1-ARCH
Processor: Intel i7-3820 @ 3.6 GHZ x 4
Memory: 32GiB
Graphics Card: GeForce GTX 750 Ti

Results:
Fully zoomed out with decoratives on = 15 FPS / 60 UPS
Fully zoomed out with decoratives off = 60 FPS / 60 UPS

Attempted solutions:
Upgrading from version 16.2 to 16.3 didn't change anything.
Setting Atlas Texture Size from Largest Possible to 8192 didn't change anything
Smoke, clouds, item shadows, inserter shadows, Lights Render Resolution and Max Render Threads all have no effect on FPS at all.

User avatar
ScaryBuh
Inserter
Inserter
Posts: 26
Joined: Mon Jun 27, 2016 11:45 pm
Contact:

Re: [posila][16.1] Decoratives FPS drop

Post by ScaryBuh »

Hey checksumfail, try to restart your linux and then run only factorio with decoratives on, video memory on all, atlas texture size at largest. Does it help?

When I restart my windows and then go play factorio with the settings on max, the fps are stable at 60.

Problem starts when I open a few chrome internet pages (nothing exaggerated, like 5 tabs at most) and leave them open while I tab into factorio.
(Now this is the hard part because it's inconsistent) - Sometimes it lags factorio, sometimes not.
When it does lag, frame rate drops to 15-17fps is at max zoom out, decoratives on, video memory on All, atlas texture size Largest Possible.

(Having a few internet pages open shouldn't lag factorio, didn't happen at 0.15.x, but now at 0.16.3 sometimes it does!)


Also checksumfail, when you have those 15fps, try to lower a setting on Atlas texture size and restart factorio, does it still happen? It fixed for me as I said in earlier post.

User avatar
ScaryBuh
Inserter
Inserter
Posts: 26
Joined: Mon Jun 27, 2016 11:45 pm
Contact:

Re: [posila][16.1] Decoratives FPS drop

Post by ScaryBuh »

impetus maximus wrote:try disabling tree sprite bit maps. i need to do more testing, but my system doesn't seem to like that one.
Cheers for pointing me out in that direction, I did some testing around it, here's what I found:

viewtopic.php?f=7&t=54986
I believe it made a slight different bug than this one, so I created another topic, but the basic idea is there, we want to fix the FPS drops.

It's funny, now that I check again the screenshots I post, the lag comes when there are more trees on screen :mrgreen:

User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

Re: [posila][16.1] Decoratives FPS drop

Post by impetus maximus »

i would think lowering atlas size would help. :|

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [posila][16.1] Decoratives FPS drop

Post by orzelek »

You can grab GPU-Z and check there for VRAM usage (dedicated and dynamic). Any dynamic memory usage will mean potentiall for lags since textures will be swapped between RAM and VRAM. Since 0.16 added a lot of high res stuff VRAM usage has gotten bigger overall.
Using smaller atlases helps since they can be swapped more easily - it has the drawback of generating more draw calls so overall performance might suffer. By experimienting with atlas size and vram usage option you can figure out setup that will work best for your GPU/driver combination. It's not an exact science sadly since it can easily vary between driver versions.

You can also see that Chrome uses VRAM since it works on GPU acceleration - so running game without it enabled might be faster.

User avatar
DanGio
Filter Inserter
Filter Inserter
Posts: 394
Joined: Sat May 10, 2014 6:22 pm
Contact:

Re: [posila][16.1] Decoratives FPS drop

Post by DanGio »

This issue seems serious to me... With decoratives activated :
Sometimes I get 30FPS zoomed out, so I mess with settings (mainly atlas size), restart, and sometimes it works, and I'm back at 60FPS. Then later when I restart the game, it goes back to 30FPS, so I repeat the process.

So I'm pretty sure that with the same settings, sometimes it works perfectly, sometimes not. But I haven't figured yet any setting that never works, or any setting that always work. Well of course, disable decoratives always work.

I'm on Win10, i5-4440 @ 3.1GHz, NVIDIA GeForce GTX 770, 8Go RAM

User avatar
ScaryBuh
Inserter
Inserter
Posts: 26
Joined: Mon Jun 27, 2016 11:45 pm
Contact:

Re: [posila][16.1] Decoratives FPS drop

Post by ScaryBuh »

Hey DanGio, did you read my other post?
viewtopic.php?f=7&t=54986

It looks like I have the same problem you have. Sometimes there's the issue, sometimes all is fine.

Are you near a dense forest area when the fps drops? What resolution you running the game?

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [posila][16.1] Decoratives FPS drop

Post by posila »

For 0.16.17 I added graphics option "Separate lower object atlas" (disabled by default)
If enabled sprites drawn under shadows will be put in a separate sprite atlas with enabled mipmaps. On most GPUs this will lower GPU load when drawing lots of decoratives. Downside is decrease of sprite batching efficiency which causes higher CPU usage in rendering. Atlas with mipmaps has also increased size in VRAM by 1/3.

We have lot of improvements for rendering in 0.17 backlog, so we will probably fix it in some better, more generic way.

But, I think it might not be enough for some people in this thread - you should try to reduce Atlas size or change Video memory usage.
The higher video memory usage, the more sprites the game puts to sprite atlases, which increases efficiency of sprite batching and reduces CPU load when rendering, but gives graphics driver less room for arranging everything into VRAM.

Post Reply

Return to “Resolved Problems and Bugs”