binocular HUD? (for £2.50 Google Cardboard/oculus rift/DIY)

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

binocular HUD? (for £2.50 Google Cardboard/oculus rift/DIY)

by dgm5555 » Wed Apr 22, 2015 05:44

Just wondering if anyone is working on getting minetest to support binocular views.

Now that google cardboard provides a high quality cheap alternative to the Oculus Rift (just a couple of lenses for a few dollars each as most of us have the smart phone for the screen) it would significantly improve immersive play.

It should be pretty easy to just add tilt for lateral head rotation and render two views, so the only impact on gameplay would be to halve framerate, as google cardboard has an SDK to manage streaming to and from the phone and monitoring movements. It would just mean monitoring a port from the phone for position, but the streaming could probably be left to 3rd party apps, but I guess if it was easy to stream the HUD to a port would probably decrease lag somewhat. (3rd party apps include Splashtop http://www.splashtop.com/linux (L/W/M) or Trinus VR (https://play.google.com/store/apps/details?id=com.loxai.trinus.test (Windows and Mac only)

An easy method of interaction would be to have a 2nd phone which worked like a wii, so effectively mouse/keyboard to enable the interaction (tilt for movement direction/tap for punch/etc), which also sent to a port eg https://play.google.com/store/apps/details?id=com.wanderplayer.android.controller

If minecraft can do it we should have it too... http://www.instructables.com/id/Virtual-Reality-Minecraft-18-with-Google-Cardboard/

BTW if you want to buy a complete google glasses kit, in the UK it costs £2.50 - [url][url]http://www.ebay.co.uk/sch/i.html?_from=R40&_sacat=0&_sop=15&_nkw=google+cardboard&rt=nc&LH_PrefLoc=1[/url][/url]
Fingers crossed someones working on it...
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

Re: binocular HUD? (for £2.50 Google Cardboard/oculus rift/D

by Calinou » Wed Apr 22, 2015 09:35

Most virtual reality SDKs happen to be proprietary. For instance: https://github.com/jherico/OculusSDK/bl ... ICENSE.txt
 

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

Re: binocular HUD? (for £2.50 Google Cardboard/oculus rift/D

by dgm5555 » Wed Apr 22, 2015 11:41

Calinou wrote:Most virtual reality SDKs happen to be proprietary.

Why does that matter?
It's an issue with minetest not the network/phone=display function
The Cardboard SDK is provided by google https://developers.google.com/cardboard/overview, but they currently offer it to anyone who wants to use it (actually I can't find a specific license, so I'm assuming the general google license applies). And if anyone is hung up on that it should be easy for them to code their own to transmit the gyro/accelerometer readings, but you'd be missing out on the advanced distortion correction and rendering of the SDK. The reality is though if you're coding for a phone there's always going to be some sort of license attached to it.
 

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

Re: binocular HUD? (for £2.50 Google Cardboard/oculus rift/D

by dgm5555 » Wed Apr 22, 2015 17:17

Just thinking about the controls further.
Instead of an extra phone, it would probably be more intuitive to use head gestures: eg
L ear on shoulder = dig/punch, R ear = place/use
You could also put a visual control on the ground or in the sky which had Inventory, Drop, Jump/Climb, Sneak/Duck which you activated by looking at for (eg) a second.
Walking and Running could possibly be shaking your head up and down slow or fast, and stop by shaking side to side.
 

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

Re: binocular HUD? (for £2.50 Google Cardboard/oculus rift/D

by dgm5555 » Wed Apr 22, 2015 21:46

This view is the minimum that would be required from minetest. Everything else to achieve the VR can be done with other software (although I'm sure lag would be signifianctly decreased if minetest could monitor a port and respond directly to the google cardboard api).
Image

This demo is done using the following code and logging in as leftEye (the server) and rightEye (a client) to provide players with different cameras. However I don't think the rightEye:set_eye_offset is working properly, and in any case there is dramatic lag between leftEye and rightEye, so this method wouldn't work even running both on localhost. Ideally the 3D VR view would just be another view selected same as normal F7 views. (I did try to make an avi of the action, but failed due to various problems)

Requirements:
No internal lag
No discrepancy between bounding boxes (or just get rid of them)
Tilt is needed - without this the user would quickly get sick as screen movement couldn't follow head movement. But if eye_offset was working properly tilt could be simulated with this.
Fog must be the same both sides or it's disconcerting



Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local eyeOffset = 10
local leftEye
local rightEye
minetest.register_globalstep(function(dtime)
   if leftEye == nil then
      leftEye = minetest.get_player_by_name("leftEye")
   elseif rightEye == nil then
      rightEye = minetest.get_player_by_name("rightEye")
      if rightEye ~= nil then
         rightEyePos = rightEye:getpos()
         rightEye:set_eye_offset({rightEyePos.x+eyeOffset,rightEyePos.y,rightEyePos.z}, rightEyePos)
      end
   else
      rightEye:set_look_yaw(leftEye:get_look_yaw()-math.pi/2 )   -- Bizarrely the developers seem to have randomly changed the yaw value in getting vs setting
      rightEye:set_look_pitch(-leftEye:get_look_pitch())
      rightEye:setpos(leftEye:getpos())
   end
end)

 

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

Re: binocular HUD? (for £2.50 Google Cardboard/oculus rift/D

by dgm5555 » Mon Apr 27, 2015 21:12

Thanks to kahri for pointing it out, but turns out Minetest can already render in various 3D styles including side-by-side. Just a matter of editing minetest.conf https://github.com/minetest/minetest/blob/master/minetest.conf.example
#3d_mode options are:-
# "none" = no 3d output.
# "anaglyph" = cyan/magenta color 3d.
# "interlaced" = odd/even line based polarisation screen support.
# "topbottom" = split screen top/bottom.
# "sidebyside" = split screen side by side.
#3d_mode = none
#3d_parallax_strength = 0.025

Also to scale for a phone screen
# Initial window size
#screenW = 800
#screenH = 600

Unfortunately I haven't found a good system for streaming from ubuntu to android yet, but will keep looking (vino the VNC server seems best, but there is still significant lag)...
 

User avatar
spyjoshx
Member
 
Posts: 17
Joined: Mon Mar 03, 2014 15:51
In-game: spyjoshx

Re: binocular HUD? (for £2.50 Google Cardboard/oculus rift/D

by spyjoshx » Thu Feb 23, 2017 15:49

dgm5555, the only problem with the built-in stereo 3d is that menus and node GUIs do not render correctly in 3d mode. I'm not sure how this would be accomplished without modifications to the engine though.
 


Return to Minetest General

Who is online

Users browsing this forum: No registered users and 87 guests

cron