Beale Posted August 16, 2020 Share Posted August 16, 2020 (edited) Neptune Camera Download and Releases (GitHub) Source Code (GitHub) Only compatible with KSP 1.10.X and above. Neptune Camera is a utility to add basic camera functionality to parts. Images produced by the camera are saved to the KSP Screenshot folder. The following features are present: Different camera types (Full colour, Red, Green, Blue, Ultraviolet*, Infrared** and Greyscale). Optional errors (dropped pixels) on images taken. Optional noise grain. Configurable FoV and resolution. Full colour cameras can produce separate Red, Green, Blue, and greyscale images if required. * The "Ultraviolet" images are produced with a Protanopia colour filter. ** The "Infrared" images are produced with a Tritanopia colour filter. Examples Here are a few tiny 128x128 images produced from the launch pad, using various modes of the camera: Here are a few tiny 128x128 images, demonstrating how the R, G, and B images can be stacked to produce cool "exposure effects" when the craft is moving: Result: Images of Kerbin, in ultraviolet and infrared respectively, with some general grain noise. A tiny 256x256, full colour image, with no error noise, and an animated sequence of frames. A live preview window can be toggled to view what the camera is currently looking at. Finally, images can even be stacked to create panoramas! Setting Up Neptune Camera If you're a part-modder, setting up Neptune Camera is easy! Step 1, when setting up the part in Unity, add a transform, with Z+ pointing the direction you want the camera to point (Y+ being the "up" direction). Step 2, add the Neptune Camera module to your part. MODULE { name = ModuleNeptuneCamera cameraTransformName = cameraTransform cameraType = FULL_COLOUR cameraHasCustomFieldOfView = True cameraFieldOfView = 70 cameraFieldOfViewMax = 110 cameraFieldOfViewMin = 20 cameraHorizontalResolution = 128 cameraVerticalResolution = 128 cameraHasErrors = True cameraErrorRate = 5 cameraHasNoise = True cameraNoiseMaxStrength = 25 cameraHasCustomNearClipPlane = True cameraCustomNearClipPlane = 0.01 cameraHasCustomTitle = True cameraCustomTitle = "Camera" cameraHasDisplayWindow = True cameraHasConfigTransform = False cameraConfigTransformPosition = 0, 0, -0.125 cameraConfigTransformDirection = 0, 180, 0 } A few things are configurable here: cameraTransformName - the name of the transform on the part to attach the camera to. cameraType - the type of camera this is (see below). cameraHasCustomFieldOfView - whether to use a custom field of view. cameraFieldOfView - the field of view of the camera. cameraFieldOfViewMax - the maximum field of view of the camera. cameraFieldOfViewMin - the minimum field of view of the camera. cameraHorizontalResolution - the width of the image produced. cameraVerticalResolution - the height of the image produced. cameraHasErrors - whether errors (dropped pixels) should be added to images produced. cameraErrorRate - the percentage % of the image that will be scrambled with error noise (whole numbers only 1-100). cameraHasNoise - whether noise should be added to the images produced. cameraNoiseMaxStrength - The maximum percentage % strength of the noise produiced (whole numbers only 1-100). cameraHasCustomNearClipPlane - whether a custom near clipping plane should be used. cameraCustomNearClipPlane - the clipping plane distance. cameraHasCustomTitle - whether the camera actions should be prefixed with a custom title (Allow multiple cameras on the same part). cameraCustomTitle - the custom title to use. cameraHasDisplayWindow - Whether a live preview window is available for this camera. cameraHasConfigTransform - whether to use a transform specified in config. cameraConfigTransformPosition - the position of this transform. cameraConfigTransformDirection - the rotation of this transform. Values will be defaulted if not specified in the config. You don't need to specify every value in your own config. Valid camera types: FULL_COLOUR FULL_COLOUR_ONLY RED_COLOUR GREEN_COLOUR BLUE_COLOUR GREYSCALE_COLOUR ULTRAVIOLET_COLOUR INFRARED_COLOUR A note on cameraErrorRate, though this runs 1-100, this value is actually 1-100% of a 10% maximum error rate. Therefore a value of 100 will equal 10% error, and a value of 10 will equal a 1% error rate. You can exceed this if you want, a value of 200 will equal 20% error - but anything above 10% scrambling is basically garbage. Why? I wanted a very basic camera util to capture space probe style photographs, I.E. Venera landers: Another major draw was the idea of creating multiple single colour images and stacking them, to get cool parallax / sliding / exposure effects. Compatible Mods TantaresSP Bluedog Design Bureau (Some support) Know any others? Let me know and I'll add to the list. Credits and Special Thanks This would not be possible without some major help setting up the render-order, culling, and taking care of various other technical hurdles encountered during development. Without further ado, major thanks to: @sarbian @sirkut @JPLRepo These guys are wizards, and it would take me months to get this working without them. My huge gratitude. Licence All Rights Reserved Edited October 4 by Beale Quote Link to comment Share on other sites More sharing options...
Miguelsgamingch Posted August 16, 2020 Share Posted August 16, 2020 Nice, should try it out Quote Link to comment Share on other sites More sharing options...
Whirligig Girl Posted August 16, 2020 Share Posted August 16, 2020 Very nice. Similar to what I was doing with Shol in this tweet thread: Quote Link to comment Share on other sites More sharing options...
Cyne Posted August 17, 2020 Share Posted August 17, 2020 Damn, that's interesting. Will check it out! Quote Link to comment Share on other sites More sharing options...
Beale Posted August 19, 2020 Author Share Posted August 19, 2020 (edited) On 8/16/2020 at 3:11 PM, GregroxMun said: Very nice. Similar to what I was doing with Shol in this tweet thread: Yeah this tweet was actually one of the direct inspirations Neptune Camera Version 2.1 Added a few new features. Ultraviolet camera mode (protanopia). Infrared camera mode (tritanopia). Configurable camera grain. New error noise generation. See main post for details of these. Download and Releases (GitHub) Source Code (GitHub) Edited August 19, 2020 by Beale Quote Link to comment Share on other sites More sharing options...
Ciko Posted August 19, 2020 Share Posted August 19, 2020 is there a 3d camera model in this mod? Quote Link to comment Share on other sites More sharing options...
Beale Posted August 19, 2020 Author Share Posted August 19, 2020 3 minutes ago, Ciko said: is there a 3d camera model in this mod? Nope, this mod is purely a utility for other mods to use. However, one of my mods, TantaresSP, includes a camera using this right now - with many more on the way. Quote Link to comment Share on other sites More sharing options...
Beale Posted August 19, 2020 Author Share Posted August 19, 2020 Neptune Camera Version 2.2 Quick fix to hopefully resolve some Linux related issues. If you're on Windows this isn't required. Download and Releases (GitHub) Source Code (GitHub) Quote Link to comment Share on other sites More sharing options...
SovietGamer Posted August 20, 2020 Share Posted August 20, 2020 Nice release i come fron Tantares but i think this could work i will download it! Quote Link to comment Share on other sites More sharing options...
DStaal Posted August 26, 2020 Share Posted August 26, 2020 Interesting. I'll have to play around with this. One thought: Have you thought about tying the error rate or noise (or both) to the signal strength of the probe? That is: you can send a good camera out, but if you're barely in-network you'll get a poor quality picture back. Then the quality in the part config is the max quality the part can have, under ideal conditions. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 30, 2020 Share Posted August 30, 2020 On 8/16/2020 at 8:54 AM, Beale said: Step 2, add the Neptune Camera module to your part. MODULE { name = ModuleNeptuneCamera cameraTransformName = cameraTransform cameraType = FULL_COLOUR cameraFieldOfView = 60 cameraHorizontalResolution = 128 cameraVerticalResolution = 128 cameraHasErrors = True cameraErrorRate = 5 cameraHasNoise = True cameraNoiseMaxStrength = 25 } A few things are configurable here: cameraTransformName - the name of the transform on the part to attach the camera to. cameraType - the type of camera this is (see below). cameraFieldOfView - the field of view of the camera. cameraHorizontalResolution - the width of the image produced. cameraVerticalResolution - the height of the image produced. cameraHasErrors - whether errors (dropped pixels) should be added to images produced. cameraErrorRate - the percentage % of the image that will be scrambled with error noise (whole numbers only 1-100). cameraHasNoise - whether noise should be added to the images produced. cameraNoiseMaxStrength - The maximum percentage % strength of the noise produiced (whole numbers only 1-100). Valid camera types: FULL_COLOUR RED_COLOUR GREEN_COLOUR BLUE_COLOUR GREYSCALE_COLOUR ULTRAVIOLET_COLOUR INFRARED_COLOUR I'm a bit confused with this. I'm not a modder. So how do I integrate this mod with Tantares SP? Quote Link to comment Share on other sites More sharing options...
Beale Posted August 30, 2020 Author Share Posted August 30, 2020 5 minutes ago, gabo04 said: I'm a bit confused with this. I'm not a modder. So how do I integrate this mod with Tantares SP? If you have TantaresSP, just download this and put in GameData TantaresSP is already pre-configured to use this mod, and has a lot more cameras on the way if you are using the WIP version from GitHub (Full release soon). On 8/26/2020 at 7:50 PM, DStaal said: Interesting. I'll have to play around with this. One thought: Have you thought about tying the error rate or noise (or both) to the signal strength of the probe? That is: you can send a good camera out, but if you're barely in-network you'll get a poor quality picture back. Then the quality in the part config is the max quality the part can have, under ideal conditions. It's a cool idea, but I'm not sure on the logistics i.e. analoue TV signal vs. electrical bit-by-bit camera image. I'll investigate. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 30, 2020 Share Posted August 30, 2020 3 hours ago, Beale said: If you have TantaresSP, just download this and put in GameData TantaresSP is already pre-configured to use this mod, and has a lot more cameras on the way if you are using the WIP version from GitHub (Full release soon). OK.Thanks. Quote Link to comment Share on other sites More sharing options...
DStaal Posted August 31, 2020 Share Posted August 31, 2020 20 hours ago, Beale said: It's a cool idea, but I'm not sure on the logistics i.e. analoue TV signal vs. electrical bit-by-bit camera image. I'll investigate. Digital could be fairly resistant to the error level - but at an expense: It would allow you to *detect* errors in transmission, but *fixing* them either requires always transmitting a large overhead of checksums (which also requires extra processing at the remote end before send), or you have to have the remote resend the image (or some portion of the image) if there's an error. (You could of course ignore errors in a portion of an image if you've blocked your images correctly - which would be how you get the noise pattern in the current version.) Analogue lets more noise get in, but you can still get a fairly useful image even with a lot of noise. Either of these can be alleviated by slowing down transmission of course. Quote Link to comment Share on other sites More sharing options...
Beale Posted September 7, 2020 Author Share Posted September 7, 2020 On 8/31/2020 at 2:54 PM, DStaal said: Digital could be fairly resistant to the error level - but at an expense: It would allow you to *detect* errors in transmission, but *fixing* them either requires always transmitting a large overhead of checksums (which also requires extra processing at the remote end before send), or you have to have the remote resend the image (or some portion of the image) if there's an error. (You could of course ignore errors in a portion of an image if you've blocked your images correctly - which would be how you get the noise pattern in the current version.) Analogue lets more noise get in, but you can still get a fairly useful image even with a lot of noise. Either of these can be alleviated by slowing down transmission of course. Interesting ideas! I'll look into them. Neptune Camera V2.3 Download and Releases (GitHub) Source Code (GitHub) Exported images now have a sensible naming scheme, ordered by date descending. Tweaks have been made to allow camera stats shown in VAB. Quote Link to comment Share on other sites More sharing options...
Black034 Posted September 15, 2020 Share Posted September 15, 2020 (edited) Any idea if this should work with 1.8? TantaresSP and all other things work fine for me but the camera's aren't making screenshots.. Console gives me TypeloadException, couldnt resolve type token 01000033 (from typeref class/assembly GraphicsType) Is this due to new functionalities brought in later game updates? Cuz then I'll just forget about it. Edited September 15, 2020 by Black034 Quote Link to comment Share on other sites More sharing options...
Beale Posted September 16, 2020 Author Share Posted September 16, 2020 On 9/15/2020 at 12:40 PM, Black034 said: Any idea if this should work with 1.8? TantaresSP and all other things work fine for me but the camera's aren't making screenshots.. Console gives me TypeloadException, couldnt resolve type token 01000033 (from typeref class/assembly GraphicsType) Is this due to new functionalities brought in later game updates? Cuz then I'll just forget about it. Unfortunately yes you are correct, the camera was changed in 1.9, which makes 1.8 compatibility sadly a little difficult, thanks for understanding. Neptune Camera V2.4 Download and Releases (GitHub) Source Code (GitHub) Cameras can now have custom clipping planes. Error-noise generation behaviour has been tweaked (details to be added to OP). Quote Link to comment Share on other sites More sharing options...
NateDaBeast Posted September 18, 2020 Share Posted September 18, 2020 Not sure why, but I've looked into using this mod and I don't see any of the photos in my KSP screenshot folder. Quote Link to comment Share on other sites More sharing options...
The_Arcitect Posted October 11, 2020 Share Posted October 11, 2020 How do I get the camera working, I cant seem to take picures. Quote Link to comment Share on other sites More sharing options...
Beale Posted October 12, 2020 Author Share Posted October 12, 2020 On 9/18/2020 at 9:43 AM, NateDaBeast said: Not sure why, but I've looked into using this mod and I don't see any of the photos in my KSP screenshot folder. 11 hours ago, The_Arcitect said: How do I get the camera working, I cant seem to take picures. Are you both using Ksp 1.10.1? Quote Link to comment Share on other sites More sharing options...
NateDaBeast Posted October 12, 2020 Share Posted October 12, 2020 25 minutes ago, Beale said: Are you both using Ksp 1.10.1? Uninstalled the mod because of the issue. Pretty sure I've only played on 1.8.1 and 1.9.1. Quote Link to comment Share on other sites More sharing options...
Beale Posted October 12, 2020 Author Share Posted October 12, 2020 55 minutes ago, NateDaBeast said: Uninstalled the mod because of the issue. Pretty sure I've only played on 1.8.1 and 1.9.1. It only works on 1.10 and above due to changes in the core games camera system. Quote Link to comment Share on other sites More sharing options...
The_Arcitect Posted October 12, 2020 Share Posted October 12, 2020 5 hours ago, Beale said: Are you both using Ksp 1.10.1? I am using 1.10.1. Quote Link to comment Share on other sites More sharing options...
Beale Posted October 12, 2020 Author Share Posted October 12, 2020 24 minutes ago, The_Arcitect said: I am using 1.10.1. Thanks. What issues you have? Screenshots not appearing in your screenshot folder? Or something else? Quote Link to comment Share on other sites More sharing options...
dieDoktor Posted October 27, 2020 Share Posted October 27, 2020 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 : ) 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.