Monday, June 1, 2009

about 3d glasses

About 3D Glasses

This page will discuss the current techniques of showing a stereo image to the viewer with the aid of special glasses. These glasses all use different techniques to achieve the same thing: to two separate images of the same scene, one to each eye, that the brain sees as a stereo (3D) image.


Analglyph

"Analglyph" refers to the red/blue or red/green glasses that most of us have seen in comic books and in cereal packets etc. The glasses consist of nothing more than one piece of transparent blue/green plastic and one piece of transparent red plastic. These glasses are easy to manufacture and have been around since the 1850s. You can even make your own with the right colored candy wrappers.

An analglyph stereo picture starts as a normal stereo pair of images, two images of the same scene, shot from slightly different positions. One image is then made all green/blue and the other is made all red, the two are then added to each other. The diagram below will illustrate, click on it for a larger view.

click to see larger picture

When the image is viewed through the glasses the red parts are seen by one eye and the green/blue parts are seen by the other. This effect is fairly simple to do with photography, and extremely easy to do on a PC, it can even be hand-drawn. The main limitation of this technique is that because the color is used in this way, the true color content of the image is usually lost and the resulting images are in black and white. A few images can retain their original color content, but the photographer has to be very selective with color and picture content. Click here to visit a page with some examples of analglyph 3D pictures with full color content.


Pulfrich 3D Glasses

These glasses are based on a phenomenon discovered by a guy called Carl Pulfrich.

Pulfrich discovered that light takes longer to travel through a certain dark lens than it does through a light one. Not by much, but by a few miliseconds, just enough for a frame of video to arrive one frame later on the eye that it is covering. What use is this? well if the video being watched shows an object moving horizontally across the screen and one eye sees a previous frame than what the other eye sees then you will see the image in two locations.

With a ball moving horizontally across the screen like this, each eye sees a different image, and the disparity between the two images is perceived as depth information. The brain assumes both frames belong to the same object and your eyes focus on the object as if it were closer than it is. The faster the object moves, the more separation there is between the time delayed images and the closer the object appears.

The fact that faster objects appear closers than slower objects also coincides with the principles of motion parallax. The parallax scrolling animation that I showed earlier looks pretty good through these sorts of glasses.

In hi quality Pulfrich glasses the second lens is not required, or is usually just a clear piece of plastic. Since these ones of mine a cheap, the dark lense actually has a purplish color too it which offsets the color balance of the image being viewed. To try and correct this they have put a yellow/green color to the other lense to try and correct the color balance.

Films made for the Pulfrich method are perfectly watchable without any special glasses (minus the 3d effect). The limitation of this technique is that it only works when things are moving horizontally and in the same way. Films made to take advantage of these glasses must contain lots of horizontal tracking shots or rotational panning shots to create the effect.

The only type of games that would benefit from these glasses are horizontal shoot-em-ups or platform games where the player is always heading in the same direction. If the player changes direction then everything in the background will look closer than everything in the foreground, at least until you took off your glasses and put the on back to front, which would correct the order. A few old arcade games like R-Type and Nemesis work well with these glasses.


Polarized 3D Glasses

Polarized glasses are probably the most commonly used in amusement parks and alike. Each lens is polarized at an opposing 45 degree angle.

To display an effect like this requires two projectors. Each projector also has a polarized lens over it, each at opposing 45 degree angles, like the glasses. A polarized lens basically lines up all the light waves so they are in one orientation. These oriented light waves can only pass through a polarized lense that is polarized at the same angle. If the polarization of the lens is different then it wont let that light through. Light coming from the projector oriented at -45 degrees will be seen by one eye, and the light coming from the other projector oriented at +45 degrees will be seen by the other eye. Hence, you can display a stereo pair of images at the same spot and the viewer will see a single 3D image.

The above diagram shows two projectors projecting polarized light onto a screen. The orientation of the lines (vertical or horizontal) indicates the orientation of the light. The color of the light is for illustration purposes only, polarized 3D doesn't colorize the light like that. When the two images are reflected off screen a mix of light (in both orientations) reaches to 3D glasses, the lenses on the 3D glasses only let the matching polarized light through and the light is split into its separate images before it reaches the users eyes.

Optical equipment like this is expensive, even the glasses can cost up to 3 dollars a piece even when ordered in bulks of 50. The projectors and the lenses cost a lot more. The cost is the main reason why you normally only see polarized 3D at special events and amusement parks.

This 3D technique could be possibly be adapted for computer games. We can already buy projectors that you can hook a PC up to. I don't see why you couldn't have a PC with two graphics cards, two projectors, and a couple of polarized lenses to project the image. All you need then is some sort of patch for your favorite game to render each frame as a stereo pair, one frame per graphics card. I don't know of anyone trying this though. It would likely involve several thousand dollars worth of equipment.


Purchasing note: Analglyph, Pulfrich, and Polarized glasses can all be purchased in bulk from the Rainbow Symphony Store... no, I don't get any commission from these guys, I just thought I'd mention a place where you can buy them since they are sometimes hard to find.


Chromadepth

Chromadepth is a tradename of Chromatek Incorporated. Here are some Chromadepth based glasses...

The flat plastic that make the lenses is practically colorless, and both lenses look identical. Here is a picture that works well with Chromadepth glasses.

At first I couldn't work out how these glasses worked, but after looking at the example pictures for a short while I noticed a pattern: All red objects appear close to you, all blue objects appear far away, and other colors make up the depths in between according to there location on the spectrum. Colored light that hits the lenses gets redirected according to its hue like so...

As you can see blue light passes almost straight through, green light gets angled slightly, yellow light even more, and red light is angled the most. The other lens does the same thing except it refracts light in the opposite direction, its the same lens just attached back-to-front. By changing the angle of light from a colored object before it reaches the eye we can make the eyes see an object as being at a different distance than it actually is. Hopefully this diagram will explain...

The limitation of this technique is that the colors of the objects in a scene must be chosen accordingly, if you wanted to put a man in the background he would have to be wearing blue. If that man were to walk towards you then his shirt would have to change through all the colors of the rainbow until it became red when he was up against the screen. In a game you would have to change the colors of all the scenery as you moved around in it. This could be trippy, but I am sure the novelty wouldn't last forever.

A funny quirk of Chromadepth glasses is that after using them for a while some people start to see a slight 3D effect from colored images without wearing the glasses. This isn't just imagination, the human eye actually focuses on different colors at different distances because the "cones" (the part of the retina that detect color) in the eye are different lengths depending on what color they are tuned to picking up. The brain normally compensates for this, but I can still consciously convince my brain to perceive a Chromadepth picture as being three dimensional. The effect is only slight and isn't as pronounced as when wearing the glasses but it is noticeable.

You can purchase the glasses from Chromatek, a pack of 10 glasses costs about 10 bucks. Chromodepth glasses are fun to play with, and ideal to keep kids amused at parties since its easy for them to create their own 3d pictures with a few colored crayons.


Shutter Glasses

The idea for shutter glasses has probably been around for a while but it has only been recently that technology has become available to make an effective implementation of it. It works with two images for each image of video, shutters cover or uncover each eye of the viewer, allowing one eye to see, then the other. The shutters are timed with the video so that each eye only sees the image intended for it. Of course the shutters aren't mechanic devices nowadays and instead use a lens that turns opaque when an electric current is passed through it. This is probably a derivative of liquid crystal display technology. Here is a picture of some Crystal Eyes (tm) shutter glasses, manufactured by Stereo Graphics Corporation.

Because shutter glasses only expose each eye to every other frame the refresh-rate of the displayed video is effectively cut in half. On an TV this would give a refresh rate of 30 fps or frames per second (for an NTSC TV) or 25 fps (for a PAL TV). This would be extremely flickery and hard on the eyes, therefore this technique will never take off for TV viewing until new TV standards come out. PC monitors however are beginning to support refresh rates of 120 fps and higher, this would give an effective refresh of 60 fps which is just about sufferable. If you have a monitor that can do 140 fps then you will get 70 fps and at that point the flicker starts to disappear and the glasses can be comfortably used for long periods of time.

With a good monitor the only limitation to shutter-glasses is the hassle of having to wear them, they are heavy (much more so than regular spectacles) and you usually have a dangling wire that can get in the way.


Virtual Reality

"Virtual Reality" was a phrase we heard a lot of in the early-mid 90s, around the time of movies like "Lawnmower Man" and "Jonny Neumonic". The idea of VR was to create a totally submersive virtual experience. Back-lit Liquid Crystal Displays pretty much kicked off this craze, it allowed the construction of light weight (relatively) headsets with a separate display over each eye.

A Back-lit LCD color display was much more light weight than a traditional cathode ray TV, and strapping two TVs to your head probably wasn't such a good idea. With two LCD displays it was possible for a computer to render a 3d environment and display it as a stereo image to the user. Additionally, motion sensors could be build into the headset so that when the user moved their head the angle of view within the computer generated environment moved with it. To add to the experience, one or two "data gloves" could be worn by the user allowing him or her to pick up and interact with object in the virtual world.

A company called Virtuality was the first to attempt to mass market this sort of technology to the public, they build the first VR arcade machines, where for a ridiculous price you could experience a VR fighter jet in all its flat shaded polygon wonder.

Nowadays VR seems to have gone out of fashion, it made a small insurgence into PC gaming, (there is a VR version of Quake 2). One of the problems with it could have been that it came too soon. It became a craze when PC gaming and LCD technologies were still in their infancy, at a time when dinosaurs like four-eight-sixicaus-ess-exicaus roamed the earth. The 3D in these machines featured little or no texture mapping and very slow frame rates. The display generated by the pre-TFT bulky LCD displays was also blurry and low res. Had this technology been thought of today, with the power of the Quake 3, UT or DMZG game engines behind it things may have been very different.

There were two other limitations of this technology, firstly, if you moved your eyes the illusion would be ruined. The system wasn't able to track eye movement, only movement of the head. Therefore you had to get into the habit of staring straight ahead and moving just your head to look around you. Secondly, the headsets where very bulky and heavy. Today's models are improved but are still too much of a hassle to wear for most people to really get used to.

No comments:

Post a Comment