Sunday, 10 July 2016

Making google cardboard work properly (with a web browser) part 1

First experiences with Google Cardboard were that things looked 3D, but it always felt a bit weird and uncomfortable. Usually the 'not rightness' got worse as I looked further from the centre of the image. To start with, I messed around with profile generator, but soon came to the conclusion I was starting from the wrong place.
Could I make it better?

Having worked out what I thought was the problem, the answer is yes, it can be made LOTS better (well it is for me anyway)

I decided that there are 2 main problems:
  1. because the lens spacing doesn't match my ipd, and the lenses have a fair bit of distortion, there is a small sweet spot and as I looked away from the sweet spot, the 2 views diverge in ways my brain did not like. This makes things feel more and more 'not right' as you move further from the centre.
  2. The lenses introduce a lot of pincushion distortion - I suspected that while not ideal, things would look a whole lot better if the spacing is fixed even with this distortion.
Of course having fixed item 1, a new profile should make the google app (and others that use the underlying cardboard API) look a whole lot better as well - after generating a new profile.

Google cardboard is set up for an ipd of around 64mm, and I measure my eyes at 67mm, but even this small difference seems to have a big effect.

So I set off a couple of days ago to:

  1. fix the ipd to lens mismatch.
  2. write an app (web page) that would allow me to view stereo pictures in a web browser.
and so our quest begins.... Part 1 is below, part 2 is here

  Part 1 - fix the google cardboard optics

I am using the actual Google Cardboard here.... This permanently changes your cardboard - and care must be taken to avoid damage to the lenses.

Having searched around the interweb and not found a lot about this I had a close look at cardboard and decided to adapt it with a microsaw, a knife and some glue. I wanted to make the lens spacing adjustable, so at worst I could use it as originally setup - albeit looking a bit the worse for wear!

This turned out to be pretty straightforward. I only made one side adjustable as I reckoned I only needed a few mm movement, and could just hold the viewer slightly off centre if necessary.

It is really important that while the lens can be shifted a few mm sideways, it does not move closer or further from your eye while doing this.

I used a microsaw for most of the cutting - just finished off corners etc. with the craft knife - the cardboard is pretty tough.
Here are the pics, detailed instructions below..
The lens piece cut out and trimmed. Viewed from phone side.

View from phone side - card slider to hold the lens piece
detail of the side cut - close to the corner

card slider again - from eye side.

The main piece ready for re-assembly

  1. Protect the lens! a couple of small pieces of soft cloth, just larger than the lens, can be placed over the lens and held in place with blutak around the edges. Be careful while doing this - the lenses are easily scratched!
  2. Open up the side flaps to allow easier access around the lens.
  3. Make 2 parallel cuts horizontally about 5mm above and below the lens. I chose the right lens, although you could do either. The lower cut will come right through to the nose gap. DO NOT get too close to the lens....
  4.  Then cut vertically down from the end of the top cut to the nose gap.
  5. On the side of the cardboard make a correspnding cut at the corner to finally free the lens in its small cardboard rectangle. This rectangle will be able to slide out and in sideways after a few more steps.
  6. If you need the lenses to be closer together, trim off some cardboard from the cut out piece and / or from the nose side to allow the lens to slide further into the cardboard.
  7. On the piece with the lens, on the side nearest the corner, cut away about 1 cm of  2 of the 3 layers of cardboard. This will allow the piece to slide in and out to the side while the remaining layer will stop it from flapping about too much.
  8. Now mark the side flap and cut a slot so the lens can slide in and out with the side flaps back in place.
  9. Attach a small piece of thin card to the edge of the moving lens card, so that it sticks out through this slot and allows the lens to be moved slightly while looking through the cardboard
  10. Now, with the lens piece well out the way, attach 4 small strips of cardboard to the main housing, to the inside and outside edges of the top and bottom cuts. This makes slots for the lend piece to slide side to side, while preventing it from moving backwards and forwards
  11. Finally, slide the lens piece in and close the flap. Check and adjust so the lens can slide in and out. A few mm movement is all that is needed, and it helps if it doesn't slide too easily - once set up you should not need to move it again!
I suspect cutting out both lenses is not a good idea as it would weaken the overall structure. With just one side the overall integrity is still good.

Now the lens spacing is adjustable, it needs to be properly adjusted - part 2 explains this in detail.

No comments:

Post a Comment