DennyTX

[1.3.1] Docking camera (KURS) (14.feb.18)

Recommended Posts

Updated for KSP 1.3.1

Once upon a time there was LAZOR mod from famous Romfarer, which included a useful docking camera, that displays the videostream a small window in the main flight scene. However, it has not been updated for a long time, and refused to work in recent versions of the game (or I could not start it). Nevertheless, I like it output style of information and I was bored without this service. That in turn has led me to attempt to revive the aforementioned docking camera. And YES, i know about Docking Port Alignment Indicator, HullCamVDS, cameras for RasterPropMonitor etc. But i do not know about any working cameras in window.

 

New shaders example:

 


So, what we have here. Docking-camera itself, which can be integrated to any part (MM patch enclosed for the docking port modules). It looks ahead by the vertical axis of the vessel's and displays a minimum of necessary info for the docking maneuver - namely, range, speed, angle, alignment and when the correct trajectory occured - time prior to docking with the mark that such trajectory will lead our vessel to dock without additional actions (small lamp will become green and will show time to docking). camera window has three size presets. It also has three viewing modes: color, Black and white and infrared. Powered zoom function. Also, there is a button to remove flight data from the screen.

Furthermore, effect of television interference can be added. The range of the camera,parameters of night vision (RSMA) and presence of noise - can be configured through CFG. Camera requires a target to operate.

In addition the ugly external camera enclosed. It can show videostream only and also has three modes of vision and is able to rotate on two axes. For cameras, installed under the belly of the aircraft (which gets inverted upside down) there is the mode of rotation of the image. In the CFG of the partcamera some meshes could be configured for use with other camera model.

All cameras have a title with its number, and also can work a few pieces at a time. Docking camera reporting its target on its window title.

There is an experiment on part camera - a try to reproduce a surveilance (spy) activity. You need to be at a distance less than 1000 m near any targetable thingie, catch it on camera's screen and targeted. press "⦿" button. A ray will be shoot. If all requirements have met and there are no obstacle on ray's path - you'll should get experiment results, if something wrong - you just spend one bullet.  Experiments is limited by bullets (4 yellow balls around cam, dissapearing one by one each time). I thought it will be interesting if contracts.

Camera has 3 presets of shaders (noisy TV 1960th style, TV 1980th style  and standart (color, b/w and nightvision). available via button, appearing when blizzy toolbar is installed. 

Also, by toolbar button you could find info about nearby cameras installed on other vessels in transmission range. If camera has been activated on some vessel, but you drive other one - a new window from distant camera will appear when distance from first one will become less than 2500 (or 10k (customizable)). 

If you want you can use "look at me" mode by activating it on distant camera. "Targetcam"  and "follow me" modes on your active vessel (set camera position using scrollers).

The cameras can transmit the videostream to nearby vessels, but only at a distance of up to 2 500 meters. You can change this unload range via toolbar button.

 

Configuring examples

Spoiler

Docking Camera


    MODULE
    {
        name = DockingCameraModule
        allowedDistance = 1000
        targetCrossColor = 0.9,0.0,0.0,1.0
        targetCrossColorOLDD = 0.0,0.0,0.9,1.0
        noise = true
    }

 

Part Camera


MODULE

{

name = CameraModule

windowSize = 300 // initial camera window size

cameraName = CamExt

rotatorZ = Case

rotatorY = Tube

zoommer = Lenz

cap = Cap

bulletName = Sphere // name of consumables (expected that names in model will be finished by 00X)

stepper = 1000 // using for zooming visualization. for another camera model

distance = 1000 // allowed distance for scanning experiment

resource = ElectricCharge.50 // resourseName/resourceUsage

}

MODULE

{

name = ModuleSpyExperiment

experimentID = TargetScanning

experimentActionName = Scan Target

resetActionName = Delete Data

useStaging = False

useActionGroups = True

hideUIwhenUnavailable = False

xmitDataScalar = 0.8

dataIsCollectable = True

collectActionName = Take Data

interactionRange = 1.2

rerunnable = True

usageReqMaskInternal = 1

usageReqMaskExternal = 8

}

 

History

Spoiler

Version 1.3.3.1 for KSP 1.3.1

REBORN.

DELETE old versions by me or linuxgurugamer

  • Recompiled for KSP 1.3.1
  • Fixed problem with texture creational while -force-d3d11 (DX11)
  • assets will load only once
  • reduced spam to log

 

 

Version 1.2.1.1 for Kerbal Space Program 1.2.1 (Released on 2016-11-18)

  1. Recompiled fo KSP 1.2.1
  2. Code cleanup and bugs hunting. Some bugs removed some bugs added. I tried to do camera interface to becomes more friendly, providing small "tips what to do" in different situations and will not allowing situations that causing exceptions. Also, seems like FPS drop down, when many camera windows are opened, becomes significantly less.
  3. Restriction for turning on "docking camera" has been removed. Now you can turn on DocCam without active target. Also, without target selected, it will not show flight data on its screen.
  4. Hard dependence from Blizzy toolbar removed, you can call config window by pressing Alt+1.
  5. According to the received requests - "Forced Camera Shutdown" has been added. In config window you can select a swith and when camera window, which transmitted from the nonactive vessel, dissapears when nonactive vessel exits out of range it will or will not (depends of switch) appears again when non active vessel with camera will come back to range.
  6. New camera window will be opened near previous, without overlapping each other.
  7. Do not forget that cameras needs electricity, and if it will be depleted, camera windows will be closed.
  8. Hope, all should work as expected, if not - feedback are welcomed

v.1.2.0.2 (17 october 2016)

  1. Fixed issue with dissapearing button panel.
  2. Electrisity consuption was back

 

v.1.2.0.1 (11 october 2016)

    1.Version file.

    2. recompiled for 1.2. release

    3. minor interface changing

v.1.2.pre (09 october 2016)

    1. KSP 1.2.pre ready.
    2. electricity consumption temporarily disabled.
    3. Added toolbar button.
    4. can change unload range.(via toolbar button)
    5. shaders divided to three groups (via toolbar button)
    6. added 2 new modes for cameras, installed on non-active vessels

v 1.7 (09 june 2016)  for Kerbal Space Program 1.1.3

  1. moved auxiliary textures to assetbundle
  2. embedded six new shaders (see example)
  3. digital noise can be turned on/off  by toggle (and in cfg too)
  4. camera number and its target shown in window title
  5. reports whence being broadcast images, when the camera has been activated on the other (non-current) vessel and vessel has been changed (at distance less than 2500)
  6. many cameras can work simultaneously
  7. has been checked to 32- and 64 bit assemblies.

v 1.5 - 1.6

Temp builds. code cleanup for KSP 1.1.2

v 1.4

1. The target beam scanning with its own scientific experiment has been added. It triggered when certain conditions met. Namely - the need to focus the camera at the subject (chosen target) and irradiate it. If the range (set in CFG) are within a given (it accordingly may require a rapprochement with the object) - will be carried out the experiment. if the conditions are not met - will not. The experiment has a limit of (4 times) and consumes resources (configurable in CFG). Further development - something to do with the system of contracts that can be ordered reconnaissance flights.

2. Saving screenshots has been added. It will be collected in a separate directory that is bound to the name of the game, with the time mark in the name. I think about video recording, but so far only with the external library. However, still not sure it needed.

3. Additional zoom modes has been added. Optical zoom can be increase with coeff 10, as well as wide-angle camera mode.

4. Target's tags has been added.

5. Toggles for all interface elements has been added. Can be made by switchable toggles or through CFG.

6. Helper cross in docking camera now support two modes of operation. First - my mode, second - duplicates the work of DockingPortAligmentIndicator.

7. The initial window size can now be set through the CFG. Ie no longer necessary to have only default 256 points ( can be supplied, for example - 500, and then the following steps will change the scale coefficients to 1.5 and 2 (ie, get 750 and 1000 respectively).

8. A lot of small fixes. Such as following: the new camera window will not overlap the time scale. Cameras informs about broadcast (useful, if the camera is turned at the currently inactive ship). Button for window close. Rebuild for 1.05.

v 1.2

1. Docking camera will get its position from "dockingNode" now, this should fix the problem with Inline Clamp-O-Tron.

2. Color of "targetting cross" will be customizable in CFG.

3. Most operational buttons has been moved in openable window.

4. Flight data and roll rotator can be turned off/on by toggle.

5. Flight data from cameras, that installed at other vessel (non current one) will be shut off.

6. Bug with red text everywhere seems to be fixed. (deltaZ speed must become red only if closure rate becomes higher 3 m/s or if we moving away from the target).

7. Speed of part-camera rotation by axiss becomes depending on the current zoom. High zoom - smaller step of rotation.

8. More verifications has been added into the code.

 

 

Download from Spacedock

CKAN-Indexed-brightgreen.svg   SpaceDock-listed-blue.svg    license-CC%20BY--SA-green.svg

DONATE

Source

installation: remove previous version and just extract an archive into Gamedata.

requirements: ModuleManager

recommends: Blizzy Toolbar 

 

Edited by DennyTX
for KSP 1.3.1

Share this post


Link to post
Share on other sites

Yay! At last on kerbal forums! :)

Great job, DennyTX!

PS Only one question: does external camera KIS attachable?

PPS Also the download link is broken. This one works: https://kerbalstuff.com/mod/1242

Edited by ZobrAA

Share this post


Link to post
Share on other sites

Wow - very cool. Been missing something like this since the LAZOR mod stopped being updated!

Would you be amenable on taking a request on alternate GUI layouts in the camera window?

Peace.

Share this post


Link to post
Share on other sites
Would you be amenable on taking a request on alternate GUI layouts in the camera window?

Yes, please! Me personally very interested in decimals readings (sort of 0.00º) for roll, pitch and yaw like for all other d(X,Y,Z) and v(X,Y,Z) readings...

Another thing - repositioning of readings layout, font and size variants. Ah, dreams, dreams... xD

Also green lines not very convenient in certain situations like docking against green plains of Kerbin or in Jool orbit :D And dont forget about color blind people. Ideally would be to change color somewhere in cfg...

Share this post


Link to post
Share on other sites

Yes! :)

I remember playing around with some "Docking Camera" mod back in .90 that had (IIRC) a black and white view of the docking (but was difficult to see due to low light. But later I read advice to put the Batteries with the green lights around the ports so they were more visible)

But I only used it a few times before I uninstalled it (either by accident, or cause I did not want the other features (Maybe it was Lazor, but I dont remember)

Later I could not figure out what the mod was and really missed it.

Cant wait to try this out. (I will wait for CKAN implementation)

Share this post


Link to post
Share on other sites

This will be great with the docking target mod: http://forum.kerbalspaceprogram.com/threads/130258-Docking-Target-%280-1%29-July-30-2015

- - - Updated - - -

Yes! :)

I remember playing around with some "Docking Camera" mod back in .90 that had (IIRC) a black and white view of the docking (but was difficult to see due to low light. But later I read advice to put the Batteries with the green lights around the ports so they were more visible)

But I only used it a few times before I uninstalled it (either by accident, or cause I did not want the other features (Maybe it was Lazor, but I dont remember)

Later I could not figure out what the mod was and really missed it.

Cant wait to try this out. (I will wait for CKAN implementation)

I think you're refering to LAZOR Docking Cam: http://www.curse.com/ksp-mods/kerbal/220272-lazor-docking-cam

Share this post


Link to post
Share on other sites

Got actually chance to test this out. Found some bugs:

1) Ludicrous change on text color (to red) in many mods windows in flight and in editor. Withot this mod all gets back to normal green.

2) Readings in window of inactive craft did not refreshing - need to be hided or refresh at least once a second, imho..

3) Sometimes camera windows does not appy unity dimmed style

mLiolbj.jpg

Share this post


Link to post
Share on other sites

Same here with red text in Kerbal Engineer when this is installed. Still been wanting a good camera mod like this to be back for a long time! Your efforts are much appreciated :)

Share this post


Link to post
Share on other sites

My only concern with installing this is that I already have so many mods installed and one more will only clog up the system resources more than they already are. It would be really great if someone could come along and simply add to the currently available functionality. For instance, I've always wanted to be able to have an RPM screen in a freely movable window, which would include the functionality of the mod's own cameras and such.

If this mod were to simply hook into another already working camera system but provide a new way of accessing them, then I could maybe see installing this one. Either way, good job on recreating the old LAZOR camera mod, which was one of my first ever mods to be played with. Unfortunately, it too got uninstalled for simply doing too much for too little gain over other mods that also included the functionality of a camera system.

Great job otherwise, though.

Share this post


Link to post
Share on other sites

Great mod! Maybe you could add Module Manager for other docking ports like Universal Docking Ports from KIP Engineering?

I made this MM for it

@PART[kipunivdockport*]:NEEDS[KipEng,OLDD]

{

MODULE

{

name = DockingCameraModule

allowedDistance = 1000

nightVisionArgs = 0.5,0.7,0.5,0.5

noise = true

}

}

Share this post


Link to post
Share on other sites
Amazing mod ! Please put this to download with CKAN.

CKAN is the way, man :)

I second this. I'd love to use it but if it ain't on CKAN these days I just won't bother unfortunately.

Share this post


Link to post
Share on other sites
I second this. I'd love to use it but if it ain't on CKAN these days I just won't bother unfortunately.

Thought CKAN was to do all this putting stuff on ? take it to the CKAN thread and ask them ? CKAN wasn't to add work to the modders if, I remember right they was going to do all the work ?

EDIT- Well installing mods is easy you should try it

Edited by Mecripp2

Share this post


Link to post
Share on other sites

I think each modder has to list there own stuff with them but I am not sure. I just play the game so when it comes to the technical stuff I generally have no idea. :(

Share this post


Link to post
Share on other sites

CKAN maintains some of the files, but the developer is able to manage it themselves as well. KerbalStuff is supposed to also have an option to automatically list on ckan (which your mod appears to have enabled since the title says "ckan" after it). In my experience new mods take a few days to get listed however.

As for the MM patch, maybe make it rely instead on the part having the docking node. I previously had a similar feature working on a branch of Tarsier so this modified version of the could should work:


@PART
[*]:HAS[MODULE[ModuleDockingNode]]
{
@MODULE
{
name = DockingCameraModule
allowedDistance = 1000
nightVisionArgs = 0.5,0.7,0.5,0.5
noise = true
}
}

Share this post


Link to post
Share on other sites

Annotation of upcoming update. (v.1.2)

1. Docking camera will get its position from "dockingNode" now, this should fix the problem with Inline Clamp-O-Tron.

2. Color of "targetting cross" will be customizable in CFG.

3. Most operational buttons has been moved in openable window.

4. Flight data and roll rotator can be turned off/on by toggle.

5. Flight data from cameras, that installed at other vessel (non current one) will be shut off.

6. Bug with red text everywhere seems to be fixed. (deltaZ speed must become red only if closure rate becomes higher 3 m/s or if we moving away from the target).

7. Speed of part-camera rotation by axiss becomes depending on the current zoom. High zoom - smaller step of rotation.

8. More verifications has been added into the code.

9. CKAN. mod is marked as CKAN on kerballstuff. i thought this enough... Previous mod ScienceSituationInfo came on SCAN by this way. What more should i do...

also, i have an idea to break down and decouple docking devices when dock contact occurs on high speed. is this a good one?

Denny does this mean your back will you be fixing your other mods

hmm, really dunno. I'm in c# now, and not touch 3Dmax for ages. Only God knows, may be i'll catch the inspiration on one fine day

Edited by DennyTX

Share this post


Link to post
Share on other sites

This is best thing ever :)

I remember using lazor cam when it still worked and this one actually has included docking aligment indicator functionality. God work?

Only thing that it misses is lack and white filter.

Share this post


Link to post
Share on other sites

Hi Denny,

and thank you for redoing this, much appreciated!

I have noticed you used

 @Part[dockingPort*] 

in your MM-patch, is there a particular reason I'm unaware of?

Cheers

Share this post


Link to post
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.