Skip to content
This repository has been archived by the owner on Feb 16, 2018. It is now read-only.

I'd like to help out! #1

Open
ssj71 opened this issue Feb 3, 2017 · 8 comments
Open

I'd like to help out! #1

ssj71 opened this issue Feb 3, 2017 · 8 comments

Comments

@ssj71
Copy link
Contributor

ssj71 commented Feb 3, 2017

Hi Bastiaan:

Sorry I couldn't find any other way to contact you. My company is looking at making a game accessory and would like to develop a launch title that works on the htc vive and also on android/iOS mobile VR headsets. I'd really like to develop the game using Godot since I'm a big advocate of open source software.

I am hoping there are some tasks that I can assist in and we can get this working. I unfortunately have little experience in any game engines, only a prototyped game on the vive using the worldviz vizard 5 game engine, which is not portable to mobile (nor open source). Though I do have extensive c programming experience (embedded) and a fair bit of c++ too. I thought the easiest path would be to get a godot game working with the vive then try to move it over to the mobile targets. I have a vive for development. If you can just give me some direction while I'm doing my research into openVR what godot needs I hope it will be beneficial for everyone. I'm usually on IRC from around 4-12UTC. In the meantime I'll be looking through your code in this repo and your OpenVR branch of the godot codebase.

Thanks,
_Spencer

@ssj71
Copy link
Contributor Author

ssj71 commented Feb 3, 2017

ha, I just saw the roadmap in the readme, would you mind if I added each one as a separate issue here and we can maybe discuss them a bit? Or would they belong better in the upstream project tracker?

@BastiaanOlij
Copy link
Owner

BastiaanOlij commented Feb 3, 2017 via email

@ssj71
Copy link
Contributor Author

ssj71 commented Feb 3, 2017

So yeah, the biggest hurdle at this moment is actually Godot 3 not compiling for iOS and Android just yet:)

that is a rather large hurdle right now. That and Godot 3 won't have a stable api for some months still. Its so close to being ready (I could deal with an alpha) but I doubt I'll convince anyone in management to wait a few months for Godot 3 to be even to alpha. :( They want an android or iOS VR game prototyped in the next month. I'll talk to them and see what I can work out. Probably the answer will be to just use unity. Worst comes to worst I'll do our prototype in unity and see if I can port to godot3 before release.

It sounds like the VR part is actually already fairly workable, very nice work. Its too bad the timing of the major changes, but I understand that sort of stuff needs to be done. If I am able to get an android phone that I can test with (which I should), I'll see if I can add the gyroscope sensor.

Would it be a waste of time or take extremely long to backport the changes for VR to godot 2.1 and perhaps try to create the game that way? If that's feasible I might be able to use godot after all.

Thank you so much for your feedback!

@BastiaanOlij
Copy link
Owner

Hey @ssj71,

It's actually the accelerometer/gyro/magnetometer changes for iOS that are the only things that ended up in Godot 3 and not in Godot 2 so if you want to focus on Android adding gravity vector support would be the thing you need to do. Android already does accelerometer, gyro, magnetometer but didn't extract the gravity vector which is what you really need for VR (you can do it yourself with alot of math but why do it if the OS already supplies it for you).

With those vectors you can determine orientation of the device so that the movement of the device steers the camera. Actually for VR both android and iOS have support for giving you a final transform for this and it may be interesting to add that to both platforms as well.
I've got some code however that converts the 9DOF sensor data into orientation though its a bit simplistic, it does work.

The other thing you need is the stereo_camera project. My openVR project uses this as well. Both of those are still based on an older Godot 2.2 version but in theory you can build a patch to apply to the latest Godot 2.1 branch and it should work just fine.

@BastiaanOlij
Copy link
Owner

Btw, you can find some more about the changes needed to Android here:
godotengine/godot#7503

@ssj71
Copy link
Contributor Author

ssj71 commented Mar 3, 2017

I'm finally working on this a little more.
Where do I copy the openVR lib and bin directories to? I assume somewhere in the godot source tree and then build godot (openvr branch of course)?

EDIT: NVM. Figured it out. Added it to the readme in case somebody else would ask the same (see PR).

@BastiaanOlij
Copy link
Owner

Cool thanks! That readme was written in a hurry :)

This thursday I finally got all the controller logic working properly so this is enough now to create a steamvr game that works with the vive.

I'm also playing around with Trinus VR and VRidge, both offer SteamVR support and turn your cardboard/gearvr headset into an HMD for your PC. Not as good as hooking up a vive or rift but still. Trinus even has a PSVR version that allows you to hook up your PSVR to your PC though it hasn't worked on my laptop yet.

Obviously non of that will help you for a pure mobile VR app. I really need to get back into compiling the latest Godot 3 for iOS and see if all the work I did a few weeks ago paid off. I still have to write a lens distortion shader but shouldn't be too much more work to get it all running.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@BastiaanOlij @ssj71 and others