VR/binocular/SBS view for Google Cardboard/Oculus Rift/etc

dgm5555
Member
 
Posts: 244
Joined: Tue Apr 08, 2014 19:45

VR/binocular/SBS view for Google Cardboard/Oculus Rift/etc

by dgm5555 » Thu Apr 23, 2015 15:58

Now that a binocular VR viewer is available for under £2 (+ a smart phone) in the form of the google Cardboard, and has already been proven on minecraft to work well, I'm keen to see it in minetest. Unfortunately due to severe lag even with client/server on the same machine on a my attempt at a lua mod with two GUIs side-by-side failed, so I think it could only be done by the engine (like 1st and 3rd person views).

I've never programmed c, but presumably it would be a simple matter of having 2 cameras displayed side by side in the same gui - the same as virtually any 3D design program, and camera.cpp seems to have code for setting this up so presumably this would be the place to start..
eg // Reposition the camera for third person view
if (m_camera_mode > CAMERA_MODE_FIRST)

Can anyone give me any pointers, as looking at the code I don't understand how to have two cameras displayed in the same gui (actually to be fair I don't really understand any of the code, but as no one else seems to be working on this I'm willing to mess about with it)?

Alternatively if someone is working on it already, or has the skills to quickly hack something together, I'm happy to test it and get the other tool chain working...

The other question is how to get the eye/camera position into minetest from the Cardboard. I presume it would be best for the server to open a port which could stream the gui and listen for the Cardboard feedback. Then the phone would run a simple android app which would display the video stream and in return pass the headset translation/pitch/yaw/tilt back to minetest.

I guess it would also be worth also considering streaming the minetest audio, and would be especially cool if a Head-related transfer function (HRTF or so called 3D-sound) could be applied which provides the ability to locate sound in 3 dimensions. OpenAL http://kcat.strangesoft.net/openal.html or similar might provide a cross-platform API to achieve this. (actually this works very well with my PC speakers, and certainly doesn't need headphones to significantly improve audio experience.
 

kahrl
Member
 
Posts: 236
Joined: Fri Sep 02, 2011 07:51

Re: VR/binocular/SBS view for Google Cardboard/Oculus Rift/e

by kahrl » Sat Apr 25, 2015 17:40

"3d_mode = sidebyside" may be the option you seek (and perhaps playing around with 3d_parallax_strength). You will need to modify draw_sidebyside_3d_mode() in drawscene.cpp if you want more complex custom camera positioning.

I just noticed that this mode causes some HUD/formspec issues, though. Not sure why or since which commit.

Edit: about the audio, minetest has always been using OpenAL for sound, so it's possible that this part already works out of the box.
 

dgm5555
Member
 
Posts: 244
Joined: Tue Apr 08, 2014 19:45

Re: VR/binocular/SBS view for Google Cardboard/Oculus Rift/e

by dgm5555 » Mon Apr 27, 2015 22:08

Brilliant that's cool.
vino (VNC server) seems to provide the best frame-rate for a quick test on ubuntu as the streaming clients don't work well at all.
I wonder if there would be some compression optimisation possible for a dedicated stream from minetest to an android client as the sbs views contain some similar data, or even just simple scaling I guess it would be client dependent as to where the bottle-necks lay.

I'm not sure how to get HRTF working, as minetest seems to play 'standard' stereo sound and it certainly doesn't seem localised
EDIT: actually after a bit more testing, I might be wrong on this, it seems some of the sounds (eg walking on sand/wood) are very poorly localised, whereas walking on grass is much better localised, so might actually be related to the quality of the sounds rather than the engine...
 

EvGler
New member
 
Posts: 1
Joined: Mon Feb 06, 2017 02:09
GitHub: EvGler
IRC: EvGler

Re: VR/binocular/SBS view for Google Cardboard/Oculus Rift/e

by EvGler » Mon Feb 06, 2017 02:13

Hi there!

I would like to ask, if you could suggest the best type of VR Headset for gaming. What would it be?
I'm planning to get one this month.

Thanks!
Last edited by EvGler on Tue Feb 21, 2017 08:13, edited 1 time in total.
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

Re: VR/binocular/SBS view for Google Cardboard/Oculus Rift/e

by Jordach » Mon Feb 06, 2017 14:08

EvGler wrote:Hi there!

I would like to ask, if you could suggest the best type of VR Headset for gaming. What would it be?
I'm planning to get one this month.

Thanks!

https://www.vive.com/uk/ or http://www.osvr.org/hdk2/

Oculus has a FB backdoor, not to mention their own form of DRM.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 


Return to Minetest Engine

Who is online

Users browsing this forum: No registered users and 5 guests

cron