Jump to content

[1.8.1-1] [PLEASE FORK ME] Kopernicus & KittopiaTech


Thomas P.

Recommended Posts

37 minutes ago, SkyRex94 said:

So the Lag actually seems to be connected to the No-Ocean-Collider Issue I posted about three pages back.
I just tried out the workaround for it on the Mun and it flows buttery smooth now! Lag is completely gone.
So workaround for lag until next Kopernicus Update:

Whenever you upscale any object, add this line into it's body:


		%Ocean
		{
			maxQuadLengthsPerFrame = 0.03
		}

This forces Kopernicus to initialize "Some" Ocean-instance based on default values (if the object doesn't have an ocean, there won't be one).
Therefor these FixedUpdate-calls for each part no longer tries to de-reference a Null pointer and everything runs as intended.

Thanks for the bugtracking guys, this lag really drove me crazy.

EDIT: !EXCEPT JOOL! Don't add an ocean object to a gas giant, it will cause an exception on loadup. All solid bodies swallow the fix though, no more lag.

EDIT 2 : There is actually an ocean added. In case of the moon it sits well below the surface though. Are there any bodies with negative heights? if not it shouldn't be a problem.

 

Thank you a million times over! I was just about to call it quits and nuke KSP from my PC! I'll give it a go later tonight :)

Edit: A million thanks to everyone that helped track this down! So @4x4cheesecake, @Starwaster, @Diddly Feelerino, @SkyRex94, and whoever I may have missed, thank you!

It's kinda funny.. To see that the fix from @SkyRex94 was right there in this thread before I even made the video. :rolleyes:

Edited by Jognt
Link to comment
Share on other sites

6 minutes ago, Jognt said:

 

Thank you a million times over! I was just about to call it quits and nuke KSP from my PC! I'll give it a go later tonight :)

Edit: A million thanks to everyone that helped track this down! So @4x4cheesecake, @Starwaster, @Diddly Feelerino, @SkyRex94, and whoever I may have missed, thank you!

It's kinda funny.. To see that the fix from @SkyRex94 was right there in this thread before I even made the video. :rolleyes:

Worst thing is that I noticed it, yet never really thought to conflate the two. Fml

Link to comment
Share on other sites

Uhm, thinking about it.. How would I place the tweak from @SkyRex94 into a MM patch? I know how to MM-patch, but since the example would add it to every body and Kopernicus is a complex beast I'm wondering "Which bodies do I need to filter out?". I'm not fond of directly editing files for specific bodies, hence the MM-patch question.

Edit: Here's a patch that adds oceans to non-ocean bodies. You may get contracts for stuff like "splashing down in the Mun's Oceans" but you can ignore those, or try. :cool:

@Kopernicus:AFTER[Kopernicus]
{
	@Body:HAS[@PQS,!Ocean]
	{
		%Ocean
		{
			maxQuadLengthsPerFrame = 0.03
		}
	}
}

If you don't know how to turn this into a ModuleManager patch, here's a step-by-step.

 

Edited by Jognt
Updated MM patch to work always. (terms and conditions apply)
Link to comment
Share on other sites

I'm glad to see that @SkyRex94s workaround is helping people but for myself, when I revert the various other fixes I had implemented for myself and try his ocean fix, I get the same thing as before which is Surface Features (aka ROCs) spawning inappropriately. Apparently (and as has been mentioned) he issue I see isn't the same as what other people have experienced but nevertheless this is a serious issue for upscaled systems and the more they are scaled up the worse the problem is.

In this shot the Mun looks like it has measles :( 

(hint: at this distance and this speed those things should not be there at all)

So the only remedy (at this time) for this problem is custom terrain quality settings and reduction of ROC frequency

CUFB4hm.png

Link to comment
Share on other sites

4 minutes ago, Starwaster said:

I get the same thing as before which is Surface Features (aka ROCs) spawning inappropriately.

The performance issues on the mun (and probably other celestial bodies without oceans) which can be worked around by adding an ocean, has nothing to do with the ROCs spawn rate.

The "ocean issue" impacts the performance by flooding the FixedUpdate. Found an old but interesting post about "FixedUpdate" in unity though:

https://forum.unity.com/threads/the-truth-about-fixedupdate.231637/

If this is still the case, unity will just run more "FixedUpdate" before the next "Update" to handle all the requests, so I have a wild guess what's happening then: The used testscene in form of the savegame from @Jognt allows to pack and unpack a vessel with a constant part count. Each part of the unpacked vessel wants to do something in "FixedUpdate" but it's too much to keep it in sync with "Update" so unity just runs "FixedUpdate" 3 times, before running "Update" once and as far as I know, "update" is supposed to run on each frame which means: if "Update" has to wait for moultiple "FixedUpdate" to run, it will cut down the FPS.

ROCs on the otherhand, are not handled by kopernicus but the stockgame which is obviously, optimized for stock scale. This will probably require a different mod or an ROC implementation for kopernicus or even a change in the base game.

I assume you've already tried to lower the frequency in the rocsdef.cfg?

Link to comment
Share on other sites

1 minute ago, 4x4cheesecake said:

ROCs on the otherhand, are not handled by kopernicus but the stockgame which is obviously, optimized for stock scale. This will probably require a different mod or an ROC implementation for kopernicus or even a change in the base game.

I assume you've already tried to lower the frequency in the rocsdef.cfg?

Reducing frequency helps but it doesn't address the core problem which is that they aren't supposed to be there at all but are instead somehow being forced to be active by Kopernicus. It's not just the numbers it's that they are there at all. In my screenshot? You shouldn't see that. Never mind the quantity, they're not supposed to be there at all.

Link to comment
Share on other sites

6 minutes ago, Starwaster said:

Reducing frequency helps but it doesn't address the core problem which is that they aren't supposed to be there at all but are instead somehow being forced to be active by Kopernicus. It's not just the numbers it's that they are there at all. In my screenshot? You shouldn't see that. Never mind the quantity, they're not supposed to be there at all.

Totally wild guess: have you tried playing with these? (found in SigmaDimension configs, here: Ike)

&flyingAltitudeThreshold = 18000
&spaceAltitudeThreshold = 50000

Or:

Spoiler

@Scatterer_planetsList:FOR[SigDim2]
{
    @scattererCelestialBodies
    {
        @Item,*
        {
            @loadDistance *= #$@SigmaDimensions/Resize$
            @unloadDistance *= #$@SigmaDimensions/Resize$
        }
    }
}

 

Edited by KerbMav
Link to comment
Share on other sites

Just now, KerbMav said:

Totally wild guess: have you tried playing with these? (found in SigmaDimension configs, here: Ike)

&flyingAltitudeThreshold = 18000
&spaceAltitudeThreshold = 50000

Those are used to adjust science situations; what you're considered to be doing when determining whether and how much science you get from experiments

Link to comment
Share on other sites

4 minutes ago, Starwaster said:

Reducing frequency helps but it doesn't address the core problem which is that they aren't supposed to be there at all but are instead somehow being forced to be active by Kopernicus. It's not just the numbers it's that they are there at all. In my screenshot? You shouldn't see that. Never mind the quantity, they're not supposed to be there at all.

OHHH....ok, yeah that's a problem. Regarding this issue, I'm probably not up-to-date ;)  

Well, since I have already everything setup, I can try to look into this issue as well but kopernicus is a fairly complicated mod and I'm a fairly inexperienced (but always curious), so no promises ;)

Link to comment
Share on other sites

42 minutes ago, nwillard said:

Wow, what great timing. Was plagued by the horrific FPS ocean-collider issue and a workaround is posted the day I look for a fix! Thanks for the workaround, and thanks everyone else for the bug hunting.

Cheers, if you're using the MM patch I posted, let me know if you encounter problems. It works in my JNSQ install, but I haven't given it a super thorough checking.

Edit: Seems to work as intended!

Edited by Jognt
Link to comment
Share on other sites

45 minutes ago, Anonim2 said:

Hi, 

I would like to use 2 planet packs and GEA (1.7.2) - The World Beyond (max 1.6.1) and Outer Kerbin (1.7.x) and I'm playing in version 1.7.2, which Kopernikus I shoud use? 

Kopernicus does not run on 1.7.2. You will need KSP version 1.7.1 or 1.7.3.

Edited by Galileo
Link to comment
Share on other sites

44 minutes ago, Anonim2 said:

Hi, 

I would like to use 2 planet packs and GEA (1.7.2) - The World Beyond (max 1.6.1) and Outer Kerbin (1.7.x) and I'm playing in version 1.7.2, which Kopernikus I shoud use? 

Update to KSP 1.7.3

There is no version of Kopernicus released for KSP 1.7.2

Link to comment
Share on other sites

Btw, for those of you who don't know how to MM patch/those who don't use Mod Manager/those whose heads are in the clouds etc, here is the patch by @Jognt, provided in a handy .cfg file just for you*.

Simply download this and extract/copy the contents to your GameData/Kopernicus/Config file.

* I accept no responsibility for damage/loss of life/spontaneous combustion of PC/Kerbal sentience etc.

Kopernicus Stutter Fix (KSP 1.7.3)

PS - You MAY see ocean flickering on some stellar bodies (notably Minmus) but it's a temporary workaround for now. Sorry!

Edited by Diddly Feelerino
Link to comment
Share on other sites

1 hour ago, Diddly Feelerino said:

Btw, for those of you who don't know how to MM patch/those who don't use Mod Manager/those whose heads are in the clouds etc, here is the patch by @Jognt, provided in a handy .cfg file just for you*.

Simply download this and extract/copy the contents to your GameData/Kopernicus/Config file.

* I accept no responsibility for damage/loss of life/spontaneous combustion of PC/Kerbal sentience etc.

Kopernicus Stutter Fix (KSP 1.7.3)

PS - You MAY see ocean flickering on some stellar bodies (notably Minmus) but it's a temporary workaround for now. Sorry!

I’m actually rather curious about Moho.. what with the MoHole and such..

Link to comment
Share on other sites

25 minutes ago, whitespacekilla said:

Helpful note, if you're having unplayable framerate issues on Duna w/ Kopernicus installed, it may be caused by Kopernicus. Next update should resolve.

There's a temporary patch a few posts up if it's the same problem. (probably is?)

Link to comment
Share on other sites

2 hours ago, whitespacekilla said:

Helpful note, if you're having unplayable framerate issues on Duna w/ Kopernicus installed, it may be caused by Kopernicus. Next update should resolve.

I've had this happening for a while but I can never figure out if it's a mod or just my computer being slow, it stops the lag as soon as the camera is below the ground. I can still see terrain, just not the piece I'm on without serious lag.

Edit: I think it's just my laptop's intel graphics

Edited by frencrs
Link to comment
Share on other sites

1 hour ago, Jognt said:

There's a temporary patch a few posts up if it's the same problem. (probably is?)

Somehow I missed that! The KopernicusBuoyancy component is causing the issue so I just removed it, all references to it, and recompiled (silky smooth now) but I can see how the MM patch adding oceans would help.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...