Performance issue with Sigma Dimensions
Opened this issue · 68 comments
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.
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
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
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.
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.
"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.
Here is a recompiled version of SD with a couple of features disabled, let's see if this has any effect
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
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.
Oh, I think my English is just not that great. I meant see the posts below, not the screenshots
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
here
SigmaDimensions.TEST_2.zip
also:
locate and delete the file
GameData\Sigma\Dimensions\Configs\ReDimension\resizePQSMods.cfg
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
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?
is this even if you removed the cfg file I told you to?
and you don't get the error without SD
btw if you prefere I am also on kopernicus discord (channel "sigma-mods")
BTW switching vessel/load a vessel from tracking station hits the performance too, just discovered
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
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?
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 🤣
I can confirm removing SD really removes the glitch, now it's time to test with only .cfg files
this is good
And I noticed game seems to load faster between the scenes without SD, or is it only my illusion?
here, try this one
(keep deleting the file I told you before, I'll let you know when to restore it)
Discord isn't banned, it's just slow... extremely slow... And it isn't willing to connect via VPN for some reason
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
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
~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.
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
if TEST_6 still has issues here is TEST_7
SigmaDimensions.TEST_7.zip
and if 7 doesn't fix, here's 8
SigmaDimensions.TEST_8.zip
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
here's another test version:
SigmaDimensions.TEST_9.zip
before to install this:
1- remove the old SigmaDimensions folder and re-install the mod properly
2- replace the SD dll with the test_9 dll
3- test if the bug has been fixed
Weird. Instead of 75 or 130 fps I get ~100 this time. Definitely an improvement though.
I was worried this could happen, there might be 2 problems. we need to figure out which is the second part that is causing the fps drop.
here is a new dll to test
SigmaDimensions.TEST_10.zip
alternatively, this could be an issue related to terrain scatter (see this kopernicus issue)
so please try also to load the game with SD TEST_9 and disabling terrain scatter in the settings
Maybe not related to that issue, since my terrain scatter is already disabled, and got same performance problem before switching to 1.7.1.
Test 10 improves the game performance a bit more, but I still seems to have ~10 fps lower than without SD.
That's acceptable though, I think I can land a 200 part vessel on minmus now...
Whoops, was writing my assignment and didn't notice your comment until now. Guess I'll give it a test tomorrow (about 8 hours later)...
could you try this version?
SigmaDimensions.TEST_11.zip
do you mean improvement over the current release or over TEST_10 ?
it should not improve on 10,
TEST_10 had 2 features disabled
TEST_11 has 1 feature disabled and 1 feature fixed
if you are getting the same FPS with TEST_10 as you get with TEST_11 that's a good thing
here, this should be a version of the current SD that have the fps drop fixed
SigmaDimensions.TEST_12.zip
while I was fixing this I found some bugs that are present in this version but are also in the latest release.
since Test_12 fixes this issue you can just use this and I will try fixing the other bugs before making a new release.
let me know if this version gives you any issues
thanks for helping fixing this issue!
I'm going to release this in a few days.
I will leave it here in case someone wants to test it first
The only changes from the latest release are the performance drop fix linked above and another fix for building altitude recalculation
fixed in the latest release
https://github.com/Sigma88/Sigma-Dimensions/releases/v0.10.4
This bug persists for me (perhaps due to different issues) in KSP/Kopernicus version 1.8.1 with SD 0.10.7 under Linux. I ran the game fine at ~2x scale, stock system, with a decently sized mod list for a couple of months, then decided to restart at a larger scale (4.3x) and I get massive performance hits when close to the surface of the Mun or Minmus. Especially at Minmus it is evident the terrain is loaded at a much higher detail than necessary for quite some distance - distant hills are visibly smoother than they "should be".
Failed attempt at fixing the issue: MM patch to limit the max PQS detail seems to have no discernible effect on performance:
@Kopernicus:FOR[SigDim2]
{
@Body:HAS[@PQS]
{
@PQS
{
%minLevel = 1
%maxLevel = 4
}
}
}
With the issue also mentioned in relation to JNSQ by ArXen42 I assume the likely culprit is Kopernicus itself this time? Still I figure the issue is likely highly related to the original issue in SD, so perhaps you recall what you changed in SD to fix this originally and see if any related issues have popped up in the source for Kopernicus in later iterations?
yes I am supposed to change the min/max level but I haven't had too much free time lately and honestly ksp modding is not very high on my priority list at the moment