Book Image

Virtual Reality Blueprints

By : Charles Palmer, John Williamson
Book Image

Virtual Reality Blueprints

By: Charles Palmer, John Williamson

Overview of this book

Are you new to virtual reality? Do you want to create exciting interactive VR applications? There's no need to be daunted by the thought of creating interactive VR applications, it's much easier than you think with this hands-on, project-based guide that will take you through VR development essentials for desktop and mobile-based games and applications. Explore the three top platforms—Cardboard VR, Gear VR, and OculusVR —to design immersive experiences from scratch. You’ll start by understanding the science-fiction roots of virtual reality and then build your first VR experience using Cardboard VR. You'll then delve into user interactions in virtual space for the Google Cardboard then move on to creating a virtual gallery with Gear VR. Then you will learn all about virtual movements, state machines, and spawning while you shoot zombies in the Oculus Rift headset. Next, you'll construct a Carnival Midway, complete with two common games to entertain players. Along the way, you will explore the best practices for VR development, review game design tips, discuss methods for combating motion sickness and identify alternate uses for VR applications
Table of Contents (12 chapters)

Stereoscopic viewers

Stereoscopic vision is an important evolutionary trait with a set of trade-offs. Nearly all land-based, mammalian predators have forward facing eyes for stereoscopic vision. This allows them to detect objects that may be camouflaged or helps them sort depth to be able to know where to attack. However, this gives predators a narrow field of view, and they are unable to detect movement behind them. Nearly all prey animals have eyes on the sides of their heads for a far wider field of view, allowing them to detect predators from the side and rear.

Artificial stereoscopic images where first created in 1838 when Charles Wheatstone created his stereoscopic viewer, built with mirrors. Fortunately, the invention of the photographic camera occurred nearly simultaneously, as drawing two nearly identical images, separated by just 6.5 centimeters, is a very difficult task:

Brewster improved on the design just 10 years later. But, it was Poet and Dean of Harvard Medical School, Oliver Wendell Holmes Sr., whose 1861 redesign made it a phenomenon. His belief in stereo-photography as an educational tool was such that he purposely did not patent it. This lowered the cost and ensured it would be used as widely as possible. There was scarcely a Victorian parlor that did not have a Holmes stereo viewer. This is the design most frequently associated with stereoscopic antiques, and remained the most popular design until View Master took over in 1939:

Stereoscopic media requires that two, near-identical images be presented, one to each eye. However, each solution varies in the way they ensure the eye sees only the image intended for it: the left eye sees only the left image and the right eye sees only the right image.

In early stereoscopic displays, and all VR HMDs today, this is done simply by using separate lenses directed at each eye, ensuring that each eye sees only the image designed for it. From the Viewmaster to the Vive, the same basic technique is used. This works perfectly for one viewer at a time.

But, if you want to show a 3D movie to a crowd, you need different techniques to ensure that there is no crosstalk. That is, you still want the left eye to see only the left image and the right eye only the right image. With 3D movies, there were a handful of different techniques, each with advantages and disadvantages.

The most affordable option is the one often used for 3D comic books: anaglyph 3D. Typically, this involves Red/Cyan lenses (though sometimes Green/Yellow). The left image would be printed in Red ink, the right image in Cyan ink. The Red lens would block the Cyan, the Cyan lens would block the Red. The effect does work, though there is always some crosstalk when some of each image is still visible by the opposite eye.

Polarized 3D allowed for full-color images to be used, using a technique such as anaglyph glasses. One set of polarized light would pass through one lens, but the orthogonal polarized light would be blocked. This could even be used in print images, though at a significant cost increase over anaglyph 3D. Polarized 3D is the type most commonly used in 3D movies today.

Active shutters were, at first, a mechanical shutter that would block each eye in sync with the movie, which would only show one eye at a time. Later, these mechanical shutters were replaced with Liquid Crystal Displays (LCD) that would block out most (but not all) light. This is the 3D technique used in the Sega 3D system, and was also used in some IMAX 3D systems:

There were many other 3D techniques: volumetric displays built with lasers and mirrors or light arrays, Chromadepth, and holograms. But none were as successful as the techniques previously discussed.

Real, interactive holograms exist only in science fiction. The Holograms of Tupac and Michael Jackson are actually based on a 19th century magic trick called Pepper's Ghost, and are simply 2D images projected onto a pane of glass. The Holographic images of the HoloLens are also not real holograms, as they too use a version of Pepper's Ghost, where the images above are projected down into a set of semi-transparent optics:

Lenticular displays deserve to be mentioned for two reasons. First, they allow the user to see 3D without the use of glasses. Second, even though the technology has been around for at least 75 years, most people are familiar with lenticular displays because of the Nintendo 3DS. A lenticular display cuts the image into very thin, alternating vertical strips, one set for the left eye, one set for the right eye. Each eye is prevented from seeing the other eye's images though the use of a parallax barrier.