Comments (27)
I got it working again! Still, have some errors to fix and code to clean up (there was a lot trial and error)
If that's OK I will push that into a new Repository because a lot of the code needed to be rewritten to work in the new Unity Version. I'm also planning to maintain it in the Future.
from kerbal-vr.
Yep, I'm seeing the same behavior in 1.2, good to know at least one other reporting the same thing. I thought a re-compile against the 1.2 libs would fix it, but it doesn't.
The vrCompositor.Submit function calls are throwing some error that I cannot explain or fix (that function is supposed to send the rendered frames to the headset display). I'm bit stumped on this one... I'll keep trying some things, but any help is appreciated.
from kerbal-vr.
Sorry for the late response,
I happen to be a VR game developer myself, and I'd reallly like to play ksp in vr, so maybe I could take a look at it as well.
from kerbal-vr.
I noticed that if you set it to EGraphicsAPIConvention.API_DirectX again and launch with -force-d3d11 flag you can get it working for a few seconds before rendering blows up. Although rendering is flipped on one eye...
Just thought I'd share since I've been poking it for a few hours now 😄
from kerbal-vr.
I have the same problem.
Is there any Information about my setup that could help you?
from kerbal-vr.
I've been poking at this for a while now too, found the following:
KSP 1.2 is Unity 5.4 and defaults to Direct3d 9.
SteamVR does not accept textures in d3d9 format. In Unity 5.4 the 'legacy OpenGL' backend was removed in favor of 'opengl-core'. Found a random forum post that explains SteamVR only works with the legacy OpenGL from Unity < 5.4. So that's why the mod breaks in 1.2.
Current only option then is -force-d3d11 tho I haven't got that working either, the whole game locks up on compositor.submit for me.
from kerbal-vr.
So, no progress here?
from kerbal-vr.
I haven't tried again tbh, the only way this could possibly work is if the newer unity still supports the older unity render thread VR events but I doubt it and I haven't tried it that way.
from kerbal-vr.
so, no luck after month? i`m dying to try this with my htc vive. but reverting the version means reinstalling all hell of mods
from kerbal-vr.
Hi, I tried using an injector designed for Unity: https://github.com/Eusth/VRGIN it doesn't work in KSP for other reasons, but it has the exact same problem in any other Unity game I tested when Mirror display (displaying on HMD and normal Monitor) is enabled. Maybe that's a place to look for the problem. I hope this information is useful in some way.
I would really like to play the newer KSP versions in VR.
from kerbal-vr.
If you use dxcpl to break on corruption (and add KSP to the scope), you'll get a crash as soon as you enter IVA. The subsequent minidump file turns up something inside vrclient_x64.dll (SteamVR).
from kerbal-vr.
I suspect I'll be able to fix this - I've gone from crashing to rendering a fully black screen.
from kerbal-vr.
Nevermind, I accidentally suppressed the issue, rather than fixing it.
from kerbal-vr.
I tried using DirectX 11, but I get an Access violation on submit. Has somebody an idea if i have to explicitly acquire access to the texture when using DirectX? Do I have to wait for a special event before submitting?
from kerbal-vr.
@X52p This is the same issue I was getting. I suspect it's a multi-threading problem, so you'll need to call SubmitFrame on the render thread.
from kerbal-vr.
How did you end up doing that? I tried using a C++ plugin to handle multi-threading, but that didn't end up working.
Kerbal-VR is under the MIT license; you can do whatever you want with it, without asking anyone, by the way.
from kerbal-vr.
@X52p great work. Looking forward to your release and to learn how you did it!
from kerbal-vr.
from kerbal-vr.
@X52p impressive! I would also love to see how you did it! And yes feel free to do as you please with the code.
from kerbal-vr.
I would very much like to contribute to this if it's working.
from kerbal-vr.
I have pushed everything I made into a new repository: https://github.com/X52p/KerbinReality
Currently I have performance issues. It would be really nice, if You have any Idea how to solve them. (and sorry that the code is such a mess at the moment)
from kerbal-vr.
I'll have a look.
from kerbal-vr.
So uhh... I might've fixed this problem. I don't know how this works. But I updated all the OpenVR libraries and SteamVR Unity plugin scripts, then I simply ran KSP with the -force-d3d12 flag. The frames get rendered correctly to the headset, except now the orientation of the headset is wrong in the game, i.e. if I look up, the camera looks down and vice versa.
I put all these changes in the updated-openvr
branch, but I won't release a new version until I fix the obnoxious orientation issue (I'm sure it's gotta be some simple math change somewhere).
from kerbal-vr.
from kerbal-vr.
Incredible. For some silly reason, to fix the orientation issues, I needed to flip the vertical coordinate of the render texture. Perhaps running with DirectX 12 necessitated this. Anyways, the mod works on KSP v1.4 now. Closing with #15. Thank you to everyone for your contributions to this conversation. Cheers!
from kerbal-vr.
Excellent work!
I just got stands for my lighthouses finally and was considering starting a new VR project, or even finishing one of my others
I was thinking though, does it seem plausible to inject the VR context at other times such as in the KSP facility screen and the various buildings?
Obviously if that's possible it'll take a lot of work to redesign the interfaces to be VR friendly, but how cool would that be!?
On that note, I'm wondering if considering these blockers have been removed, it's time to start a kanban board and make it clear the objectives of the project so we can start contributing towards common goals?
It would seem there's a few lurkers on this thread like myself that might want to help now.
from kerbal-vr.
Thanks for the suggestions! It is certainly possible to allow VR in the other buildings, I've been experimenting with implementing room-scale VR in the VAB, and it seems feasible (but there are quirks).
I'm overhauling a lot of the code in order to allow for more features. I'd like to focus on the aspect of VR-friendly interfaces; how do we control craft from IVA, how to build in the VAB/SPH, etc.
A kanban board sounds like a cool idea; let me gauge how the project is going first before I jump ahead towards that idea. Thanks for following along, I appreciate the enthusiasm 😁
from kerbal-vr.
Related Issues (20)
- WMR Controllers don't work with RPM in KerbalVR 4.0.0
- tracking too fast
- Crash after clicking "Enable VR" on 1.11.2
- Doesn't work in 1.12
- any chance of an update for 1.12?
- THIS BRANCH NO LONGER UPDATED - 1.12-compatible version in thread
- Is there ever gonna be support for the Epic Games version of KSP? HOT 2
- RasterPropMonitor cameras stay black (only when turned on, otherwise work fine)
- Find cause of failed recover (after loss of tracking in a dark room)
- Explain better how OpenVR is used HOT 2
- Add ability to use toolbars in vr. HOT 1
- Suggestion: flight mode
- MAS support
- Ability to use standard controls in 4.0, visual and console bugs. HOT 6
- Massive Terrain Flickering. Other Bugs. HOT 4
- controls are not working HOT 2
- New version different install progress? (help not bug)
- Weird zoom glitch with RPM HOT 1
- Version 3.2.6 crashes and 4.0.0 a3 is too slow/visual artifacts HOT 12
- Camera update. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kerbal-vr.