Introduction: Google Cardboard HMD for Tablet

I've been wanting to experience virtual reality (VR in short) since I was a kid. I dabbled in 3D modeling and animation and then some games as well because I was inspired by 3D games back in the day, but that was like around 2000 when PS1 and such had the best graphics around here. Anyway, nowadays there are really nice games with next-gen graphics like Bioshock and Skyrim (which I'm currently playing now) with awfully detailed environments and realistic animations that I'd like to "experience", and now could be accessed through VR.

Hence I tried VR when I heard of the Oculus Rift, but then it's quite expensive for me. Since smartphones came out, I found out about the Durovis Dive through this instructable. I don't have access to woodworking tools and obviously not a 3d printer, and that costs money again haha. I got a smartphone though, so that was a start for me. Some binoculars was all I had for decent lenses so I ripped it up and got the lenses from it, but I had nothing to house them in.

Next was The Nova, a DIY Rift. Another step in the right direction, but not enough to make me create one since the materials were way over my head. However, when I came across Google Cardboard, I started to see the feasibility of this plan, so I went on with it. I bought pizza and then I was rolling! (If you don't get it, refer to the last FAQ in the Google Cardboard page haha)

Note: There will be a lot of notes like this one throughout the instructable. As for the actual note, this instructable is a work in progress, and updates may be made in the future.

Step 1: Gentle Reminders

There are drawbacks with the setup that I use:

Lenses

What I used are from some binoculars which I don't know the specs of. If you have your own, you may need to compensate for that. If you have the OpenDive lenses, I'll add notes since I'm aiming to build for that.

Strapless

As of now, I have no ideas for a strap. If I find one, I'll update this instructable accordingly.

Wi-fi connection required

The Android apps need Wi-fi for it to interact with your computer. It streams fine as long as you have a stable connection though.

Set-up required

Having to set it up for every game session may be tiring for some, so I guess I'd like to warn about it. In my experience, having to set it up over and over again when I started this out proved to be very frustrating, even more when I don't get the results I wanted. I assume that you will have a different set-up from mine, so it would certainly follow that you'll test it many times before achieving good results.

Coding

If some of you are not familiar with programming, find hard to learn new languages or have an aversion to it, I'll be putting up my code here. Otherwise, you could try to code one for yourself if you would want to understand the code.

Lag on feed

I'll be using Android apps for this, and the apps that I have been using have some lag in the feed. I'm still testing if I could play a game of Skyrim with proper 3D settings.

Windowed games only

The Android apps that I use only show a black screen for games on fullscreen, and thus could reduce game performance. They could stream videos in fullscreen but not games, and I am not aware why this happens. See step 7 for details.

Step 2: Materials

Free things is the name of the game, so as long as you have it around the house, go ahead and use them :D

Templates:

  • Google Cardboard template (get it here)
  • The template I made for the extension, attached in the images in this step

Raw Materials:

  • Cardboard. Try to find the E-flute variant, it's really thin and may be used for pizza boxes and laptop packaging (as I have found mine)
  • Lenses. I have not ordered the Durovis OpenDive lens kit yet, but I hope that I'll be able to order them soon.
  • Velcro. Strong ones are good since the tablet may be heavy.
  • Paper. I would suggest legal size for printing the template.
  • Lanyard. For holding the tablet in place

Tools:

  • Pencil
  • Scissors
  • Tape
  • Compass (as you could see in the image, I had a paperclip haha)
  • Cutter
  • Cutting Mat
  • Crafts Glue
  • Caliper
  • Ruler

Software/Apps

  • PC
    • Vireio Perception
    • FreePIE (comes with apk)
  • Android
    • Desktop Streamer/Remote Desktop Control
      • Kinoni Remote Desktop
      • Kainy
      • Splashtop Streamer
      • Teamviewer

Step 3: Print the Template

Get it from the Google Cardboard page. Print in actual size. Use "Legal" or 8.5in x 14in size paper so you wouldn't get trimmed edges. Note that I'm not using the OpenDive lenses, so I'm not really sure if the lens holders would be too big for the actual lenses.

As you could see in the pics, I had created it beforehand. A single pizza box was used in its construction. I had a few problems with it though:

  • Lenses. Yeah, I had them from some binoculars that I had. I didn't pry off the housing for fear of breaking the lenses.
    • They protruded too much. I had to insert paddings for my forehead and cheeks, and still needs more for my nose as well because the torque of the phone on the HMD is rubbing against my skin and hurts with prolonged use
  • Farther display. The lenses that I have needed an additional 3cm distance to see the image clearly. This causes the edges of the screen to be very visible, thus reducing immersion. Good thing though that I didn't remove the casing; that meant that I had to add around 1cm to the distance.
  • Weak. Needless to say, one layer of cardboard really makes a weak construction, but it actually holds well on its own. It's just that I had the misfortune of accidentally sitting down on it when I wasn't paying attention, and it went *poof*
  • Strap. As you could see, I had some braided rope for a strap, which hold fine but isn't easy to use, especially when I need to frequently take it off for tweaking. The current build has no strap but I'll figure one out later.

Step 4: Build the Template, With Edits

Since I was building an extension for the tablet, I didn't need the flap anymore. I just trimmed it from the template and started cutting from there.

I started with taping the templates onto the cardboard, then started getting the holes done. After that, I scored (lightly ran the cutter) the fold lines to get them ready for folding, then lastly, I cut the edges. The cardboard easily folded on the scored lines.

The bottom flap of the frame folded on its own what I was assembling it, but NO FRETS I got this on the next step.

Note: The distance your lens needs to have from the display is important here. I left this area mostly untouched because I needed an additional 3cm from my lens to the display, and that 3cm is used for the tablet extension. If you have OpenDive lenses and wish to use this setup, trim 3cm from the frame now. It would be awfully near the frame but the next step will help on that. If you have other lenses, the succeeding steps will touch on that later.

Step 5: Reinforce the Frame, 3-fold

What I like about cardboard is that you can be creative about it, and it is flexible as long as you know how to use it. Since there were areas on the original template where there were already 3 layers (magnet button side and lens holder), I was inspired by its rigidity so I applied it here.

I added 2 more layers to the single-walled frames by gluing the part first before cutting it into size. For the bends, I had to score the cardboard a few times before I glue it to the base frame to make sure that when the glue is cured, it will be more or less the same shape when assembled. It has a bit of flexibility even so, and that helps when I need to replace the lens holders.

You may need to compensate for your previous parts when doing the 2nd layer. For me, I had to make holes for the lens holder for all sides, but not for the separator (the piece of cardboard that divides what your eye sees) and the flap for the magnet button. For those parts, I just trimmed some of the flaps so it would be flush into the hole.

Another consideration is the bend for the 3rd layer. One score line for the bend might not be enough to ensure the rigidity of that part so I used 3 score lines.

Lastly, I left the top face unconnected to the right face. I needed that area to be free so that I could easily replace the lens holder if I wanted to.

At this point, you may want to marvel at the legit-ness (is that even a word? haha) or your work. :-bd

Step 6: Tablet Extension

Apologies for my bad handwriting. My ideas had to be put down so fast or else I might lose them lol. I've put notes to make it clear.

Anyway, attached in the images are my plans and my calculations for the dimensions. I was almost ready to compute for the angles but then I guessed that I could just wing it, and it did pay off a bit. It didn't come out perfectly but it worked to some extent.

The idea here was to have the same height for all of the layers. Since the HMD side and the tablet side are supposed to be flush to the respective flat surfaces, I would need to glue them while keeping them pressed onto a flat surface. This would entail (at least to me) having to draw them up on some CAD software, but I had the idea during a blackout two days prior to making this so I had to do with what I have. Also, I get confused when I try learning that kind of stuff so I just decided to wing it. Again.

Haha moving on, here I have measured the dimensions of the HMD and the tablet screen with a caliper (very handy measuring tool. Get one if you can) and calculated the needed values for the faces. Then I drew them on a piece of paper with a ruler for the whole millimeter values and the caliper for the values with decimal values. Mine only had 0.05mm accuracy so I rounded off. I winged it again. I don't have a compass on hand so I used a paperclip, hence the weird circles and curves all around the template (did I say I was winging this step? lol). These were needed to find the perpendicular lines to measure the height of the piece.

I arranged the faces by two and then pasted them onto each other (see the plan in the second image). I traced the previous layer onto a new piece of cardboard then cut long strips. The bends were scored then the piece was glued onto the previous layer where the two separate pieces meet. Lastly I cut off the excess. I repeated this until I had 3 layers.

Note: Depending on your lens, you may have edited the frame beforehand according the the 3cm distance. This extension has a perpendicular height of 3cm or 30mm (as seen in the plans). If you want to make your own with your own dimensions, you could try measuring and drafting the pieces. It was quite fun for me doing it by hand, haha. If you can do it in a more precise manner, please do so. It reduces anxiety and increases accuracy and precision. No more winging, though. :))

Step 7: Connecting the Two Pieces

A U-shaped piece of cardboard was used for this step. I had these pieces on one of the suspensions in the laptop packaging I managed to keep. I took them and glued them onto the long sides of the tablet extension. To connect the extension to the main HMD, I put on some stick-on velcro strips on the flaps of the U-shaped pieces.

Don't worry when the cardboard under the velcro folds up. It will still hold, and the velcro will be easier to pull.

Step 8: Putting It All Together

I made a makeshift strap using some lanyard I found around the house. To make a simple buckle, I made a square and made two thin parallel holes that are as long as the width of the lanyard. To make it sturdier, I put another layer on it. I would advise to put a third layer or use a plastic one to make sure it doesn't fold up as mine did. After making the buckle, insert one end of the lanyard through the holes. Insert the other end into the hole where the first one last went it, then out in the first hole. This way you could tighten the lanyard by pulling the ends on opposite directions.

To put it in the tablet extension, just insert the extension into the lanyard then take both sides of the lanyard through the hole of the extension.

Securing the tablet is quite easy. Insert the tablet over the extension and under the strap. Position the strap to the center and pull the ends to tighten. Lastly, turn the whole thing over and secure the extension to the HMD using the velcro strips.

At this point, you can try watching 3D side-by-side (SBS) videos on Youtube (try this) or Dive apps with your HMD. Mind-boggling 3D!

Note: I do realize that the centerpoints of stereo images on a tablet diverge the eyes instead of simply converging or parallel to the images as with a phone on Google Cardboard. This would cause strain for your eyes if you force them. If anyone has an idea how to fix this, please comment.

Step 9: Stream Your Desktop Into Your Android Device

There are a few free apps out there that could stream your desktop to your tablet (or your phone if you're looking for ways for VR with it), but none of these could stream a fullscreen game (at least for my case) for some unknown reason. Btw, you need to have a good Wi-fi connection and download the required PC apps for all of these apps.

What I need from the streamer is to just stream the video with minimum lag and bearable FPS. Good resolution and audio streaming is a bonus and no user interface or UI visible is great as well. So far, here are what I've found best:

Kinoni Remote Desktop

Best I've tried so far because of the least lag. Good resolution and FPS but weaker audio compared to the rest. No cursor and native UI can be toggled.

UPDATE: Kinoni has a new app called KinoConsole that is specifically designed to stream games from your desktop into your smartphone. It seems to be perform better than KRD.

Kainy

I bought the full version of this and it works good. Video quality is adjustable (higher quality, lower FPS), audio is good, lag is fine. No cursor and native UI can be toggled. Although it shows on the trailers that Kainy works for games, I'm not sure if they are fullscreen. The nice thing about Kainy, though, is that it focuses on the current window you're on, so you don't have to manually zoom in the view before putting on the HMD.

Bonus: If you want remote gaming, Kainy could be for you. You could have a gamepad overlay over your screen, or you could use this as a gaming controller. Very responsive in controller mode.

Splashtop

Good resolution, FPS and audio, lag is quite noticeable but UI and cursor cannot be toggled. There exists a version of this that could play fullscreen games, however it works only for certain nVidia GPUs (read here). It didn't work for me, so I just stick with windowed mode. Has a Remote Gaming feature but is sold as a separate product.

Teamviewer

Good resolution and resolution but okay FPS and noticeable lag. Cursor is visible, Android dropdown bar cannot be toggled. Included here because I'm not sure if the other three works for everyone.

To test these out, videos in fullscreen tend to work with these apps so try them out to see which works best for you.

Step 10: Rift on Your Desktop

Now that you can stream your desktop to your Android device (a tablet in my case), you have to let it interface with your laptop so you can experience the Oculus Rift by winging everything. As I just did. Hahaha.

What's needed in this step is that (1) your game should be displayed in stereo SBS images (with some warping due to your lens) and (2) your HMD gives signals to the game to adjust to your head movements.

I must warn you that if you think that cutting so much cardboard was hard, tweaking the code for head tracking and stereo display will be much more difficult. Well maybe not difficult but it's definitely more frustrating. Maybe a strap for your HMD would help because you have to wear it and take it off repeatedly during tinkering, and that's half of the job. To get the optimal VR experience, you may have to code for yourself.

Moving on, you can do this by employing two free apps in your arsenal, Vireio Perception and FreePIE.

Vireio Perception

I found out about this from The Nova instructable. It basically renders your game twice and shows them side by side so that when your each of your eyes sees the images, you'll perceive depth from it. To better your VR experience, you'll need to calibrate it using the hotkeys that you could use in-game (read here).

Although v2 has already been out (read here), the hotkeys don't work in Skyim so you'll have to use previous versions from the vire.io site, and v1.10 worked well with me. You should also take note of the other tips here for Skyrim.

There are a few games that really work with Vireio as listed here but you can try with other games. I got it to work with Bionicle Heroes, Street Fighter x Tekken, and XCOM: Enemy Within.

How to use Vireio:

  1. Copy the .dll files from the bin folder into the folder which the main game .exe is found.
  2. Open Perception.exe from the bin folder.
  3. Choose either "Oculus Rift" or "DIY Rift" or "Side by Side" from the first option, whichever you prefer.
  4. Choose "Shared Memory Tracker" if you need head roll. If not, choose "No Tracking".
  5. Open the game. If it doesn't show in stereo mode, then the game might not be supported or maybe you should use a previous version of Perception.

NOTE: As I understand it, Vireio uses half of the FPS set in your game to render one side of the stereo display and the other for the rest of it (this means alternating side per frame) so it may seem that the game is less smooth than it usually is. Also, when Perception isn't running, the game would load into stereo mode. Just delete the dll files from Perception and it will be fixed. Lastly, there are codes for the display in the fx folder of perception. If you are able to understand them, you could tweak them to suit your needs.

FreePIE

I discovered this program from this thread in Meant to be Seen, a forum where VR enthusiasts come together and discuss. I haven't scoured the forum but this thread about Android and VR made FreePIE the choice for head tracking. Basically, it tracks the sensors on your phone, sends the data through Wi-fi to your computer which then runs a script that converts the data into actions. Python is the language used in this program, and it's simple to learn.

Simply moving the mouse through X and Y depending on the yaw and pitch of the device makes for smooth movement on my part. The only time that I have to use a special code for Vireio's Shared Memory Tracker (as indicated for the tracking option for Vireio) is for the head roll, or the tilting of your head. The raw data fluctuates, and in-game you would see it as a jittery movement. Therefore, I employed a simple gaussian filter to smooth out the data. Using that for all axes (yaw, pitch, roll) was unbearable so I opted with just the roll for SMT and mouse control for yaw and pitch.

NOTE: The Android tablets that I have access to do not have all the sensors needed by the FreePIE APK to run. It needs accelerometer, gyroscope and magnetometer to send data, it seems. Some people have success with WirelessIMU (an app which reads whatever sensor the tablet has) but I must try it first. For now, I'll use a phone for tracking with FreePIE. Unless you have a Nexus 7, which seems to have the full set of sensors... in that case, you're lucky!

How to use FreePIE:

  1. Copy the .apk file from the root folder where you installed FreePIE into your Android device and install it.
  2. Run FreePIE as administrator. You can do this through right click > Properties > Compatibility > Run as Administrator or simply right click > Run as Administrator.
  3. Open the .py script (attached here) in FreePIE and click on the "Watch" tab to watch out for the streamed data
    • Note that the orientation coded in the script is for a device with its screen facing you and is rotated 90deg counterclockwise. Play with the values if you use another orientation.
  4. Open FreePIE on your device and enable the stream
    1. Make sure your Wi-fi is on.
    2. Edit the IP address to match yours. Use ipconfig in Command Prompt if you need it.
    3. Leave the port as is
    4. Uncheck "Send raw data". You won't need raw sensor values, only the orientation is used by the script.
    5. Tap "ON".
  5. The mouse should start moving as you move your device. Edit the .py script if you're not getting desirable results. I have comments all over, so you may use them as a guide.

Now, you should be able to look around in your game using your tablet. More or less. I'm not an expert in these, and as I said, I was pretty much winging it so all these took me much trial and error.

Note:

The VireioSMT line (line 8) is only for roll, in which your view stays vertical to the ground even when you tilt your head. Just delete that line if you could do away with that feature. If you want to try head roll, you'll need "vireiosmt.dll" in FreePIE/plugins folder. Get it here (you'll need to register for free to the forums): http://www.mtbs3d.com/phpBB/viewtopic.php?f=120&t...

Step 11: Enjoy Your Game!

Well, after much trial and error. As I've mentioned, it doesn't work out of the box, so you might have to do some tinkering on your own before you could actually play straight in VR. Internet is your friend! Even I can't play for more than 10 minutes with my current set-up; I still gotta figure out how to make it comfortable for me. Anyway, I hope this would get someone started if he or she wants to tackle VR gaming for almost no cost. Thanks for reading!