GithubHelp home page GithubHelp logo

Comments (27)

X52p avatar X52p commented on June 18, 2024 4

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.

Vivero avatar Vivero commented on June 18, 2024

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.

SirDavid12 avatar SirDavid12 commented on June 18, 2024

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.

dpmorrow avatar dpmorrow commented on June 18, 2024

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.

X52p avatar X52p commented on June 18, 2024

I have the same problem.
Is there any Information about my setup that could help you?

from kerbal-vr.

jrbudda avatar jrbudda commented on June 18, 2024

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.

adigyran avatar adigyran commented on June 18, 2024

So, no progress here?

from kerbal-vr.

jrbudda avatar jrbudda commented on June 18, 2024

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.

adigyran avatar adigyran commented on June 18, 2024

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.

X52p avatar X52p commented on June 18, 2024

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.

ZNixian avatar ZNixian commented on June 18, 2024

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.

ZNixian avatar ZNixian commented on June 18, 2024

I suspect I'll be able to fix this - I've gone from crashing to rendering a fully black screen.

from kerbal-vr.

ZNixian avatar ZNixian commented on June 18, 2024

Nevermind, I accidentally suppressed the issue, rather than fixing it.

from kerbal-vr.

X52p avatar X52p commented on June 18, 2024

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.

ZNixian avatar ZNixian commented on June 18, 2024

@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.

ZNixian avatar ZNixian commented on June 18, 2024

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.

Poldor avatar Poldor commented on June 18, 2024

@X52p great work. Looking forward to your release and to learn how you did it!

from kerbal-vr.

Ermintrude-the-cow avatar Ermintrude-the-cow commented on June 18, 2024

from kerbal-vr.

Vivero avatar Vivero commented on June 18, 2024

@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.

jrbudda avatar jrbudda commented on June 18, 2024

I would very much like to contribute to this if it's working.

from kerbal-vr.

X52p avatar X52p commented on June 18, 2024

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.

ZNixian avatar ZNixian commented on June 18, 2024

I'll have a look.

from kerbal-vr.

Vivero avatar Vivero commented on June 18, 2024

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.

Ermintrude-the-cow avatar Ermintrude-the-cow commented on June 18, 2024

from kerbal-vr.

Vivero avatar Vivero commented on June 18, 2024

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.

dpmorrow avatar dpmorrow commented on June 18, 2024

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.

Vivero avatar Vivero commented on June 18, 2024

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)

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.