Sigma88 / Sigma-Dimensions

The Universal Rescale Mod for KSP
Other
24 stars 7 forks source link

Performance issue with Sigma Dimensions #81

Closed ghost closed 5 years ago

ghost commented 5 years ago

The thing is, I've encountered a issue with performance, ~but unlike #72, it seems to be related to the resize, the larger I rescale to, the laggier.~ I'm using 4X resize on planet pack JNSQ, and I can only get 50 fps with a 40 part vessel on 640km sized minmus. The weirder thing is that I can get smooth 60 fps on a 6400km sized kerbin with 100 parts, which doesn't make any sense? This bug seems to be present on 1.7.0 and 1.7.1, and regardless of what shader I'm using. Sorry if I sound rude or something, for some reason I'm fairly bad at expressing politeness when using English. I absolutely love this mod and it has become one of my essential mods that I can't get rid of.

Sigma88 commented 5 years ago

The reason why it is worse to have a 640km minmus than a 6400km kerbin is because most likely the game tries to load only a certain portion of the planet, since stock minmus is smaller the default is probably to load a big % of the planet (because it is so small anyways)

however, when you increase the size of minmus that big % keeps getting loaded all at once, which might be the cause of your FPS drop

I'm not really sure how to fix this, first of all I need to figure out which is the feature in question and then try to find a reasonable way to approach the solution

maybe @StollD knows which is the parameter in question

Sigma88 commented 5 years ago

Just to be on the safe side, could you send me the files listed here: https://forum.kerbalspaceprogram.com/index.php?/topic/181547-171-5-backports-kopernicus-kittopiatech/&page=27&tab=comments#comment-2793409

Thanks

ghost commented 5 years ago

I don't know how did I came to the conclusion that scale has a influence, probably because vsync was on and I got 60 FPS for a while in 1.1X resize. I moved almost all my mod away, disabled vsync, and get 110-130 FPS without Sigma dimensions, and 60-70 with it. Log stuff.zip I also forgot to emphasize that I'm using planet pack JNSQ which compeletly overhauls all the planets, and is also a native 2.7X sized pack (So by scaling 4X the size will be 10.8X, aka real world size), so Kerbin and Minmus has different ground features than stock.

Sigma88 commented 5 years ago

Did you try doing the test on just stock ksp to make sure it's not a jnsq issue?

If you try I would suggest trying both 4x and 10x since the final size of jnsq is 10x stock

also, could you try with your current setup (JNSQ + SD) but without any changes to the base SD

so the planets would be the same as without SD

ghost commented 5 years ago

~UH oh, looks like a problem with JNSQ...~ Nope, see the posts below 10X stock resize: screenshot3 Stock with only Kopernicus and its dependencies screenshot4

ghost commented 5 years ago

HMMMMMM... ~Default parameter doesn't slow down the game with JNSQ~ at first, but after save and loading the game FPS drops for some reason screenshot5

ghost commented 5 years ago

OOF After literally only pressing F5 then F9, FPS drops down to 75 screenshot6

ghost commented 5 years ago

Seems save and load lags game with only Kopernicus and default parameter SD installed too, but not that obvious Before: screenshot7 After: screenshot8

ghost commented 5 years ago

I think I can confirm this issue happens is related to SD, and only happens when a vessel is reloaded, since I smashed F5 and F9 a lot with a non SD install, with both JNSQ installed and not installed, but I can't notice any performance difference before and after loading a save in flight.

ghost commented 5 years ago

"I don't know how did I came to the conclusion that scale has a influence, probably because vsync was on and I got 60 FPS for a while in 1.1X resize. I moved almost all my mod away, disabled vsync, and get 110-130 FPS without Sigma dimensions, and 60-70 with it." Regarding this, I think I didn't noticed performance issue only happens after loading a save in flight, so I came to the conclusion that it it related to planet size. Now I think it's actually an Sigma Dimension glitch.

Sigma88 commented 5 years ago

I'm not really sure what the issue is,

from your screenshot there doesn't seem to be any difference between stock and 10x

image

on a 10x rescaled system (top) the framerate goes up and down between ~60 and ~190 while on stock it goes up and down between ~70 and ~170

am I missing something?

Sigma88 commented 5 years ago

Here is a recompiled version of SD with a couple of features disabled, let's see if this has any effect

SigmaDimensions.TEST_1.zip

I haven't tested this so it might not work properly 100%

of course don't use this on an important save, most likely hell will ensue

ghost commented 5 years ago

Whoops, I meant that game's performance only drops when reload a save on flight scene with sigma dimensions, previously I didn't notice that and performance issue wasn't there.

ghost commented 5 years ago

Oh, I think my English is just not that great. I meant see the posts below, not the screenshots

ghost commented 5 years ago

screenshot13 uh oh

Sigma88 commented 5 years ago

I understand what you mean, however I don't see much drop in the screenshot that's why I am a bit confused.

the logs are clean so there are no errors apparently, I'm not really sure how to approach this and I can't really reproduce the issue since my potato pc never goes over 70 fps 🤣

uh oh

yes I assumed it was going to break, give me some time to make a better plugin

Sigma88 commented 5 years ago

here SigmaDimensions.TEST_2.zip

also: locate and delete the file GameData\Sigma\Dimensions\Configs\ReDimension\resizePQSMods.cfg

ghost commented 5 years ago

I still gets only ~75 fps rather than 130 on JNSQ's minmus surface(It has the most obvious performance drop from this glitch, so should I test with this condition rather than stock?), so I guess things aren't related to the parts that you removed?

Sigma88 commented 5 years ago

is this even if you removed the cfg file I told you to?

ghost commented 5 years ago

Yes

Sigma88 commented 5 years ago

and you don't get the error without SD

btw if you prefere I am also on kopernicus discord (channel "sigma-mods")

ghost commented 5 years ago

Yes...

ghost commented 5 years ago

I'll try remove SD and test again to 100% confirm this

Sigma88 commented 5 years ago

thanks

ghost commented 5 years ago

BTW switching vessel/load a vessel from tracking station hits the performance too, just discovered

Sigma88 commented 5 years ago

btw if you prefere I am also on kopernicus discord (channel "sigma-mods")

(I repeat this in case you missed it before)




could you try running the game with no plugin?

and this file still deleted GameData\Sigma\Dimensions\Configs\ReDimension\resizePQSMods.cfg

ghost commented 5 years ago

I can confirm removing SD really removes the glitch, now it's time to test with only .cfg files Actually I haven't used discord before... Maybe I'll look into that later?

Sigma88 commented 5 years ago

Actually I haven't used discord before... Maybe I'll look into that later?

don't worry we can speak here, it's just a weird type of chat 🤣

Sigma88 commented 5 years ago

I can confirm removing SD really removes the glitch, now it's time to test with only .cfg files

this is good

ghost commented 5 years ago

With only cfg files there's no fps drop

Sigma88 commented 5 years ago

With only cfg files there's no fps drop

ok, this is good news

ghost commented 5 years ago

And I noticed game seems to load faster between the scenes without SD, or is it only my illusion?

ghost commented 5 years ago

My discord stuck at checking updates... Maybe it's banned in China... Oof

Sigma88 commented 5 years ago

here, try this one

SigmaDimensions.TEST_3.zip

(keep deleting the file I told you before, I'll let you know when to restore it)

ghost commented 5 years ago

~75FPS

Sigma88 commented 5 years ago

wtf :D

try this

SigmaDimensions.TEST_4.zip

I'm slowly removing all features from the DLL

ghost commented 5 years ago

Discord isn't banned, it's just slow... extremely slow... And it isn't willing to connect via VPN for some reason

Sigma88 commented 5 years ago

don't worry, chatting here is fine for me

ghost commented 5 years ago

Ahhh, I'll gonna say wtf too, it's still ~75FPS

Sigma88 commented 5 years ago

Ahhh, I'll gonna say wtf too, it's still ~75FPS

it is good, it means I can exclude everything I removed until now

here's the next step SigmaDimensions.TEST_5.zip

Sigma88 commented 5 years ago

sorry to waste your time with this, but I can't reproduce on my pc so the only way is to get feedback from players

ghost commented 5 years ago

~75FPS Actually I want to say sorry too, I need to go sleep soon or I wont be able to get up tomorrow. After about 10 hours I'll have some time again. I'm okay with testing your mods though, since I have an extra screen connected to my laptop I can watch some videos while testing KSP. And SD is one of my must-have mods, I'm glad I can help with its development.

Sigma88 commented 5 years ago

I'll keep posting zips here, when you need to go just stop replying and when you have time we take from where we left off

SigmaDimensions.TEST_6.zip

Sigma88 commented 5 years ago

if TEST_6 still has issues here is TEST_7 SigmaDimensions.TEST_7.zip

Sigma88 commented 5 years ago

and if 7 doesn't fix, here's 8 SigmaDimensions.TEST_8.zip

ghost commented 5 years ago

~130 FPS on 6!

ghost commented 5 years ago

To make sure the module removed on 6 is the cause of the glitch, I tested again and get ~70 on 5, 130 on 7 and 8

Sigma88 commented 5 years ago

Yes I had a feeling 6 was the solution

Sigma88 commented 5 years ago

This should be fairly easy to fix

ghost commented 5 years ago

Nice