Jump to content

[0.23.5] KerbCam v0.13 (camera pathing tool for videos)


huin

Feature/priorities wishlist - where should I spend my (limited) time next on KerbCam?  

53 members have voted

  1. 1. Feature/priorities wishlist - where should I spend my (limited) time next on KerbCam?

    • Tutorial video (volunteer creators welcome)
      49
    • Control camera on IVA
      119
    • Control camera on map
      18
    • Refactor GUI (the GUI is painfully arranged and needs to be rearranged)
      55
    • Experiment with ideas
      22
    • Clean up bugs/papercuts
      38
    • Other, post below.
      11


Recommended Posts

  • 3 weeks later...

Anybody noticed how when following a path, there's sometimes little freezes? Especially when recording. I notice it all the time in my cinematics and a few in other youtuber's cinematics. It becomes very distracting and can seperate the audience from an otherwise beautiful moment. Could this be fixed? Or is it nothing to do with Kerbcam in the first place?

Link to comment
Share on other sites

Anybody noticed how when following a path, there's sometimes little freezes? Especially when recording. I notice it all the time in my cinematics and a few in other youtuber's cinematics. It becomes very distracting and can seperate the audience from an otherwise beautiful moment. Could this be fixed? Or is it nothing to do with Kerbcam in the first place?

Yes, I've noticed it as well in the same contexts as yourself. I'm not sure if it's Kerbcam or not... I suspect it is, but I never took the time to pin it down.

Link to comment
Share on other sites

Yes, I've noticed it as well in the same contexts as yourself. I'm not sure if it's Kerbcam or not... I suspect it is, but I never took the time to pin it down.

Think you could take a stab at fixing it? Perhaps when you have a bit of spare time?

Link to comment
Share on other sites

Think you could take a stab at fixing it? Perhaps when you have a bit of spare time?

Okay, I think I've discovered the problem with a fairly high degree of certainty: garbage collection pauses.

(nerdy bit) This has been a little fiddly to find, but some of the juddering effects seem to correlate fairly well with when System.GC.GetTotalMemory(false); reports a lower number than in the previous frame, which would seem to imply that a GC has occurred - GC.CollectionCount(0) seems to back this up. These GC pauses seem to happen every 3-4 seconds from what I can tell, even when Kerbcam isn't doing anything significant.

Layman's explanation (in case people don't know about garbage collection): KSP is written to use a runtime that uses garbage-collection based memory management. This means that periodically the game's runtime scans to see if any previously allocated memory can be reclaimed for use. (hmm, not a terribly clear explanation I guess): more information here: http://en.wikipedia.org/wiki/Garbage_collection_(computer_science) - note the section on "Disadvantages": "The moment when the garbage is actually collected can be unpredictable, resulting in stalls scattered throughout a session"

There's not a good simple way to deal with this. GC pauses can be reduced, but that requires some profiling of the program to see where memory is being needlessly allocated to excess, and fixing them. That probably requires a debug build that only Squad will have access to (and C#/.NET-related skills I don't have).

GC pauses can be made more frequent (i.e worse) if any (or many) of the following are true:

  • There is less memory available to the program
  • The program is using more memory
  • The rate of garbage generation is higher

The latter two could be negatively influencing things with having more mods available. Adding more memory isn't strictly a solution either - it might theoretically make GC pauses less frequent, but they might last longer (i.e more noticeable when they *do* happen).

Mind you - I'm not an expert on GCing in general, and my usual experience with GCs is on the Java runtime rather than .NET/Mono. My knowledge might therefore be slightly off.

Link to comment
Share on other sites

New release v0.13 posted. Put in some fixes I've wanted to put in, but hadn't done because I hadn't got the development environment set up - which I set up to look at the frame-stalling/juddering problem. Didn't fix that problem, but did the other stuff anyway. Hope this is at least a mild improvement over the last (nearly year-old) release.

Link to comment
Share on other sites

New release v0.13 posted. Put in some fixes I've wanted to put in, but hadn't done because I hadn't got the development environment set up - which I set up to look at the frame-stalling/juddering problem. Didn't fix that problem, but did the other stuff anyway. Hope this is at least a mild improvement over the last (nearly year-old) release.

I've just started having a look at doing modding with a view to using this amazing plugin to do some vids. My first plugin has started with some frame rate functionality and I've been analysing mods using it and Kerbcam. I can tell you that the flaw in my code has the identical source as the flaw in the Kerbcam code. The timer is tied to the KSP's Unity time not the time of the client machine. This means that any slowdown due to physics calculation is slowing down the time of my plugin and Kerbcam in exactly the same way. This is exceedingly obvious when I do "1 second" shots with a 1500 part craft that shutter through the Kerbcam sequence for about 5 seconds.

I have to fix my plugin to get FPS on machine time, not just Unity physic engine time so I'll be researching the solution. Can I mess around in your code and send through a working solution if it comes to light?

Link to comment
Share on other sites

I`d like to try this mod but there is no way curse will get any of my business.

I know it`s me missing out but I won`t use mods only hosted on curse.

EDIT : downloaded the google drive archive of 0.13 (nearly downloaded 0.9, your versions are a little out of order)

Link to comment
Share on other sites

I`d like to try this mod but there is no way curse will get any of my business.

I know it`s me missing out but I won`t use mods only hosted on curse.

EDIT : downloaded the google drive archive of 0.13 (nearly downloaded 0.9, your versions are a little out of order)

Unfortunately it's simply being ordered lexographically rather than numerically, and I'm not really in favour of putting padding zeros in version numbers.

- - - Updated - - -

The v0.13 zip on curse includes various KSP assemblies that should probably not be redistributed.

Looking forward to trying this out!

Ugh - well spotted, thanks. Removed.

- - - Updated - - -

I've just started having a look at doing modding with a view to using this amazing plugin to do some vids. My first plugin has started with some frame rate functionality and I've been analysing mods using it and Kerbcam. I can tell you that the flaw in my code has the identical source as the flaw in the Kerbcam code. The timer is tied to the KSP's Unity time not the time of the client machine. This means that any slowdown due to physics calculation is slowing down the time of my plugin and Kerbcam in exactly the same way. This is exceedingly obvious when I do "1 second" shots with a 1500 part craft that shutter through the Kerbcam sequence for about 5 seconds.

I have to fix my plugin to get FPS on machine time, not just Unity physic engine time so I'll be researching the solution. Can I mess around in your code and send through a working solution if it comes to light?

Please do :)

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
I have the same question :o

Get Toolbar. Or you can rebind the key by doing this

  • Some laptops may have trouble pressing F8 to toggle the window, and are therefore unable to change the keybinding to anything else. Workaround: Make a text file inside your top-level KSP directory called "kerbcam.cfg" (use Notepad, or similar), copy/paste the following into it: (change F8 to a value from the Unity3d KeyCode reference.)
    KEY_BINDINGS
    {
    KEY_TOGGLE_WINDOW = F8
    }

Link to comment
Share on other sites

I used KerbCam in 0.23 and it worked fine, but can't get it to work in 0.24. F8 wont pop the window. (And no, since it worked before, it's not just an issue with the key binding.)

Looking in KSP.log I see this:

[LOG 16:53:56.950] AddonLoader: Instantiating addon 'KerbCam' from assembly 'KerbCam'
[EXC 16:53:56.963] NullReferenceException: Object reference not set to an instance of an object
[WRN 16:53:56.990] File 'kerbcam.cfg' does not exist
[WRN 16:53:56.990] KerbCam could not load its configuration. This is okay if one has not been saved yet.
[WRN 16:53:56.991] File 'kerbcam-paths.cfg' does not exist
[WRN 16:53:56.991] KerbCam could not load paths. This is okay if they have not been saved yet.

Another confusing thing: My previously downloaded version of KerbCam is much larger than the one I find now. Both are called 0.13. This is the old one (from July 8):

  Length     Date   Time    Name
-------- ---- ---- ----
547 07-01-14 23:41 KerbCam/icon.png
0 07-01-14 23:19 KerbCam/Plugins/
3469824 04-01-14 17:09 KerbCam/Plugins/Assembly-CSharp.dll
461824 04-01-14 17:05 KerbCam/Plugins/Assembly-CSharp-firstpass.dll
69632 07-01-14 23:39 KerbCam/Plugins/KerbCam.dll
313344 07-20-13 17:33 KerbCam/Plugins/Mono.Cecil.dll
292864 01-06-14 16:02 KerbCam/Plugins/Mono.Security.dll
1232384 01-06-14 16:02 KerbCam/Plugins/System.Xml.dll
15872 09-30-13 17:48 KerbCam/Plugins/TDx.TDxInput.dll
545280 01-08-14 08:06 KerbCam/Plugins/UnityEngine.dll
1332 03-04-13 20:11 KerbCam/LICENSE.txt
-------- -------
6402903 11 files

and this is the one I find through the link at the beginning of this thread:

  Length     Date   Time    Name
-------- ---- ---- ----
547 07-01-14 23:41 KerbCam/icon.png
0 07-01-14 23:19 KerbCam/Plugins/
69632 07-01-14 23:39 KerbCam/Plugins/KerbCam.dll
1332 03-04-13 20:11 KerbCam/LICENSE.txt
-------- -------
71511 4 files

So, which one is the right one?

Link to comment
Share on other sites

  • 2 weeks later...
I used KerbCam in 0.23 and it worked fine, but can't get it to work in 0.24. F8 wont pop the window. (And no, since it worked before, it's not just an issue with the key binding.)

Looking in KSP.log I see this:

[LOG 16:53:56.950] AddonLoader: Instantiating addon 'KerbCam' from assembly 'KerbCam'
[EXC 16:53:56.963] NullReferenceException: Object reference not set to an instance of an object
[WRN 16:53:56.990] File 'kerbcam.cfg' does not exist
[WRN 16:53:56.990] KerbCam could not load its configuration. This is okay if one has not been saved yet.
[WRN 16:53:56.991] File 'kerbcam-paths.cfg' does not exist
[WRN 16:53:56.991] KerbCam could not load paths. This is okay if they have not been saved yet.

Another confusing thing: My previously downloaded version of KerbCam is much larger than the one I find now. Both are called 0.13. This is the old one (from July 8):

  Length     Date   Time    Name
-------- ---- ---- ----
547 07-01-14 23:41 KerbCam/icon.png
0 07-01-14 23:19 KerbCam/Plugins/
3469824 04-01-14 17:09 KerbCam/Plugins/Assembly-CSharp.dll
461824 04-01-14 17:05 KerbCam/Plugins/Assembly-CSharp-firstpass.dll
69632 07-01-14 23:39 KerbCam/Plugins/KerbCam.dll
313344 07-20-13 17:33 KerbCam/Plugins/Mono.Cecil.dll
292864 01-06-14 16:02 KerbCam/Plugins/Mono.Security.dll
1232384 01-06-14 16:02 KerbCam/Plugins/System.Xml.dll
15872 09-30-13 17:48 KerbCam/Plugins/TDx.TDxInput.dll
545280 01-08-14 08:06 KerbCam/Plugins/UnityEngine.dll
1332 03-04-13 20:11 KerbCam/LICENSE.txt
-------- -------
6402903 11 files

and this is the one I find through the link at the beginning of this thread:

  Length     Date   Time    Name
-------- ---- ---- ----
547 07-01-14 23:41 KerbCam/icon.png
0 07-01-14 23:19 KerbCam/Plugins/
69632 07-01-14 23:39 KerbCam/Plugins/KerbCam.dll
1332 03-04-13 20:11 KerbCam/LICENSE.txt
-------- -------
71511 4 files

So, which one is the right one?

The latter, with fewer files. There was a build of KerbCam which accidentally copied the KSP core DLLs into the distribution, and I didn't notice. Since it was probably (accidentally) violating copyright and also just messy and grr I replaced it with the same build, sans the KSP files. I imagine either downloaded file would work, but rather wish that the first/larger one had never happened (and it's possible that including the extra KSP files might mess things up, particularly in versions of KSP other than that I built against.).

Link to comment
Share on other sites

The latter, with fewer files. There was a build of KerbCam which accidentally copied the KSP core DLLs into the distribution, and I didn't notice. Since it was probably (accidentally) violating copyright and also just messy and grr I replaced it with the same build, sans the KSP files. I imagine either downloaded file would work, but rather wish that the first/larger one had never happened (and it's possible that including the extra KSP files might mess things up, particularly in versions of KSP other than that I built against.).

Thanks, that's what I suspected. Unfortunately, it doesn't help, I still can't get it to work. Still getting that NullReferenceException in the log when it's instantiating. The only other add-on I have is MechJeb 2.3 btw.

Link to comment
Share on other sites

Thanks, that's what I suspected. Unfortunately, it doesn't help, I still can't get it to work. Still getting that NullReferenceException in the log when it's instantiating. The only other add-on I have is MechJeb 2.3 btw.

Upgrade to MechJeb 2.4.0, as v2.3.0 is outdated.

Link to comment
Share on other sites

  • 2 weeks later...
/.../ I still can't get it to work. Still getting that NullReferenceException in the log when it's instantiating. The only other add-on I have is MechJeb 2.3 btw.

Finally got around to upgrading to 0.25, and KerbCam now works again!

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