Advertisement

Cardboard VR

Started by August 19, 2014 01:57 PM
3 comments, last by capn_midnight 10 years ago

If you've done any reading about the Facebook, nee Oculus, Rift, there are a lot of people who are taking Virtual Reality very seriously these days. At Google's IO conference this year, they announced Cardboard, a template for a head mounted display made out of lenses, a cardboard box, and an Android smartphone. There is even an official Google+ community that is very active. It's sort of based on a Durovis Dive-like concept (and I think they even used the lenses from the OpenDive kit), and all of the Durovis software works with it. Even a cursory search on Kickstarter/Indiegogo and you'll see everyone and their brother has a 3D printed smartphone HMD rig project they are trying to hock.

I would say--at least on the hardware side--the situation today is significantly different from the first, early 90s debacle in VR to warrant not dismissing this as a passing fad out of hand. For the first time, VR is accessible to hobbyists and not just relegated to expensive, probably-snakeoil-selling startups.

So I'm posting here to see if any other GDNet users are playing with VR right now. Seems like the natural place to be for this sort of stuff. The G+ group can get kind of bogged down with product announcements sometimes, and there isn't a good way to discuss programming or design.

I'm somewhat interested in exploring VR UX paradigms. Oluseyi and I have been having a discussion about it for a little bit. I don't think many people have given a lot of thought to the user input side of the UI equation. My own experience has been that a Bluetooth gamepad is the most comfortable way to interact with the system, for a variety of reasons that have more to do with the relative inappropriateness of every other input system I've had available to me than anything specifically good about the gamepad itself. This is a minor problem for me, as I'm writing my own demos as WebGL apps in HTML5 (both to make it easier to test and to avoid having to take time out ot get setup with and learn to program Android apps), and the current builds of Google Chrome and Firefox do not support gamepads on smartphones, only desktop computers.

There are a lot of demos in the Google Play store, and most of them are complete garbage. I would say the best ones are the official Cardboard App (there are some very neat demos, but nothing of lasting use), the porting of the Oculus demo "Tuscany" to Durovis Dive (and mostly only because it works as advertised), and SpaceTerrorVR (a stupidly simple game that is just compelling enough, given the complete lack of other content right now, to convince me to play it all the way through). I did get a good laugh out of VR Toilet Simulator, which is appropriately priced at Free. VR Flight Demo was itself quite bad, but bearing with it one can see the big potential for VR flight simulators.

Some of the issues with these apps are time-to-market related. There just hasn't been enough time to make something good yet. There isn't enough content, and testing across a plethora of devices is hard. Some of it is just bad software development, like a complete lack of any attempt to do sensor calibration or provide configuration settings to enable different input devices and button layouts.

But there is a lurking issue of accessibility. Getting people into a headset is one thing, and a huge thing at that. Getting them to also have a bluetooth gamepad is a completely other issue, and one I'm afraid is going to really be a detriment to VR adoption. In general, the attempts I've seen and experienced at VR are far too piecemeal to be able to bring VR to wider adoption.

Sidebar/brief bit of history: I have always been very bad about finishing projects, especially game projects. Occasionally I'll knuckle down and get something slapped together like a Tetris clone that you play against an opponent by arm wrestling them, or a completely audio based "sub hunter" game that is more a physical set piece than it is a "game". But my interest in game programming has always been more one of tinkering, the enjoyment of problem solving, than of project completion, business, or even having fun playing the game itself.

So when, almost exactly three years ago, I slapped together a cardboard box to make a stereo photo viewer out of a smartphone, with the hopes of animating the image, I didn't think much of it past "look at this weird thing, isn't it fun?"

stereo1.jpg

After seeing the design, and seeing the number of people complaining about how long they were going to have to wait to get their official kits (from both official and unofficial vendors), I immediately ran out to a store, bought two magnifying glasses, and slapped together my own rig by the end of the day.

20140819_091034.jpg

20140819_091119.jpg

The point of all of that is not to brag (okay, just a little), but to point out that these things are really easy to make and you should not wait for shipping for a $20-30 cardboard box to be delivered to you in... a cardboard box. At most, you should spend about $10 or less on lenses (just about anything in the 35mm to 55mm focal distance should work, maybe more, I just haven't tried yet) and use the cardboard box they come in to measure and cut your own setup. The official template is for one lens type and one size of smartphone only, so if you have an iPhone that is smaller than the typical Android phone, or a Samsung that is larger than typical, then you're probably going to have to adjust the size of the box to suit, anyway (NOTE: if you have a Samsung Galaxy Note 3, then you'd be using the same display module as the Oculus DK2). Also, you can get a marginally better image by custom tailoring everything to your own head shape and interocular distance. The NFC tag is unnecessary and most developers aren't using it. I'm also of the opinion that the magnetic "clicker" that the official kit includes is a bad idea, I don't want neodymium magnets anywhere near the magnetometer in my phone.

[Formerly "capn_midnight". See some of my projects. Find me on twitter tumblr G+ Github.]

I am doing research with VR. I have a camera mounted to an oculus that can track objects and place them in the virtual world. Right now it can only track objects with markers on them. It is somewhat limiting but right now I can play a game of chess where the human player moves physical pieces and the computer tracks their position.

Something I want to try is to use a phone in a cardboard. I would use the camera of the phone to approximately track the phone's position in a room. This would allow users to walk around in a virtual room and even crouch down with nothing but a smartphone and some cardboard.

My current game project Platform RPG
Advertisement

You should probably pick up a DK2. It's hard to match the realism and head tracking. I mostly just tried a ton of demos with mine and showed it to coworkers so far. Still waiting to build a new machine before I go any further really. A huge part of doing VR especially with the DK2 is having a constant 75 fps. There are DK2 demos that use the head tracking portion to select UI selects that you look at. Helix is a good example which uses it to start the demo and select from the UI.

Kind of hoping the commercial one has eye tracking since it would open up a lot of options for interacting with a UI. About having a gamepad through I'm just using my xbox one controller which works really well. (Playing Skyrim for instance).

This is a minor problem for me, as I'm writing my own demos as WebGL apps in HTML5 (both to make it easier to test and to avoid having to take time out ot get setup with and learn to program Android apps), and the current builds of Google Chrome and Firefox do not support gamepads on smartphones, only desktop computers.

If you want to make a proof of concept look into websockets. It's used in some Oculus HTML5 demos. Essentially you launch a websocket server and have your browser connect to the localhost websocket server. You then feed your controller input or Oculus Rift data to the browser to use. Might be able to do something with phonegap for phones and tablets as a temporary fix.

I am doing research with VR. I have a camera mounted to an oculus that can track objects and place them in the virtual world. Right now it can only track objects with markers on them. It is somewhat limiting but right now I can play a game of chess where the human player moves physical pieces and the computer tracks their position.

Something I want to try is to use a phone in a cardboard. I would use the camera of the phone to approximately track the phone's position in a room. This would allow users to walk around in a virtual room and even crouch down with nothing but a smartphone and some cardboard.

That's a really good idea. I've been focusing on the smartphone-based solution specifically because of the variety of sensors available in the phone. However, you might be able to add one of these to the Rift: https://www.sparkfun.com/products/10736 . It communicates over a basic serial port, so you should easily be able to write code to interface with it.

I have mirror components to build a stereo image splitter to mount in front of the back-facing camera of the cellphone. I have code that can track a bright spot in the webcam image. I believe that I can build a bright LED on a stick and track the point in 3D space ahead of the HMD with this setup.

You should probably pick up a DK2. It's hard to match the realism and head tracking. I mostly just tried a ton of demos with mine and showed it to coworkers so far. Still waiting to build a new machine before I go any further really. A huge part of doing VR especially with the DK2 is having a constant 75 fps. There are DK2 demos that use the head tracking portion to select UI selects that you look at. Helix is a good example which uses it to start the demo and select from the UI.

Kind of hoping the commercial one has eye tracking since it would open up a lot of options for interacting with a UI. About having a gamepad through I'm just using my xbox one controller which works really well. (Playing Skyrim for instance).

This is a minor problem for me, as I'm writing my own demos as WebGL apps in HTML5 (both to make it easier to test and to avoid having to take time out ot get setup with and learn to program Android apps), and the current builds of Google Chrome and Firefox do not support gamepads on smartphones, only desktop computers.

If you want to make a proof of concept look into websockets. It's used in some Oculus HTML5 demos. Essentially you launch a websocket server and have your browser connect to the localhost websocket server. You then feed your controller input or Oculus Rift data to the browser to use. Might be able to do something with phonegap for phones and tablets as a temporary fix.

Yes, that's actually the direction I'm going. I don't want to spend a lot of money on this right off the bat, but I think I can get some demos together that would be convincing enough to warrant further investment. And yes, I'm in the process of building the WebSocket bridge as you suggested. Indeed, I'm considering building it to be a full command system for the "game", as even Bluetooth keyboards aren't very reliable (given how Android handles keyboards and holding keys down and not all key codes being usable in a full-screen browser session), and voice input severely drains the battery (as it constantly streams over the network to Google's processing servers, rather than running on the device). If I can find my EZ430 Chronos (http://processors.wiki.ti.com/index.php/EZ430-Chronos), then I think I might be well on the way to a very interactive system.

[Formerly "capn_midnight". See some of my projects. Find me on twitter tumblr G+ Github.]

It was late last night when I finished this and haven't had a chance to do a proper write-up or presentation on it yet. Mostly, I was just happy to get Node working on my DreamHost VPS. But anywho...
Here is a small scene, made in Blender, exported via Collada, running via WebGL in the browser thanks to Three.js.
Some bonus features:
0) If you open a browsing session on your PC as well as your smartphone, you can choose your own secret key and enter it in both browsers, at which point any keyboard, mouse, or gamepad input you use on your PC will be proxied to your smartphone [1].
1) You can choose stereo rendering with barrel distortion for use with Google Cardboard,
2) Or choose red/cyan anaglyph rendering for use with glasses on any type of display,
3) Or just skip it all and run around the really crappy landscape, viewing it with obsolete 2D display technology.
Wouldn't have to do the input proxying if the browser vendors would just implement HTML5 Gamepad API for the mobile version of their browsers already. But whatevs. It's also very laggy over the internet [2], so please don't complain about it making you sick. I know already. I have a bucket sitting next to my desk.
However, the basis of this should be perfectly usable to slap together VR demos, served locally over WiFi, that should work well to pitch investors/family members of your burning need to buy an Oculus Rift DK2 or Samsung Gear VR and Galaxy Note 4 to go with it.
Oh yeah, you'll see a "fork me on Github" tab that will eventually disappear before you can have a chance to click on it. It goes here:https://github.com/capnmidnight/VR/ Like I said, still some splinters on this guy.
[1] Note that this is extremely hacked together right now and picking a stupid key like "12345" or something equally asinine will have a high likelihood of colliding with someone else who has failed to be thoughtful in their secret key selection process. The responsibility of not giving someone else keyboard/mouse/gamepad access to your smartphone's version of this site lies with you (but don't worry, it's only this site, not your phone as a whole. This can't be used to attack your phone).
[2] This is straight-up prototype work here, complete with rough edges and pointy corners still in need of filing down.

[Formerly "capn_midnight". See some of my projects. Find me on twitter tumblr G+ Github.]

This topic is closed to new replies.

Advertisement