TeleIO / Telemachus-1

MIT License
34 stars 19 forks source link

JSI Camera Field of View and Ship Parts #66

Open Stork42 opened 3 years ago

Stork42 commented 3 years ago

Could someone look into making the JSI camera Field of View wider?? I've tried editing the cameracapture.cs file and compiling the change myself into a test build. Changes to the camera FoV values in that file do not seem to change the FoV when viewing the camera through the Houston UI. Also, I can not see the spacecraft in the camera feed. When viewing the cameras in the Houston UI, the ship is not displayed in the view. Example - When using the camera to verify solar panels deployed when playing IVA, the camera will not show any part of the spacecraft. It is also an extremely narrow field of view. Thanks!!

Stork42 commented 3 years ago

I think I have the field of view issues figured out. I had to change the values in both the cameracapture.cs AND the IVAcameracapture.cs. Those seem to be changing the FoV, so I'm going to tweak on it until it's closer to what I would like to see.

Still can't see my own ship in most of the camera views though. Trying to sort through that currently. Any help would be awesome! Thanks!

Stork42 commented 3 years ago

currently working on a change to the cameracapture.cs file with changes to the nearclipplane values to see if it is just clipping the ship out

Stork42 commented 3 years ago

Basically fixed the field of view issue by changing the FoV settings in the files mentioned above. Welp, no real luck and basically only causing more crashes so I'm going to give up on this one for now. If anyone gets an idea to try I'm all ears. Thanks!

StoneBlue commented 3 years ago

Dont forget, the whole camera method KSP uses was changed in wither 1.8.0 or 1.9.0... it changed from a muti-camera, to a single camera.... on DirectX 11 only... supposedly the legacy method was ept in place for the OpenGL builds of KSP (OSX & Linux)

And this was all after the last activity of Telemachus dev, so it doesnt really surprise me that the cameras, which were broken before, are STILL broen, or even broen worse... vOv :(

chistian95 commented 3 years ago

Still can't see my own ship in most of the camera views though. Trying to sort through that currently. Any help would be awesome! Thanks!

I've been messing with this without any success... Any ideas about where to poke around to see if we can make this work?

chistian95 commented 3 years ago

So I have been messing around even more and I've been looking for other updated camera mods out there to see what they did. Turns out there is a project on github named "AvionicsSystems" and they documented a couple things about this on their code (link here)

So I just removed "Camera 01" and commented out the line that edits the "nearClipPlane" of the "Camera 00" and "FXCamera" cameras and it's working! I can see my rocket again!

The thing is, I have no idea of what I'm doing so I don't know if this is the right way to fix the issue. I hope someone with more knowledge can please shine some light on this issue...

StoneBlue commented 3 years ago

I certainly dont now how it all wors, but yeah... that would have been my guess, that it had to do with the Unity update KSP did, that changed the camera method from multi- to single-camera

Supposedly the change only affects Windows version of the game, as it only works on DirectX... so Linux/Mac versions are unaffected, due to OpenGL, and still use the same multi-camera system vOv

StoneBlue commented 3 years ago

I dont know if it would help, but you could also try poking the new, written specifically for 1.10.1, Neptune Camera mod by Beale. I now he had lotsa help from some top plugin modding devs, writing it. So theres no obsolete legacy code in it anywhere.

https://forum.kerbalspaceprogram.com/index.php?/topic/196339-110x-neptune-camera-basic-camera-utility-25207112020/

chistian95 commented 3 years ago

I've been looking to that code but I'm just lost haha so no idea if my fix is alright or not.

Anyways I have a related secondary issue. The cameras are only updated once every two seconds. I've been trying to increase the refresh rate without any success...