Disabling the Health & Safety Warning on the Oculus Rift DK2

About the Health & Safety Warning

Win_OculusUnityDemoScene 2015-04-30 11-39-18-664

The Health & Safety Warning appears in every Oculus Rift application, every time you start it, and has done so since SDK version 0.4.0, the first version with full DK2 support. As of SDK version 0.4.3, it reads:


Read and follow all warnings and instructions included with the Headset before use. Headset should be calibrated for each user. Not for use by children under 13. Stop use if you experience any discomfort or health reactions.


Press any key to acknowledge

This warning helps stop users from doing dumb things and shields Oculus from legal liability. It is a good idea for anyone using your headset to read and understand it. Once. You really don’t need to keep seeing it every time you launch an app, especially if you’re a developer who is launching tests on a frequent basis. Continue reading

Development notes

VR Speed Reader Milestone 4: color cues for acceleration + WPM display

The most noticeable change in this new version is that when accelerating your WPM by looking right, a green halo appears around your vision, and when decelerating your WPM by looking left, a red halo appears. When no halo appears, your WPM is not changing. The halo (and the rate of acceleration/deceleration) becomes more noticeable as you look more to the left/right. It was hard to visually estimate acceleration before and this should help.


Because I needed to fade in/out the color halo, the implementation of this required a (relatively simple) custom shader that could handle both the transparency of the texture and the alpha multiply. I call it “Unlit/Transparent Alpha” and you can grab it at pastebin.

I replaced the blur for now with a simpler rectangular highlight around the current word. This encourages the user to focus at a particular point while still allowing them to use their peripheral vision to the maximum potential. I’m not sure yet though if it might lead to their attention wandering away from the target word.

I added a delay to the first word at the beginning of each paragraph. This helps deal with the momentary disorientation and the (illusory) perceived speedup that occurs when jumping from one paragraph to the next. The associated code refactoring also allows me to arbitrarily customize the amount of time spent on each word.

I added a WPM informational pop-up to the pause screen that appears when touching the touchpad, using Unity 4.6’s world-space UI.

Here is the current prototype:

I experimented a bit with combining short, common words into a single word, like “in the”, so they could be read together. Results were mixed. Sometimes it seemed to help and sometimes it was confusing. After further reflection I think the right thing to do here is actually to group together 2-grams that occur frequently enough in written text. This raises the interesting idea of having the time per word, rather than being constant, actually depend in some way on how “expected” the word is (e.g. its likelihood in context given a simple n-gram model). With this, more time would be spent on unfamiliar words and less time on familiar words, and common words like “Alice” would have less and less time dedicated to them as the text went on. This might be something to revisit at a later time.

Development notes

VR Speed Reader Milestone 3: Continuous paragraph reading + controls

New VR Speed Reader milestone! Nate suggested it was distracting when it jumps from the end of a line to the beginning of a new line while reading a paragraph. To avoid this, I placed two copies of the text on either side, with the one on the left adjusted down one line, and the one on the right adjusted up one line. I then justified the text (so it’s straight and has the same margin on both the left and right sides). The effect is that now when jumping to the next line, it feels as though you’re simply continuing to read horizontally, but you retain the context of the surrounding lines. It’s sort of like the text is wrapped around a cylinder.

Continuous paragraph reading in action: when you jump to the next line, the app appears to seamlessly continue moving horizontally.

I also implemented basic controls: you can now look left and right to speed up or slow down the reading speed. Your eyes continue tracking the text while you do so. You can also press the touchpad to reset orientation, and by holding the touchpad you pause reading and can look around. The app starts at a standstill, and must be started by looking right. This avoids disorientation and helps develop familiarity with the controls. See video below for demonstration.

Small fixes:

  • I modified the text to avoid dashes/hyphens which were resulting in some long words. Later on I’ll break these up programmatically.
  • Reduced blur of surrounding text to something more reasonable. I’m still considering other methods of highlighting the active word, like highlighting it with another color, or dimming the surrounding text (black on grey).

Next steps:

  • Right now Words Per Minute is hidden. It should be shown while paused.
  • Need to implement Gear VR requirements like holding back button for universal menu. This should also pausing reading while the back button is pressed.
  • Pressing back button should present a zoomed-out sharp view of the document, allowing the reader to change the current reading location (zoomed-out mode). The app should begin in this mode as well. The two copies on the side should vanish in this mode.
  • Consider grouping small common words as units (e.g. “in the”).
  • Maybe some kind of visual indicator for when they’re speeding/slowing, like colors around the edge of vision.

Let me know if you have any thoughts also!


Settings for Wind Waker in Oculus Rift DK2 with Dolphin VR

vlcsnap-2015-04-22-12h37m07s201People keep asking what settings I run to get good performance in my videos of The Legend of Zelda: Wind Waker running in Dolphin VR, the fork of the Dolphin Gamecube emulator with support for the Oculus Rift DK2 (see my YouTube playlist for this game). I don’t know for sure which settings are important as I haven’t experimented with everything, but here is what I have at the moment, and I currently get a high-quality experience with no serious artifacts and smooth head tracking about 90% of the time.

Continue reading

Development notes

VR Speed Reader Milestone 2: blurring the other words

In order to force the reader to focus upon the current word, but still be able to take advantage of information in their peripheral vision, we apply a blur to all words other than the current one. The blur is relatively subtle when not looking directly at the words, but very noticeable when they are brought into the fovea.

This was fairly straightforward and efficient – most of the delay in implementing it was diagnosing the Unity 5 bug mentioned in the previous post. The basic idea is borrowed from this Gamedev StackExchange post, which suggested using DepthMask. The principal is to render two quads, one with the sharp text, and right in front of it, another with the blurry text. Between rendering the sharp and the blurry quad, I render a special masking quad, which is located in front of both quads, but only renders to the depth buffer, not the color buffers. The result is that the front quad does not write any pixels to the locations where the masking quad is found. This allows me to mask any portion of the document I choose by simply moving the masking quad to that location.

In the screenshot/video below the blur effect is exaggerated for emphasis – in reality it would probably be preferable to have it be less severe. I experimented with moving my head while reading, and as expected the counter-rotation of my eyes continued to track the selected word in the text with no issue.


Debugging, Development notes

Unity 5 bug: psychically linked textures on Gear VR

I was creating a simple application for Gear VR in Unity 5.x which was encountering a strange bug where after two seconds it would stop working. Eventually I boiled it down to a minimal reproducing scene that looks like this: 16d9a631a8ba7e82bdf164f87e2e8f78This is a very simple scene: it contains two quads that have two different 4096×4096 textures applied to them, compressed with ETC2 (GLES 3.0). There are no other objects and no active scripts or shaders. Everything else is disabled. When I run it in the Unity editor, the result is what you would expect: the two quads just sit there, with their two different textures, indefinitely. When I build and run the same app on Gear VR on the Note 4, a mysterious and inexplicable event occurs: the app runs correctly for 2 seconds, and then the quad in the back magically changes to have the same texture as the quad in the front! Recall that there are no scripts running. If I disable the quad in the front, this behavior does not occur. Just to be sure, I re-created the quad in front from scratch, to make sure it had no implicit link to the other. The behavior still occurs. After downgrading to Unity 4.x, this behavior vanished and it worked as expected. So it’s most likely some kind of Unity 5 bug. I can only speculate why this occurs. Maybe some internal failure is causing one of the textures to be lost, and so it reverts to the other texture. Maybe it thinks one of the textures has no references, so it’s being garbage collected at the first opportunity. Whatever it is, I should have trusted people who said Unity 5 wasn’t yet safe to use with Gear VR.

Edit: Apparently some people are using Unity 5 for Gear VR with fairly sophisticated projects as shown in this guide. I have no idea what the difference is that’s causing them not to hit the same issue – as far as I know I set up the same way.