Sigma Dimensions

Sigma Dimensions

1.4k Downloads

Performance issue with Sigma Dimensions

Opened this issue · 68 comments

commented

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.

commented

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

commented

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.

commented

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

commented

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.

commented

"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.

commented

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?

commented

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

commented

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.

commented

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

commented

screenshot13
uh oh

commented

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

commented

here
SigmaDimensions.TEST_2.zip

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

commented

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

commented

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

commented

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

commented

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

commented

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?

commented

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

commented

Yes

commented

and you don't get the error without SD

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

commented

Yes...

commented

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

commented

thanks

commented

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

commented

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

commented

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?

commented

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 🤣

commented

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

this is good

commented

With only cfg files there's no fps drop

commented

With only cfg files there's no fps drop

ok, this is good news

commented

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

commented

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

commented

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)

commented

~75FPS

commented

wtf :D

try this

SigmaDimensions.TEST_4.zip

I'm slowly removing all features from the DLL

commented

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

commented

don't worry, chatting here is fine for me

commented

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

commented

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

commented

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

commented

~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.

commented

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

commented

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

commented

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

commented

~130 FPS on 6!

commented

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

commented

Yes I had a feeling 6 was the solution

commented

This should be fairly easy to fix

commented

Nice

commented

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

commented

Weird. Instead of 75 or 130 fps I get ~100 this time. Definitely an improvement though.

commented

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

commented

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...

commented

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)...

commented

Don't worry, I may be able to upload a couple of more tests by then

commented

could you try this version?
SigmaDimensions.TEST_11.zip

commented

Ok, this is a good sign then!

commented

11 seems to have no improvent for me

commented

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

commented

Yep, almost the same FPS.👍

commented

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!

commented

Seems this bug is fixed for me!

commented

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

SigmaDimensions.TEST_13.zip

commented

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?

commented

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

commented

No worries, thanks for taking the time to reply and hope you're doing well!