Recommended Posts

3 hours ago, The White Guardian said:

- Smart searching for configs (as requested by @Galileo). In V2, KS3P will search through the GameData directory for all KS3P config files, and process the first one it finds. That way, KS3P configurations can be bundled with mods.

Now that you've released Version 2.0 (sorry for the lousy timing - I'm still working through my morning coffee)... how about a feature request based on your config layout change.

The one issue I see from a usability perspective with the V2.0 mechanic as described is that if I have a particular setup I like, I have to play games to make sure my profile "wins" at load time.

1) add a "name = " field to the high-level node - this makes it easier to apply MM patches to specific KS3P configs (which is a side effect of the change, not my main reason). 

Named Post_Processing nodes allow for 2) a basic UI, say from the space center scene, that provides a list of all of the (named) KS3P profiles, so the player could select a profile in-game (even if KS3P requires a quit-and-restart for it to apply).  It wouldn't have to be a fancy UI - just a list of the profiles with an option to pick one by name and select it (or apply it if the code allows for immediately swapping out profiles).

Being able to select a profile in-game so that KS3P remembers it and selects it at launch would be a much friendlier approach, and it opens the mod up to people who are less comfortable with rooting around config files (and makes it easier for people who *do* like tweaking configs to share their customizations).  Realistically, most people will set it and forget it, but when testing out a new profile, it'd be nice to have a simple way to switch between profiles to decide which one is more appealing.

Anyway, off to download v2.0. :)

 

Share this post


Link to post
Share on other sites
1 hour ago, MOARdV said:

Now that you've released Version 2.0 (sorry for the lousy timing - I'm still working through my morning coffee)... how about a feature request based on your config layout change.

The one issue I see from a usability perspective with the V2.0 mechanic as described is that if I have a particular setup I like, I have to play games to make sure my profile "wins" at load time.

1) add a "name = " field to the high-level node - this makes it easier to apply MM patches to specific KS3P configs (which is a side effect of the change, not my main reason). 

Named Post_Processing nodes allow for 2) a basic UI, say from the space center scene, that provides a list of all of the (named) KS3P profiles, so the player could select a profile in-game (even if KS3P requires a quit-and-restart for it to apply).  It wouldn't have to be a fancy UI - just a list of the profiles with an option to pick one by name and select it (or apply it if the code allows for immediately swapping out profiles).

Being able to select a profile in-game so that KS3P remembers it and selects it at launch would be a much friendlier approach, and it opens the mod up to people who are less comfortable with rooting around config files (and makes it easier for people who *do* like tweaking configs to share their customizations).  Realistically, most people will set it and forget it, but when testing out a new profile, it'd be nice to have a simple way to switch between profiles to decide which one is more appealing.

Anyway, off to download v2.0. :)

 

Indeed, the 'wins at runtime' scenario is but a temporary solution to the problem. In the future I will let it search for all configs and process them. The problem that this creates, however, is that only one post-processing profile can be active at one time. So indeed, I'll have to figure out a way to make this toggleable on the fly.

 

A possibility could be to indeed name the Post_Processing node. For example, let's take @Galileo's amazing SVE pack, and let's say that it featured a custom configuration for KS3P. In that case, we could set up a config like:

Post_Processing
{
	name = SVE_PostProcessing
	...
}

 

I believe the idea is to then be able to select and save the Post-Processing configuration in-game through a user-interface. Using the example above, we could for example bundle multiple setups with a mod and let users pick the one they prefer. Problem is, I've never done UI and config saving in KSP before, but I'm confident I can figure it out.

 

I'll note it for the next release. :)

Edited by The White Guardian

Share this post


Link to post
Share on other sites

Update to the above: my inner workaholic got the better of me and already started working on it.

I've locally made changes to the source code: all found profiles are stored in a so-called 'dictionary' along with that profile's name. I've already set up the 'reload' mechanic that re-generates all data on demand. All I have to do is press the button, and KS3P will re-generate all profiles using an entry from the dictionary. What configuration it grabs from the dictionary depends on the value of 'Target_Profile' in the mod's settings.cfg file. All I need to do now is find a way to make this value editable in-game through a GUI.

Share this post


Link to post
Share on other sites

I am having spam fps killer in flight (for now it appears to be random and it comes and goes very often) like these:

[EXC 15:14:19.346] NullReferenceException: Object reference not set to an instance of an object
 KS3P.Configuration.Applier_Flight.PatchCamera (KS3P.UnityPostProcessing.PostProcessingProfile targetProfile, Boolean isEnabled)
 KS3P.Configuration.Applier_Flight.Update ()

<Am using Dx11, TU, EVE+SciFi, and not much other graphics mod.
I disabled all the AA in the config file (setted to 0 in all scenes) and am using Version 2.0
log: https://www.dropbox.com/s/agdb6h4ka1fzry8/log.cfg.rar?dl=0

Edited by Agustin

Share this post


Link to post
Share on other sites
8 minutes ago, Agustin said:

I am having spam fps killer in flight (for now it appears to be random and it comes and goes very often) like these:

[EXC 15:14:19.346] NullReferenceException: Object reference not set to an instance of an object
 KS3P.Configuration.Applier_Flight.PatchCamera (KS3P.UnityPostProcessing.PostProcessingProfile targetProfile, Boolean isEnabled)
 KS3P.Configuration.Applier_Flight.Update ()

<Am using Dx11, TU, EVE+SciFi, and not much other graphics mod.
I disabled all the AA in the config file and am using Version 2.0
log: https://www.dropbox.com/s/agdb6h4ka1fzry8/log.cfg.rar?dl=0

I'm having trouble opening rar-files, could you paste the log into a comment? (Just be sure to put it inside a spoiler - when writing a message, click the eye-icon in the toolbar)

At least I can already see where the problem happened - the 'PatchCamera' function called by the Update() function inside the class Applier_Flight. That already narrows down the source of the problem for me.

 

EDIT: a possible cause could be that KS3P uses data from the built-in 'FlightGlobals' class, while the FlightGlobals class itself may not be ready yet. I've added a quick fix for this behavior, though it is no guarantee that that is causing the problems on your end.

Edited by The White Guardian

Share this post


Link to post
Share on other sites
Spoiler
[LOG 142452.656]  Log Initiated for Kerbal Space Program - 1.3.1.1891 (WindowsPlayer x64) en-us
Kerbal Space Program - 1.3.1.1891 (WindowsPlayer x64) en-us

OS Windows 10  (10.0.0) 64bit
CPU Intel(R) Core(TM) i5-3330 CPU @ 3.00GHz (4)
RAM 8145
GPU NVIDIA GeForce GT 720 (2018MB)
SM 50 (Direct3D 11.0 [level 11.0])
RT Formats ARGB32, Depth, ARGBHalf, Shadowmap, Default, ARGB2101010, DefaultHDR, ARGBFloat, RGFloat, RGHalf, RFloat, RHalf, R8, ARGBInt, RGInt, RInt, BGRA32, RGB111110Float
 

It diesn't let me copy the whole log it seems. You want the ksp.log inside the root directory, right? or the one inside ksp64 flder?

Edited by Agustin

Share this post


Link to post
Share on other sites
1 minute ago, Agustin said:
  Reveal hidden contents
[LOG 142452.656]  Log Initiated for Kerbal Space Program - 1.3.1.1891 (WindowsPlayer x64) en-us
Kerbal Space Program - 1.3.1.1891 (WindowsPlayer x64) en-us

OS Windows 10  (10.0.0) 64bit
CPU Intel(R) Core(TM) i5-3330 CPU @ 3.00GHz (4)
RAM 8145
GPU NVIDIA GeForce GT 720 (2018MB)
SM 50 (Direct3D 11.0 [level 11.0])
RT Formats ARGB32, Depth, ARGBHalf, Shadowmap, Default, ARGB2101010, DefaultHDR, ARGBFloat, RGFloat, RGHalf, RFloat, RHalf, R8, ARGBInt, RGInt, RInt, BGRA32, RGB111110Float
 

It diesn't let me copy the whole log it seems. You want the ksp.log inside the root directory, right? or the one inside ksp64 flder?

Inside the root directory, yes. Could you then perhaps compress it as a .zip file, or upload the .txt directly to DropBox?

Share this post


Link to post
Share on other sites
17 minutes ago, Agustin said:

I have no idea what's going on there. The system throws a 'null reference exception', ergo, it's being fed invalid data, but I have no idea where the invalid data would be.

 

The exception occurs in the PatchCamera method, which uses three factors:

- The main camera (which has to exist otherwise you'd get black screen errors)

- The post-processing profile (which also has to exist because the log file confirms that everything loaded correctly)

- A boolean that determines whether or not post-processing should be enabled

None of them can be invalid. I'm quite stumped.

 

Checking my own KSP install shows the same nullref spam, I probably didn't notice it because i5-6400 quad core. The frame drop here is negligible.

 

I'll debug it ASAP. Thank you so much for bringing this to my attention, I'll try to figure out where and why the problem occurs.

Share this post


Link to post
Share on other sites
1 hour ago, The White Guardian said:

I have no idea what's going on there. The system throws a 'null reference exception', ergo, it's being fed invalid data, but I have no idea where the invalid data would be.

 

The exception occurs in the PatchCamera method, which uses three factors:

- The main camera (which has to exist otherwise you'd get black screen errors)

- The post-processing profile (which also has to exist because the log file confirms that everything loaded correctly)

- A boolean that determines whether or not post-processing should be enabled

None of them can be invalid. I'm quite stumped.

 

Checking my own KSP install shows the same nullref spam, I probably didn't notice it because i5-6400 quad core. The frame drop here is negligible.

 

I'll debug it ASAP. Thank you so much for bringing this to my attention, I'll try to figure out where and why the problem occurs.

Don't forget that KSP defies a lot of Unity rules, especially when concerning the main camera. There are in fact multiple main cameras that are blended.

Share this post


Link to post
Share on other sites
58 minutes ago, Electrocutor said:

Don't forget that KSP defies a lot of Unity rules, especially when concerning the main camera. There are in fact multiple main cameras that are blended.

I've updated the script to check if at least one 'main' camera exists. If none exist, the script is aborted, and KS3P will try again the next frame.

Edited by The White Guardian

Share this post


Link to post
Share on other sites
On 24/12/2017 at 9:26 PM, Rocket In My Pocket said:

Ahh, the best solution is often the simplest one.

Nice idea! Makes for a good first post.

Welcome to the forums by the way!

 

Thanks haha, I've been playing since 0.13.3 and lurking the whole time so I figured it was about time to hop on aha.

I shall have to update to v2 this evening!

Share this post


Link to post
Share on other sites

@Agustin Quick question: are you having nullref spam when in control of a craft that:

- Is not an EVA Kerbal

- Is not manned (a probe for example)

I think I may have found the cause of the nullref spam, but I've gotta be certain.

Edited by The White Guardian

Share this post


Link to post
Share on other sites
3 hours ago, The White Guardian said:

@Agustin Quick question: are you having nullref spam when in control of a craft that:

- Is not an EVA Kerbal

- Is not manned (a probe for example)

I think I may have found the cause of the nullref spam, but I've gotta be certain.

I am flying a probe and when I go to map view : non stop spam. Back to flight view, it stops. I'll continue trying different situations.
EDIT: Now I am landed in a manned vessel in mun, and the same issue. Map view, non stop spam, flight view, it stops and calms down( I have to say also, Using the low resolution dirt pngs from Galileo has given me more fps in my mid end computer. It just when the full spam that comes which breaks the fps...

Edited by Agustin

Share this post


Link to post
Share on other sites
19 hours ago, The White Guardian said:

Quick question: are you having nullref spam when in control of a craft that:

- Is not an EVA Kerbal

- Is not manned (a probe for example)

I think I may have found the cause of the nullref spam, but I've gotta be certain.

I can confirm the NullRef exceptions being thrown in map view.

Tested it with a probe, manned craft, and an EVA Kerbal. All the same thing. If there is any other testing I can do or logs I can upload to help you out, just let me know. One rather odd side note is that the FPS drop is way more severe with the debug menu open, actually viewing the exceptions being thrown. (Down to like 15 from 60 with major intermittent hitching) With the debug menu closed it shoots back up to like 50 out of 60.

(I never noticed the FPS loss myself either, even at the lowest point my new rig runs it better than my old one did on it's best day lol.)

Edited by Rocket In My Pocket

Share this post


Link to post
Share on other sites

Releasing a hotfix ASAP tackling the following issues:

- KS3P should avoid NullRef spam by checking the state of the FlightGlobals before attempting to access them
- KS3P should avoid NullRef spam by checking if the IVA cam is enabled before attempting to access it
- Support for tracking station & map view temporarily removed to avoid nullref spam

Share this post


Link to post
Share on other sites
1 hour ago, The White Guardian said:

- Support for tracking station & map view temporarily removed to avoid nullref spam

I would honestly keep it that way. I feel the map view and tracking station are seeing the system from a different perspective, like a group of guys in white shirts in ties are watching a simulation from a room on the home world. If they are seeing things like that, they should really clean the lenses on their glasses

Edited by Galileo

Share this post


Link to post
Share on other sites
2 hours ago, The White Guardian said:

Releasing a hotfix ASAP tackling the following issues:

- KS3P should avoid NullRef spam by checking the state of the FlightGlobals before attempting to access them
- KS3P should avoid NullRef spam by checking if the IVA cam is enabled before attempting to access it
- Support for tracking station & map view temporarily removed to avoid nullref spam

I hope you are updating the version number?  I just checked, don't see a new version on Spacedock.

This is absolutely amazing, it's now on my "must-have" mod list

Edited by linuxgurugamer

Share this post


Link to post
Share on other sites

Perhaps this mod can give you a sense of passed time?

What if, with longer mission times the dirt textures gets dirtier?

And the chromatic aberrations get fewer by "years played".

Share this post


Link to post
Share on other sites
11 hours ago, The White Guardian said:

Releasing a hotfix ASAP tackling the following issues:

- KS3P should avoid NullRef spam by checking the state of the FlightGlobals before attempting to access them
- KS3P should avoid NullRef spam by checking if the IVA cam is enabled before attempting to access it
- Support for tracking station & map view temporarily removed to avoid nullref spam

where is that update?

Share this post


Link to post
Share on other sites
13 hours ago, linuxgurugamer said:

This is absolutely amazing, it's now on my "must-have" mod list

Woah! Easy there Linux, he hasn't even abandoned it yet! :wink:

22 minutes ago, Agustin said:

where is that update?

Since you said it was affecting your FPS really bad, maybe you should just edit those sections out of the .cfg manually?

...I assume that would work? Worth a try prolly.

Edited by Rocket In My Pocket

Share this post


Link to post
Share on other sites

I HAVE THE SOLUTION TO THE NULLREFERENCE SPAM!

The solution lies in the way that KS3P currently works. It works by attaching a 'GameComponent' to the camera in charge of rendering the screen - a 'Post-Processing Behaviour' component. This component processes a scene-specific 'post-processing profile', and these profiles are generated on load from the data in the config file.

The problem lies in the way KS3P finds the camera to edit. It currently uses the method 'Camera.main'. The problem is that Camera.main actually searches for a camera tagged 'Main Camera'. It is very likely that the map view and tracking station do not use a camera with this tag and therefore glitch out.

I will be writing a new method of finding the correct camera shortly. Until then, support for the map view and tracking station is removed.

5 hours ago, Rocket In My Pocket said:

Since you said it was affecting your FPS really bad, maybe you should just edit those sections out of the .cfg manually?

...I assume that would work? Worth a try prolly.

Then KS3P disables support for that scene, yes.

5 hours ago, Agustin said:

where is that update?

I posted that at 2 AM, and I just finished the update. Should be on SpaceDock.

Share this post


Link to post
Share on other sites

NOTE FOR EVERYONE USING KS3P

Even though support for the map view and tracking station is removed, that doesn't mean it's gone for good. I will immediately begin working on a new, better camera targeting method designed to work in the map view and tracking station as well.

An update to config files is also not necessary, as KS3P simply won't target profiles for non-existent or unsupported scenes.

Share this post


Link to post
Share on other sites

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.