GithubHelp home page GithubHelp logo

vivero / kerbal-vr Goto Github PK

View Code? Open in Web Editor NEW
174.0 23.0 30.0 97.23 MB

An add-on for Kerbal Space Program (KSP) to enable virtual reality.

License: MIT License

C# 100.00%
virtual-reality kerbal-space-program ksp vr

kerbal-vr's Introduction

KerbalVR

An add-on for Kerbal Space Program (KSP) to enable the use of a virtual reality headset (HTC Vive, Valve Index, Windows MR, Oculus Rift, etc), as supported by OpenVR. Supports in-flight IVA, and room-scale VAB / SPH.

FOLLOW the Install Guide, as there is a little bit more setup compared to other KSP mods.


Built for KSP v1.9.1

Demonstration video


This is a forever-WIP mod to allow the use of VR headsets in KSP. The primary focus is for flight control in IVA, but can also be used for room-scale viewing inside the VAB or SPH.

IVA in VR puts you inside the cockpit of your craft. You can look around (and walk around if you have the physical space around you). Currently, it is possible to interact with cockpit instrumentation provided by the RPM mod (see note below); more immersive features for the cockpit may come sometime in the future. The goal is to replace the use of the keyboard and mouse entirely with interactive cockpit controls (buttons, switches, control sticks, throttles, etc.)

Room-scale VR in the VAB and SPH allows you to walk around inside the building and see your craft at a 1:1 scale.

Performance will vary wildly between setups. There is an infinite combination of PC specs, video cards, VR rendering resolutions, headset refresh rates, etc. It is difficult to achieve a smooth experience, but you may try the Performance Tips below.

You may experience random crashes while using the mod. You have been warned.

Requirements

Installation & Usage

For installation instructions, see the Install Guide.

For instructions on how to use the mod, see the User Guide.

For guidance on compiling this project and other project documentation, see the Build Guide

Known Issues

  • There's lots of stuttering while in VR!

    Yea I dunno what to do about that. No guarantees, but try the Performance Tips below. This game wasn't designed with VR in mind, and there isn't a whole lot I can do from a modding perspective.

  • When I enable VR in the VAB/SPH, everything looks blue!

    Yep. Dunno why. Have fun!

RasterProp Monitor

There is experimental support for VR interaction with RPM. See the User Guide for more details. Note that using RPM may hinder performance in VR (lower FPS).

VR Cockpits

A set of VR-ready cockpits is provided by the KVR Pods mod.

Performance Tips

You may need to tone down the graphics for best performance. Try these in the Settings menu, under the Graphics tab:

  • Screen Resolution: 1024 x 768
  • Full Screen: unchecked
  • V-Sync: Don't Sync
  • Frame Limit: 180 FPS

Something that seemed to help a lot was turning on Legacy Reprojection Mode in the SteamVR per-application settings for Kerbal Space Program.

SteamVR Settings

Make sure you update your graphics drivers and SteamVR.

kerbal-vr's People

Contributors

jrbudda avatar vivero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kerbal-vr's Issues

[Non Issue] Great work!

Just wanted to say a full blown Kerbal VR experience is my only wish in life. I hope you continue to build on this until Squad is forced to hire you!

Very Poor Framerate

On everything low (Stock 1.4.2) im getting max 20fps and a ton of stuttering

Specs:
I7-4790K
GTX 980ti
32gb Ram
Windows-10

Not Working On Latest Update

I just did a clean re-install of KSP to 1.6. I also, just installed your latest version of Kerbal-VR. I followed the instructions to the "T", with executing the command ."C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\KSP_x64.exe" -force-d3d12 while SteamVR was running. Tried going into IVA mode then, but the icon to go VR isn't there. I've attached the log, but I think it might have something to do with the most recent update of SteamVR to 1.2.6.
KSP.log

Suggestion: No-clipping in crafts

I remember an experimental mod a while back that basically allowed you to no clip though crafts, making it so you could theoretically simulate walking through a space station. I think it would be cool if you could somehow implement a way to move around crafts while in VR, just like as you did with the SPH or VAB. I believe this would be a fun way to be more immersive.

Great job on the mod, it works great.

Issues with mod

Whenever I start up the game, Kerbal Space Program just lags out. The IVA mode doesn't have the button to go to VR mode, and the lag spreads throughout my desktop. Is it because I have an oculus? Help!

Incredibly spazzy camera

Trying to use this on KSP 1.1.0
Tracking works great though everything seems huge. But the camera on screen while low fps is ok, but the actual tracking camera seems to spaz around like mad making it unbearable. The look angle constantly flickers to the sides

Rendering issue

I have encountered a bug where the sky seems to be attached to the headset rotation only really shows when you move your head fast

Windows 7 guy

Hola! I'm on Windows 7, and I have an Oculus, so my setup couldn't be more different from Vivero's, but maybe with my logs someone might be able to come up with a way to get it working?
error.log
KSP.log

Thanks for your time, and I'm happy to test any ideas or solutions you think of. Cheers!

update compatibility for KSP 1.2 and 1.3!

Hey man, this is super. I have Oculus Rift DK1 on Mac, and will love to test it here, but only if it can be ported to KSP 1.2 and 1.3. So, please, please please, continue evolving!

Orientation wrong in some Vessels

First: Amazing work! Thank you so much, I've been waiting for this for ages!

I've noticed that in some cockpits the orientation is rotated upwards (as if you're lying on the ground on your back). Examples are the ALCOR Landing Capsule and the Lander Can for 2 Kerbals.

Is there any way to fix this?

Black screen and infinite loading

I installed the new version of KerbalVR and when i did everything there was a black screen on startup, adding a folder named "Squad" into the GameData fixed this, but when its loading it never loads.
KSP.log

3.2.2 Seizure Warning

Was finally able to run this with the new 3.2.2 release but the graphical glitches were so intense it was nauseating. Please fix this soon, I'd love to see this mod in action!

OS: Windows 10
SteamVR: 1.2.8
GPU: GTX 1080 3gb
CPU: I7-6700k

Only Right Hand Works In Cockpit

I'm running with a windows mixed reality headset, with their controllers. When I enable VR in a cockpit, I'm only able to click the buttons with my right hand, and not my left. I am also unable to reset my head position with my left controller. This is in a MK I cockpit with RasterPropMonitor installed.

Crash at startup after first launch of KSP

Hello,

I can launch KSP, play it in VR mode (using a shortcuts -force-d3d12) but when i close KSP it crash and then i cant start KSP anymore. right after the loading bar a crash occur.

config
win 10 pro 64
GTX 1080 - nvidia's drivers : 397.31
SteamVR & steamVR beta (steam VR non beta : 1525633672)
I7 2600k - 20 gb ram
KSP version 1.4.3.2152
KerbalVR 3.2.0

bonus
i dont think its related but while using -force-d3d12, parts in the part picker in VAB are blues.

Nothing is working!!!

I've followed your install instructions through 100 times over. But whenever I press Y in IVA, my headset stays in the steamVr home

Build Instruktion

I would like to build the project myself to try out some things, but I could't find out which libraries are missing. What do I need to build it my self?

Star textures not moving smooth with HMD (Oculus)

Stars seem to no update with every frame, same as ground textures when in orbit. Seems to be objects that are rendered at a distance do not update at the same frame rate as local objects. Running on GTX1060 3gb i7 7700 16gb ram

Control MFDs in VR

Once in VR, there is no way to control the rpm mfd pages. Some sort of UI would be needed for this.

Target box is not valid

I wrote, "K:\GAME INSTALLATIONS\Steam\steamapps\common\Kerbal Space Program\KSP_x64.exe -force-d3d12" at the target box and this is what is said. It said, "The name "K:\GAME INSTALLATIONS\Steam\steamapps\common\Kerbal Space Program\KSP_x64.exe -force-d3d12" specified in the target box is not valid.". I need help!

Infinite loading

I did make a shortcut and i did add the force DirectX 12 thing to it, But when i start it from the shortcut it stops loading and it just says this forever
infload
KSP.log

Linux/MacOS support over OpenHMD

Could we use OpenHMD instead of OpenVR to provide cross-platform(Mac, Linux, FreeBSD) VR support? The only problem is OpenHMD still doesn't have any kind of positional tracking support(Except Nolo support). Also it could require KSP render changes(We could spawn 2 cameras and 2 planes and render image into planes with distortion correction shaders). If you want more info about OpenHMD, you can visit http://www.openhmd.net/ and github repo https://github.com/OpenHMD/OpenHMD

not a issue but a request.

hi i would like to be a tester for this project. i have verymuch enjoyed the mod but i really want to use it on newer version of ksp.

Laggy and choppy head movement

FPS is fine, when I'm not moving and just watching other things move, it's very smooth. However, when I move my head and look around, it's very choppy and sometimes freezes for a very short moment and catches up. It's not a major problem but it makes me dizzy if I move my head too fast. If I move my head slowly there's no lag/freezing. I've cranked all the settings down to the bare minimum however it seems to have made no difference.

CPU is a Ryzen 2600, GPU is a GTX 1070, 8GB of RAM, using a Windows MR headset which may be the problem.

KerbalVR does not start when clicking "Enable VR"

I ran this on a minimally reproducible setup.

  • KSP v1.4.5
  • KerbalVR 3.2.1
  • SteamVR beta 1.1.4
  • Windows 10 1809

(No mods beside KerbalVR.)

KSP.log

Of note is the following block, right at the beginning:

[LOG 19:05:52.871] Load(Assembly): KerbalVR/KerbalVR
[LOG 19:05:52.872] AssemblyLoader: Loading assembly at C:\Users\Forest\Games\KSP\VR-1.4.5\GameData\KerbalVR\KerbalVR.dll
[LOG 19:05:52.895] Load(Assembly): KerbalVR/openvr/win32/openvr_api
[LOG 19:05:52.895] AssemblyLoader: Loading assembly at C:\Users\Forest\Games\KSP\VR-1.4.5\GameData\KerbalVR\openvr\win32\openvr_api.dll
[ERR 19:05:52.897] Failed to load assembly C:\Users\Forest\Games\KSP\VR-1.4.5\GameData\KerbalVR\openvr\win32\openvr_api.dll:
System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.
  at Mono.Cecil.PE.ImageReader.ReadOptionalHeaders (System.UInt16& subsystem, System.UInt16& dll_characteristics) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.PE.ImageReader.ReadImage () [0x00000] in <filename unknown>:0 
  at Mono.Cecil.PE.ImageReader.ReadImageFrom (System.IO.Stream stream) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.ModuleDefinition.ReadModule (System.IO.Stream stream, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName) [0x00000] in <filename unknown>:0 
  at AssemblyLoader.ScanForBadTypeRefs (System.String file) [0x00000] in <filename unknown>:0 
  at AssemblyLoader.LoadExternalAssembly (System.String file) [0x00000] in <filename unknown>:0 

[LOG 19:05:52.898] Load(Assembly): KerbalVR/openvr/win64/openvr_api
[LOG 19:05:52.898] AssemblyLoader: Loading assembly at C:\Users\Forest\Games\KSP\VR-1.4.5\GameData\KerbalVR\openvr\win64\openvr_api.dll
[ERR 19:05:52.899] Failed to load assembly C:\Users\Forest\Games\KSP\VR-1.4.5\GameData\KerbalVR\openvr\win64\openvr_api.dll:
System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.
  at Mono.Cecil.PE.ImageReader.ReadOptionalHeaders (System.UInt16& subsystem, System.UInt16& dll_characteristics) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.PE.ImageReader.ReadImage () [0x00000] in <filename unknown>:0 
  at Mono.Cecil.PE.ImageReader.ReadImageFrom (System.IO.Stream stream) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.ModuleDefinition.ReadModule (System.IO.Stream stream, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName) [0x00000] in <filename unknown>:0 
  at AssemblyLoader.ScanForBadTypeRefs (System.String file) [0x00000] in <filename unknown>:0 
  at AssemblyLoader.LoadExternalAssembly (System.String file) [0x00000] in <filename unknown>:0 

I don't know the details of Unity's plugin architecture (or that of KerbalVR or KSP for that matter), but a cursory search brought up a similar looking issue.

Possible 1.3.1 release?

Thank you dear Vivero for this excellent mod! I'm enjoying it very much under 1.4. But I also like to play RSS and my RSS setup still runs on 1.3.1 (many dependencies are not yet updated).

I verified that KerbalVR works on 1.0.1. So I've tried to recompile 1.0.1 release for 1.3.1 and it compiles without errors. But on 1.3.1 it fails to send video to my HTC VIVE - but head tracking in game works very well.

Could you please check if it possible to make old version to work on 1.3.1? Just sending video output to Vive will be enough.

N key is used for RCS translation.

While I haven't yet had the chance to try this, the readme states:

"5. During flight, enter IVA, and press the 'N' key to initialize the HMD
6. You can press 'N' again to reset the default position"

Which is all well and good, except that the 'N' key is the key which is used for reverse translation (H is forward, and IJKL are sideways translations) for the staging mode.

Kerbals in View

Depending on my Head position the eyes Kerbal that is sitting on my chair are in view.
It would be nice if it was possible to set the Kerbal invisible.
Also the ability to manually set the scale in VR would be really useful.

tracking works, but vive shows default scene

I installed everything correctly, on ksp 1.1.3 it worked, also with a gtx 980 on low at 90 fps, and now in 1.2 the tracking works, the gamewindow shows one eye, and when i move the headset it works too but the display in the headset just shows the normal this is real scene

Performance issues mixed reality

i have horrible framrate issues that only happen when i turn my head, the frame drops are only inside the hmd and the ksp display mirror runs perfectly.

i have messed with the settings having turned everything to the minimum in ksp, resolution at 20% within steamvr, and fov and resolution turned down in the windows settings

using ksp version 1.4.4
windows 10
samsung odyssey mixed reality

i have a 1060 6gb (should be good enough with settings down) 24gb ram, and a i7 4790 3.6ghz

could be a cpu bottleneck considering its age and ksps usually high cpu usage

Oculus Rift - hands/controllers aren't visible

The controls appear to work, as I was able to navigate the staging area using the analog sticks on the Touch controllers. However my "VR Hands" do no appear, despite the controllers being on and detected by the Steam VR interface.

Crashing as soon as I get to loading.

CTD as soon the loading icon appears the game crashes. Have the old version of ksp installed and module manager and the shortcut and still crashes.

Rotation Control - Roll

Been having an absolute blast using Kerbal VR

This might not be a actual issue but, i've noticed that Rotation Control is only Pitch and Jaw, not Pitch and Roll. Can't seem to find anyway to change it.

Been making a Mk1inline cockpit but its hard to control without roll.

How about 1.2.2 Release?

Hello

I only use 1.2.2 for mods and not any versions that are greater than 1.2.2. I mean, it doesn't mean that i never update, i just set the beta to 1.2.2. Can you make a release for KSP 1.2.2?

Unpleasant flickering

As the title says, it appears to almost flickering, the interior of the ship appears to disappear i can see the outside. It does this at a fast rate and it is very unpleasant . It mainly happens in my right eye, but it also happens in my left eye.
Other than that, im getting great fps and everything appears to generally be great.
Specs,
I7-6700k
GTX-1080
16gb of Ram
Windows-10

External cameras in VR?

I tested this mod and loved flying airplanes. But could you get so we can see mouse, and all stuff what is shown at monitor too, and to work at external cameras? I would love to play kerbal fully in VR without removing headset. World scale should be automatically at least 2, and it should save last used world scale. SPH movement around ship is painfully slow, speed should be adjusted by distance of finger from trackpad center.

KSP shortcut invalid

When i try adding the "-force-d3d12" part to the ksp shortcut it wont work. I get a message saying the file doesn't exist and that i should check if the name is right. I double checked that i did exactly as told to do in the guide, all from the extraction to the shortcut. Could it be because i downloaded it through steam?
Please help.

Game crashes on launch.

The game crashes on launch,

  • OS: Windows 10
  • KSP Version: 1.4.5
  • VR Hardware: Oculus

I think it might be because i have the latest Steam VR beta and cannot roll back to the working version.

KSP.log

Crashes in 1.4.4

Describe the bug
When the button to swap to VR is clicked in KSP 1.4.4 the game screen freezez and VR sometimes hangs as if it is loading a game but normally just waits in the between game environment.

To Reproduce
Steps to reproduce the behavior:

  1. Use KSP 1.4.4 with Steam VR running etc
  2. load it all up
  3. Go through and onto the runway
  4. click the enter VR button

Expected behavior
Although im completely not expecting this to work on 1.4.4 i can no longer find a copy of 1.4.3 and thought it might be worth mentioning

Log
KSP.log

looks like an issue with the OpenVR file.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10
  • KSP Version: 1.4.4
  • VR Hardware: Vive

Additional context
Add any other context about the problem here.

Nothing happens when i enable VR

I have SteamVR opened in beta, i have the -force-d3d12 in the shortcut, i opened with the shortcut, but nothing happens when i press the "enable vr" button, any fix for this?

Noticeable delay between head movement and actual headset display

There seems to be some amount of delay in between obtaining the position of tracked devices (the headset) and the corresponding images displayed on the screen. It's like a small lag between physical movement and image display. It's noticeable enough that it is a bit dizzying.

Not sure how to solve this; I'm wondering if the tracked poses and frame rendering should be somewhere other than in LateUpdate. Where should the OpenVR calls to Submit frames be called then?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.