I'm Morgan McGuire (@CasualEffects). I've been working on computer graphics and games for 20 years at great places including NVIDIA, University of Waterloo, Williams College, Brown University, Roblox, Unity, and Activision.

See my home page for a full index of my blog posts, books, research, and projects.

Friday, August 12, 2016

Strategies for Avoiding Motion Sickness in VR Development

Image from The Lawnmower Man of how not to
develop in VR if you want to avoid motion sickness.
Motion sickness occurs in virtual reality (VR) when an incorrectly-operating or poorly-designed experience creates inconsistent stimuli between your physical body motions and the visuals displayed in the head-mounted display (HMD).

Imagine that  you turn your head to the left and the image in the HMD doesn't rotate extremely soon at exact the same rate (...or rotates the wrong way, as has happened to me many times when debugging transformations!).

In this case, your brain will receive conflicting input from your vestibular system's sense of acceleration measured through the inner ear, your neck muscles' proprioceptive feedback, the brain's own high-level intentions, and your eyes. When that happens, your body is evolutionarily conditioned to assume that you are sick from an infection or poison. That's normally a good assumption in these conditions, which are what you might experience from a high fever or excessive alcohol.

If you were experiencing these symptoms due to a toxin, then a good response would be to immediately void everything in your stomach to eliminate the toxin and induce a headache to make you slow down and close your eyes.

Of course, there's nothing wrong with your body in VR. Instead, the world (as rendered) is broken and your eyes are fine. But your body doesn't "know" that, so you'll eventually vomit and have a terrible headache if the conditions persist. That's "simulator sickness" or "VR motion sickness."

Nobody can avoid sickness in these conditions, no matter how forgiving their vestibular system is. I'm extremely resistant to motion sickness. I don't get sick on a small boats rolling in the ocean or fast driving on a mountain road. I play first-person video games and good VR experiences for hours without problems. But if I'm in a bad VR experience for a minute I feel sick until well into the following day.

I've worked with multiple VR technologies for over a decade. I've never seen anyone actually vomit in VR from motion sickness. So, I don't think you need to fear that unless you're already experiencing nausea or vertigo from another source before you go in. However, I have seen and experienced near-daily headaches and developers who had to go home after only an hour of work many times. In the last year I've been able to work almost every day in VR and helped many people through VR sessions with infrequent discomfort.

Below are the practices we've developed in my lab for minimizing and avoiding motion sickness and simulator-induced headaches.

"Dramamine Naturals" are just ginger


  1. Take preventative medication before entering VR (depending on the type, up to two hours ahead of time). Different bodies and metabolisms respond differently to medications. For most people, ginger is the most effective preventative. You need a lot, though--Dramamine Naturals or the condensed extract pills work best, although the candies are tastier if you don't mind eating a lot of sugar too. For other people, scopolamine (Transderm Scop), promethazine (Phenergan), cyclizine (Marezine), dimenhydrinate (Dramamine), and meclizine (Bonine) are effective. Most have the side effects of drowsiness and dry mouth.
  2. As you start to become ill, take your usual headache remedy.
  3. Obviously, don't use alcohol or other substances that reduce balance or perception when in VR. Modifying circulation can also be problematic. I avoid excessive caffeine, but whatever your normal intake is or slightly less should be fine; if the alternative is a caffeine-withdrawal headache, then that would not be great prevention. The same applies to nicotine.
  4. Don't use VR if you are already ill, including allergy congestion. I often take half a dose of pseudoephedrine (Sudafed) before entering VR to reduce my normal allergy symptoms.
  5. Wear your glasses in VR (contacts may be easier, but all current HMDs allow normal-sized eyeglasses.
  6. A tasty alternative to motion sickness pills.
  7. There's anecdotal evidence that spicy, salty, and greasy foods make some people more susceptible to motion sickness. Certainly overeating won't help.

Best Hardware Practices

  1. Ensure that the inter-pupil distance (IPD) adjustment on the HMD is set correctly for you. Most people are about 62 mm. If your eyes are spaced much closer or wider, then you'll need to calibrate. Not all devices are hardware adjustable.
  2. Put the eye relief setting at the maximum distance that is comfortable. For many people, this is as far as possible on a DK2. Not all devices are adjustable.
  3. Use the HMD like binoculars. Don't actually put on the HMD. Flip the head straps out of the way and press it to your face with one hand like a pair of binoculars. Keep your hand well to one side so that you don't block the tracking mechanisms. (You'll need your other hand for the controller.) Only look in VR for a few seconds at a time, just to verify that whatever you were testing is working. This will allow you to debug even broken VR programs all day without actually being in VR.
  4. Stop immediately if you feel motion sickness. I really mean immediately. Two seconds of bad motion is enough to warn you and get out before you're sick. If you try to "push through," then you'll fail--biology is against you. After about 30 seconds you're going to feel strange...and that feeling will take hours to go away. After a few minutes you'll feel really ill. The effects are cumulative, so a few bad one minute sessions will make you unable to work for the rest of the day. Once you're sick, the only remedy is to wait up to 24 hours.
Rift IPD adjustment (under right thumb)
DK2 Eye Relief adjustment
Vive IPD and eye relief adjustments

Best Software Practices

  1. Never move the camera programmatically. The viewpoint should only move relative to the visual references due to the movement of the player. Don't allow it to be jolted by physics or flown using the controller. But what if you have a driving or flying game? The key is "relative to the visual reference." If you display a cockpit and the player moves relative to the cockpit, then this will usually feel stable. Even in those cases, make sure that movement of the vehicle is due to player input. When the player anticipates the movement correctly, motion sickness is reduced. Teleporting with an abrupt cut at the player's direction is a good mechanism for traversing large distances without a cockpit. Most successful VR experiences without vehicles work this way.
  2. Minimize latency. Turn off all post-processing effects, minimize draw calls, and keep scene complexity low when developing. Disable triple buffering. Ensure that you're processing input and tracking data as soon as possible in the frame.
  3. Display HUD elements about 1.25m from the viewer. The lenses in the HMD make the display surface seem about 1.25m (4 feet) away when focusing. The exact distance varies with HMD. Placing HUD elements much closer will make the player cross-eyed and cause headaches.
  4. Avoid text in VR, and keep what text you must display have neutral-colored and large. The resolution on current HMDs is low and the chromatic aberration correction is imperfect. Reading under those conditions causes eye strain and headaches. (Plus, text rendering is frequently slow!)
  5. Display a lot of stable reference objects. Cockpits, textured walls, starfields, mountains...anything that helps your eyes track unmoving parts of the world to distinguish its own motion from that of moving nearby objects. 
  6. Display a body avatar. This makes the experience seem more real to the visual system and provides a stable reference when not in a vehicle. Some people find otherwise, but I think the key idea here is that a body avatar acts like a cockpit for walking experiences.

Morgan McGuire (@morgan3d) is a professor at Williams College, a researcher at NVIDIA, and a professional game developer. His most recent games are Project Rocket Golfing for iOS and Skylanders: Superchargers for consoles. He is the author of the Graphics Codex, an essential reference for computer graphics now available in iOS and Web Editions.