Beale Posted November 1, 2020 Author Share Posted November 1, 2020 On 10/27/2020 at 7:26 PM, dieDoktor said: Would you say that the camera transform step is particularly difficult? I ask because I would like to apply the module to other mods I have installed but I don't have any experience with Unity. (Although I do feel confident in my ability to edit text files ) Thanks : ) Heya, If you're adding it to your own parts it's incredibly incredibly easy, just keep the transform Blue = forward, Green = up. Adding to somebody else's parts is a little trickier, because you will need to import the Mu file, but there are tools for this (Taniwha blender Mu plugin for example). Quote Link to comment Share on other sites More sharing options...
Beale Posted November 5, 2020 Author Share Posted November 5, 2020 Neptune Camera V2.5 Download and Releases (GitHub) Source Code (GitHub) Cameras can now have custom titles, for multiple cameras on the same part. Thanks for the suggestion from @Zorg Quote Link to comment Share on other sites More sharing options...
Zorg Posted November 5, 2020 Share Posted November 5, 2020 4 minutes ago, Beale said: Fantastic! Will be very useful thanks Quote Link to comment Share on other sites More sharing options...
computercat04 Posted November 5, 2020 Share Posted November 5, 2020 7 minutes ago, Beale said: Neptune Camera V2.5 Download and Releases (GitHub) Source Code (GitHub) Cameras can now have custom titles, for multiple cameras on the same part. Thanks for the suggestion from @Zorg Pretty nice. Quote Link to comment Share on other sites More sharing options...
Goaty1208 Posted November 5, 2020 Share Posted November 5, 2020 Cool Quote Link to comment Share on other sites More sharing options...
OrbitalManeuvers Posted November 5, 2020 Share Posted November 5, 2020 On 8/16/2020 at 5:54 AM, Beale said: cameraHasCustomNearClipPlane = True cameraCustomNearClipPlane = 0.01 Going for a wild guess here. Does this cull objects from the scene based on their distance from the transform? Like, for removing other spacecraft parts from the image? Quote Link to comment Share on other sites More sharing options...
OrbitalManeuvers Posted November 5, 2020 Share Posted November 5, 2020 Some testing results ... Spoiler Using this config: @PART[bluedog_LunarOrbiter_Camera] { MODULE { name = ModuleNeptuneCamera cameraHasCustomTitle = True cameraCustomTitle = "HighRes" cameraTransformName = cameraTransform cameraType = GREYSCALE_COLOUR cameraFieldOfView = 30 cameraHorizontalResolution = 800 cameraVerticalResolution = 600 cameraHasErrors = True cameraErrorRate = 1 cameraHasNoise = True cameraNoiseMaxStrength=8 } MODULE { name = ModuleNeptuneCamera cameraHasCustomTitle=True cameraCustomTitle = "MedRes" cameraTransformName = cameraTransform cameraType = GREYSCALE_COLOUR cameraFieldOfView = 140 cameraHorizontalResolution = 640 cameraVerticalResolution = 480 cameraHasErrors = True cameraErrorRate = 1 cameraHasNoise = True cameraNoiseMaxStrength = 4 } } This is what happens in game: Here's the PAW, looks perfect. I wasn't sure if the custom camera was per part, or per transform, but this seems to be working with two cameras on a single transform. Here's MedRes followed by HighRes taken right after each other click click. To me it looks right except the FOV looks identical in both images? Have I declared something incorrectly? Quote Link to comment Share on other sites More sharing options...
computercat04 Posted November 5, 2020 Share Posted November 5, 2020 13 minutes ago, OrbitalManeuvers said: Some testing results ... Hide contents Using this config: @PART[bluedog_LunarOrbiter_Camera] { MODULE { name = ModuleNeptuneCamera cameraHasCustomTitle = True cameraCustomTitle = "HighRes" cameraTransformName = cameraTransform cameraType = GREYSCALE_COLOUR cameraFieldOfView = 30 cameraHorizontalResolution = 800 cameraVerticalResolution = 600 cameraHasErrors = True cameraErrorRate = 1 cameraHasNoise = True cameraNoiseMaxStrength=8 } MODULE { name = ModuleNeptuneCamera cameraHasCustomTitle=True cameraCustomTitle = "MedRes" cameraTransformName = cameraTransform cameraType = GREYSCALE_COLOUR cameraFieldOfView = 140 cameraHorizontalResolution = 640 cameraVerticalResolution = 480 cameraHasErrors = True cameraErrorRate = 1 cameraHasNoise = True cameraNoiseMaxStrength = 4 } } This is what happens in game: Here's the PAW, looks perfect. I wasn't sure if the custom camera was per part, or per transform, but this seems to be working with two cameras on a single transform. Here's MedRes followed by HighRes taken right after each other click click. To me it looks right except the FOV looks identical in both images? Have I declared something incorrectly? I think you can do a commit in the BDB GitHub page to add this functionality. Quote Link to comment Share on other sites More sharing options...
OrbitalManeuvers Posted November 5, 2020 Share Posted November 5, 2020 1 hour ago, computercat04 said: I think you can do a commit in the BDB GitHub page to add this functionality. well not exactly a commit, but i'll definitely be sharing anything I do with the rest of the BDB folks once I get more working. Quote Link to comment Share on other sites More sharing options...
computercat04 Posted November 6, 2020 Share Posted November 6, 2020 4 minutes ago, OrbitalManeuvers said: well not exactly a commit, but i'll definitely be sharing anything I do with the rest of the BDB folks once I get more working. Great! I can't wait to use Neptune Camera with BDB! Quote Link to comment Share on other sites More sharing options...
Beale Posted November 6, 2020 Author Share Posted November 6, 2020 11 hours ago, OrbitalManeuvers said: Going for a wild guess here. Does this cull objects from the scene based on their distance from the transform? Like, for removing other spacecraft parts from the image? Exactly right yeah - anything closer than the near clip plane will not be drawn in the camera image. 10 hours ago, OrbitalManeuvers said: Some testing results ... Reveal hidden contents Using this config: @PART[bluedog_LunarOrbiter_Camera] { MODULE { name = ModuleNeptuneCamera cameraHasCustomTitle = True cameraCustomTitle = "HighRes" cameraTransformName = cameraTransform cameraType = GREYSCALE_COLOUR cameraFieldOfView = 30 cameraHorizontalResolution = 800 cameraVerticalResolution = 600 cameraHasErrors = True cameraErrorRate = 1 cameraHasNoise = True cameraNoiseMaxStrength=8 } MODULE { name = ModuleNeptuneCamera cameraHasCustomTitle=True cameraCustomTitle = "MedRes" cameraTransformName = cameraTransform cameraType = GREYSCALE_COLOUR cameraFieldOfView = 140 cameraHorizontalResolution = 640 cameraVerticalResolution = 480 cameraHasErrors = True cameraErrorRate = 1 cameraHasNoise = True cameraNoiseMaxStrength = 4 } } This is what happens in game: Here's the PAW, looks perfect. I wasn't sure if the custom camera was per part, or per transform, but this seems to be working with two cameras on a single transform. Here's MedRes followed by HighRes taken right after each other click click. To me it looks right except the FOV looks identical in both images? Have I declared something incorrectly? This seems like a bug - you have everything correct in config. I will investigate that the FOV is getting applied properly. Thanks for reporting! Quote Link to comment Share on other sites More sharing options...
OrbitalManeuvers Posted November 6, 2020 Share Posted November 6, 2020 (edited) 6 hours ago, Beale said: This seems like a bug - you have everything correct in config. I will investigate that the FOV is getting applied properly. Thank you so much! Sorry, more questions whenever you have a moment ... When deciding on an FOV value for a camera, did you have any guidelines in mind? Is there any kind of numerical relationship between a camera's RL focal length and some reasonable FoV value in KSP? I'm guessing that as focal length goes up, FoV goes down, but that's just a guess about how KSP handles FoV. If you had any kind of method when adding this to the SP stuff, that would be super helpful to know. Also, how similar is the FoV feature to how the Kerbnet window's slider behaves? Lastly, do you have min/max values? Thanks again! Edited November 6, 2020 by OrbitalManeuvers typos Quote Link to comment Share on other sites More sharing options...
Beale Posted November 6, 2020 Author Share Posted November 6, 2020 (edited) 1 hour ago, OrbitalManeuvers said: Thank you so much! Sorry, more questions whenever you have a moment ... When deciding on an FOV value for a camera, did you have any guidelines in mind? Is there any kind of numerical relationship between a camera's RL focal length and some reasonable FoV value in KSP? I'm guessing that as focal length goes up, FoV goes down, but that's just a guess about how KSP handles FoV. If you had any kind of method when adding this to the SP stuff, that would be super helpful to know. Also, how similar is the FoV feature to how the Kerbnet window's slider behaves? Lastly, do you have min/max values? Thanks again! It is a bit hard to explain well really - I have a lot of experience with the Unity camera and well... first person shooters So it feels intuitive enough when I am playing around. The numbers should be quite close to Kerbnet actually, so that is a good rough guide to use. The default FOV, if you don't specify one is the normal KSP camera FOV (I think around 70). There are currently no minimum or maximum values, but a too wide, and possible a too small FOV will probably cause visual bugs - a range of maybe 5 to 100 seems safe to me for a gut instinct. In the future, I would like to look at the possibility of allowing a slider to change FOV in flight (within configurable min-max values), but of course this requires a little more careful thought. For your immediate issue - here is a patch Neptune Camera V2.5.1 Download and Releases (GitHub) Source Code (GitHub) Fixes to custom field of views for camera. You must now use in config the flag "cameraHasCustomFieldOfView" to use this. (Explanation on first page). cameraHasCustomFieldOfView = True cameraFieldOfView = 20 Custom FOV (20) Standard FOV Two cameras, custom FOV and standard. Edited November 6, 2020 by Beale Quote Link to comment Share on other sites More sharing options...
OrbitalManeuvers Posted November 6, 2020 Share Posted November 6, 2020 Unfortunately, this build causes KSP to hang on startup for me, just as it's loading bluedog_LunarOrbiter_Camera, which is the only part I have that uses Neptune. This folder has both my log file and the cfg I'm using: https://drive.google.com/drive/folders/1cvhcCPVdBoCOkm6XLxIK-gIOrnQi0N2L?usp=sharing Just as another data point, I tried this twice, once both cameras had custom FOV and once only one did. But maybe I can save you the download, here's the end of the log: Spoiler [EXC 10:10:59.802] FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list. System.Text.StringBuilder.AppendFormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0) System.String.FormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0) System.String.Format (System.String format, System.Object[] args) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0) NeptuneCamera.ModuleNeptuneCamera.GetInfo () (at <be8e2b05a1e342bb8fbdd06a34088c7c>:0) PartLoader.CompilePartInfo (AvailablePart newPartInfo, Part part) (at <c1858a3f77504bd1aaa946fdccf84670>:0) PartLoader+<CompileParts>d__56.MoveNext () (at <c1858a3f77504bd1aaa946fdccf84670>:0) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <5aeafee3fea24f37abd1315553f2cfa6>:0) UnityEngine.DebugLogHandler:LogException(Exception, Object) ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object) UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object) Quote Link to comment Share on other sites More sharing options...
Beale Posted November 6, 2020 Author Share Posted November 6, 2020 (edited) 3 hours ago, OrbitalManeuvers said: Unfortunately, this build causes KSP to hang on startup for me, just as it's loading bluedog_LunarOrbiter_Camera, which is the only part I have that uses Neptune. This folder has both my log file and the cfg I'm using: https://drive.google.com/drive/folders/1cvhcCPVdBoCOkm6XLxIK-gIOrnQi0N2L?usp=sharing Just as another data point, I tried this twice, once both cameras had custom FOV and once only one did. But maybe I can save you the download, here's the end of the log: Hide contents [EXC 10:10:59.802] FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list. System.Text.StringBuilder.AppendFormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0) System.String.FormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0) System.String.Format (System.String format, System.Object[] args) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0) NeptuneCamera.ModuleNeptuneCamera.GetInfo () (at <be8e2b05a1e342bb8fbdd06a34088c7c>:0) PartLoader.CompilePartInfo (AvailablePart newPartInfo, Part part) (at <c1858a3f77504bd1aaa946fdccf84670>:0) PartLoader+<CompileParts>d__56.MoveNext () (at <c1858a3f77504bd1aaa946fdccf84670>:0) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <5aeafee3fea24f37abd1315553f2cfa6>:0) UnityEngine.DebugLogHandler:LogException(Exception, Object) ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object) UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object) Argh! Okay I will patch as soon as possible, look like a VAB window issue. Thanks for log. Edited November 6, 2020 by Beale Quote Link to comment Share on other sites More sharing options...
computercat04 Posted November 7, 2020 Share Posted November 7, 2020 8 hours ago, Beale said: Neptune Camera V2.5.1 When I downloaded the latest release, I found a problem. The loading screen got stuck here. Here's the KSP.log. Quote Link to comment Share on other sites More sharing options...
Aahz88 Posted November 7, 2020 Share Posted November 7, 2020 Love your mod! I made a stereoscopic camera. Cross your eyes: Or use red-blue glasses: https://imgur.com/a/TrLcFbH Quote Link to comment Share on other sites More sharing options...
Black034 Posted November 7, 2020 Share Posted November 7, 2020 (edited) Using this in combination with Probe control room is incredibly fun, wish more mods picked up on this That said, just updated to last version and now I'm getting stuck loading TantaresSP/../1f_sensor_visible_light_camera_srf_1 :'( Edited November 7, 2020 by Black034 Quote Link to comment Share on other sites More sharing options...
Beale Posted November 7, 2020 Author Share Posted November 7, 2020 13 hours ago, computercat04 said: When I downloaded the latest release, I found a problem. The loading screen got stuck here. Here's the KSP.log. 19 hours ago, OrbitalManeuvers said: Unfortunately, this build causes KSP to hang on startup for me, just as it's loading bluedog_LunarOrbiter_Camera, which is the only part I have that uses Neptune. This folder has both my log file and the cfg I'm using: https://drive.google.com/drive/folders/1cvhcCPVdBoCOkm6XLxIK-gIOrnQi0N2L?usp=sharing Just as another data point, I tried this twice, once both cameras had custom FOV and once only one did. But maybe I can save you the download, here's the end of the log: Reveal hidden contents [EXC 10:10:59.802] FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list. System.Text.StringBuilder.AppendFormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0) System.String.FormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0) System.String.Format (System.String format, System.Object[] args) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0) NeptuneCamera.ModuleNeptuneCamera.GetInfo () (at <be8e2b05a1e342bb8fbdd06a34088c7c>:0) PartLoader.CompilePartInfo (AvailablePart newPartInfo, Part part) (at <c1858a3f77504bd1aaa946fdccf84670>:0) PartLoader+<CompileParts>d__56.MoveNext () (at <c1858a3f77504bd1aaa946fdccf84670>:0) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <5aeafee3fea24f37abd1315553f2cfa6>:0) UnityEngine.DebugLogHandler:LogException(Exception, Object) ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object) UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object) 6 hours ago, Black034 said: Using this in combination with Probe control room is incredibly fun, wish more mods picked up on this That said, just updated to last version and now I'm getting stuck loading TantaresSP/../1f_sensor_visible_light_camera_srf_1 :'( Sorry for the issues fellas, I made a really silly mistake in deployment! Hotfix below. Neptune Camera V2.5.2 Download and Releases (GitHub) Source Code (GitHub) Camera from TantaresSP 7 hours ago, Aahz88 said: Love your mod! I made a stereoscopic camera. Cross your eyes: Or use red-blue glasses: https://imgur.com/a/TrLcFbH I've been looking forward to this since I first saw those parts, great! Quote Link to comment Share on other sites More sharing options...
Black034 Posted November 7, 2020 Share Posted November 7, 2020 What a legend! Have a nice weekend, sir! Quote Link to comment Share on other sites More sharing options...
OrbitalManeuvers Posted November 7, 2020 Share Posted November 7, 2020 3 hours ago, Beale said: Hotfix below. Thank you! Multiple FoV fix is working. Quote Link to comment Share on other sites More sharing options...
computercat04 Posted November 13, 2020 Share Posted November 13, 2020 Hey @Beale, can you make a simple UI showing where a camera is pointing at? Quote Link to comment Share on other sites More sharing options...
OrbitalManeuvers Posted November 13, 2020 Share Posted November 13, 2020 2 hours ago, computercat04 said: Hey @Beale, can you make a simple UI showing where a camera is pointing at? From working on all the BDB cameras, I'm wondering what you'd hope to accomplish with this, or what you're hoping it would help you with? If the camera transform isn't present or isn't pointing in the right direction, there's nothing you can do about it without editing the unity model, and if you can do that you already know what direction the transform is facing. All you'd get from a UI element is "yup, it's wrong" which you already knew since the pictures didn't come out right. That's what this process is: https://github.com/CobaltWolf/Bluedog-Design-Bureau/issues/964 There is a mod you can use in the VAB that shows you lots of debug info like the transforms and their orientations, but it's horrible to use and its displays are essentially useless at the end of the day, for the above reason that there's nothing you can do with the information except maybe report it to the mod author, which you can already do just based on the resulting images. (And I'll just add that the BDB cameras don't need any more bug reports, they already have the complete list of all cameras that needs tweaks.) Quote Link to comment Share on other sites More sharing options...
Beale Posted November 20, 2020 Author Share Posted November 20, 2020 On 11/13/2020 at 1:54 PM, computercat04 said: Hey @Beale, can you make a simple UI showing where a camera is pointing at? On 11/13/2020 at 4:15 PM, OrbitalManeuvers said: From working on all the BDB cameras, I'm wondering what you'd hope to accomplish with this, or what you're hoping it would help you with? If the camera transform isn't present or isn't pointing in the right direction, there's nothing you can do about it without editing the unity model, and if you can do that you already know what direction the transform is facing. All you'd get from a UI element is "yup, it's wrong" which you already knew since the pictures didn't come out right. That's what this process is: https://github.com/CobaltWolf/Bluedog-Design-Bureau/issues/964 There is a mod you can use in the VAB that shows you lots of debug info like the transforms and their orientations, but it's horrible to use and its displays are essentially useless at the end of the day, for the above reason that there's nothing you can do with the information except maybe report it to the mod author, which you can already do just based on the resulting images. (And I'll just add that the BDB cameras don't need any more bug reports, they already have the complete list of all cameras that needs tweaks.) A full UI is out of scope. I could add a visible ray to show exactly where / what the camera is pointing at, but not really sure how desirable that is. Quote Link to comment Share on other sites More sharing options...
Sesshaku Posted February 3, 2021 Share Posted February 3, 2021 (edited) On 11/13/2020 at 1:15 PM, OrbitalManeuvers said: From working on all the BDB cameras, I'm wondering what you'd hope to accomplish with this, or what you're hoping it would help you with? If the camera transform isn't present or isn't pointing in the right direction, there's nothing you can do about it without editing the unity model, and if you can do that you already know what direction the transform is facing. All you'd get from a UI element is "yup, it's wrong" which you already knew since the pictures didn't come out right. That's what this process is: https://github.com/CobaltWolf/Bluedog-Design-Bureau/issues/964 There is a mod you can use in the VAB that shows you lots of debug info like the transforms and their orientations, but it's horrible to use and its displays are essentially useless at the end of the day, for the above reason that there's nothing you can do with the information except maybe report it to the mod author, which you can already do just based on the resulting images. (And I'll just add that the BDB cameras don't need any more bug reports, they already have the complete list of all cameras that needs tweaks.) I believe he just wanted an integrated UI of what the camera is showing while playing, not a technical aspect of where the lens is pointing in the model. In other words, much like the current telescope mods. That let's you move the camera live, and take pictures while actively showing you the camera. I have a small request. Is it possible to have an option, or a hotkey so that the camera can take photos automatically at a regular interval? Because one of the things I love about this mod is taking pictures every 5-10 seconds while orbiting or while landing, and it would be much much easier if I could focus on the landing, instead of having to both land and take a picture every X seconds. Edited February 3, 2021 by Sesshaku Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.